This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
RE: Stack backtrace for ARM/Thumb
- From: "Stern, Eli" <eli dot stern at ti dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: "gcc-help at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>
- Date: Wed, 4 Aug 2010 14:02:32 +0200
- Subject: RE: Stack backtrace for ARM/Thumb
- References: <AC090B9732AB2B4DB7FF476E907FE66001069E5780@dnce02.ent.ti.com> <4C4D5134.4090807@redhat.com>
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.