Reputation: 4714
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?
Upvotes: 3
Views: 1624
Reputation: 4714
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
Upvotes: 2