Unable to get a stack trace inside newlib?

Asked by Elliot B

I'm working on getting stack traces from my data abort handler. I've managed to successfully recover the machine state and give it to __gnu_Unwind_Backtrace. For intentional aborts (like int x = *(int*)0;), I'm able to get a stack trace all well.

 If I do something like fputs("hello", NULL) (perhaps fopen failed for some reason and my users didn't error check the result), I don't get a stack trace. I can only get the instruction inside _fputs_r that was the first to try to dereference the fp. That's not super helpful for my users.

I did a bit of digging and discovered that libc.a doesn't have any unwinding information. I used arm-none-eabi-readelf -u /usr/arm-none-eabi/lib/libc.a and also inspected the unwind tables of the ELF of my executable to determine this. Is it possible to get unwinding information for libc? I'd like to avoid re-compiling the toolchain if possible with the extra flag to enable unwind tables.

Question information

Language:
English Edit question
Status:
Expired
For:
GNU Arm Embedded Toolchain Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Launchpad Janitor (janitor) said :
#1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.