3

I have an ARM Cortex-M4 embedded system running FreeRTOS. I have implemented a crash log dump mechanism that writes a file to a storage device in the event of a fatal error, such as divide-by-zero, null-pointer, address errors, invalid instruction, or assertions. In this file, I write, among other things, the contents of the stack at the time of the exception.

This system captures crashes that happen in the field, so the idea is to analyze the crashes that are returned to me and determine the source of the problem as best I can. I can easily connect the log to the .elf that was generated when that version of the code was compiled. I just need a way to parse it.

I assume there are tools that can do this already (I can't be the first to do this), but I'm having trouble finding something on The Series of Tubes(tm) that fits the bill.

Is there a good starting point to create a tool that can parse the .elf from compilation and follow a stack dump to create such a report?

Jim B.
  • 4,512
  • 3
  • 25
  • 53
  • Do you have an unstripped ELF file with debug information for the build? Otherwise it's unlikely you'll get much more than a function name out of it (if you have symbols on it, at all.) – Diego Elio Pettenò Nov 18 '16 at 13:27
  • Yes, I do, and I have control of the build process so I can add anything needed to make this possible. I.e. the solution can include additional build steps as well as data collection. – Jim B. Nov 18 '16 at 17:18

1 Answers1

2

For the benefit of anyone else with this problem, here's what I am doing:

Google has a tool called "breakpad" that can parse .elf and crashlog files in the "minidump" format, which was originally created by Microsoft and adapted by Google for Chrome.

I am writing a tool to convert my stack traces to minidump format in the hopes of using the breakpad tools to analyze my crash logs.

Here's a link to breakpad: https://github.com/google/breakpad/blob/master/docs/getting_started_with_breakpad.md

Jim B.
  • 4,512
  • 3
  • 25
  • 53
  • A long time past now... but did you ever have any luck getting this to work? I'm looking for an in field crash dump solution for freertos on stm32 ARM cortex M7. – Felix Aug 01 '21 at 22:33