This is the mail archive of the gdb@sourceware.org mailing list for the GDB 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]

Reg: Bug 10310. Backtrace on stripped executables in some arm architecture with pc offset of 12


Hi,
Pasting my last comment in the bug 10310 at the bottom. Where
backtraces on stripped object files were not working for our platform.
The change was in the stack unwinding code.

Can someone tell me if we can make a change for this in gdb? Changing
the offset 8 is not the right way. But is there some other way to
support offset 12 in gdb? Some ifdef or gdb compile time options?



-Karthik

------- Additional Comments From informkarthik at gmail dot com
2009-06-29 09:43 -------
We figured out that this is specific to our target. There were two things that
we had to do.
1) Enable apcs-frame option for gcc.
2) Change the program counter correction to 12 (instead of 8). This is machine
specific.
--- gdb/arm-tdep.c.orig 2009-06-29 15:14:52.000000000 +0530
+++ gdb/arm-tdep.c ? ? ?2009-06-29 14:46:41.000000000 +0530
@@ -1366,7 +1366,7 @@
? ? ? else
? ? ? ? {
? ? ? ? ? prologue_start = gdbarch_addr_bits_remove
- ? ? ? ? ? ? ? ? ? ? ? ? ? ?(gdbarch, return_value) - 8;
+ ? ? ? ? ? ? ? ? ? ? ? ? ? ?(gdbarch, return_value) - 12;
? ? ? ? ? prologue_end = prologue_start + 64; ?/* See above. ?*/
? ? ? ? }
? ? }

3) I think we need a comment in arm_scan_prologue, that one needs correction of
12 in some architectures for stack unwinding to work. Do we have any compiler
flags that we can use to incorporate this as a feature that the user can set
while compiling?


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