This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
GDB without traditional frames
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: gdb at sources dot redhat dot com
- Date: Wed, 24 Sep 2003 22:02:22 -0400
- Subject: GDB without traditional frames
Hello,
As an accademic exercise I decided to see what would happen if a PPC64
GDB was configured to only use dwarf2 cfi (just disable the trad-frame
code).
The short answer is "it works (mostly)".
The long answer is ...
It relies on there being 100% coverage of the CFI. System libraries can
sometimes be lacking. Assembler stubs, for instance, will trip things
up. Irony here is that it's those same assembler routines that trip up
traditional unwinders. Anyway, an unwinder capable of unwinding just LR
works pretty well.
GCC CFI leaves registers as "unspecified" and the "assume same value"
hack isn't sufficient. For PPC64, GCC points the "return_column" at
dwarf2 num 65 (that's the FPSCR but lets ignore that m'key :-). It
needs to specify that by default the "return_column" has the same value
as the "LR" column.
So while trad unwind code is useful, I think it can now be considered
largely optional.
I've got more GCC bugs to file :-)
enjoy,
Andrew