This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Stack backtrace for ARM/Thumb


Tried to read a bit about this (unwind). Not much documentation available.
Seems it was not created for this purpose.
Couldn't figure out exactly how to use it.

Also, it will add quite a large table of data for each function, thus making the total memory consumption larger.

Wouldn't it make more sense to "convince" the compiler to produce a consistent Thumb stack frame?
Note that the ARM and Thumb stack frames do not have to be identical, since it is possible to differentiate between ARM and Thumb code using the LSBit of the return address.
So if I get a consistent ARM FP and a consistent Thumb FP, I can traverse the stack.

Eli Stern

-----Original Message-----
From: Andrew Haley [mailto:aph@redhat.com] 
Sent: Monday, July 26, 2010 12:11 PM
To: Stern, Eli
Cc: gcc-help@gcc.gnu.org
Subject: Re: Stack backtrace for ARM/Thumb

...

I'd have a look at using _Unwind_Backtrace, which is in libgcc.
You'll have to compile with full unwinder data and link with
--no-merge-exidx-entries.  I think the unwinder should be able to cope
with a mixture of Thumb and ARM frames.

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]