Stack backtrace for ARM/Thumb

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I am using uClibc (as opposed to glibc), so the backtrace() functions do not exist.

I am trying to write a backtrace function, but cannot determine the stack frame for Thumb code, since it seems inconsistent.

I have done several experiments:
1. Compiled using "-mtpcs-frame -mtpcs-leaf-frame". This creates a consistent stack frame, but is very expensive. It adds approximately 15 Thumb instructions per function.
2. Compiled using "-fno-omit-frame-pointer". There were 2 problems here.
2.1 When returning from main(), I did not reach a NULL fp.
2.2 The stack frame was different depending on the optimization. Tried without -O and with -O1. Got different structure of the stack frame.

Is there a way to backtrace interworked ARM/Thumb code, without using tpcs?

Thanx

Eli Stern



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux