GDB without traditional frames

Andrew Cagney ac131313@redhat.com
Thu Sep 25 02:02:00 GMT 2003


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



More information about the Gdb mailing list