.eh_frame vs. .debug_frame register encoding
Mark Kettenis
mark.kettenis@xs4all.nl
Tue May 9 19:58:00 GMT 2006
> From: Andreas Schwab <schwab@suse.de>
> Date: Tue, 09 May 2006 16:06:22 +0200
>
> On powerpc the register encoding inside .eh_frame differs from the one in
> .debug_frame. The former is using GCC internal numbering, whereas the
> latter is (of course) using the DWARF numbering. So when gdb is reading
> .eh_frame it needs to translate the register numbers (one important
> difference is that the lr register has a different encoding). This is a
> prerequisite for using the DWARF CFI unwinder on powerpc.
Looks reasonable to me.
> 2006-05-09 Andreas Schwab <schwab@suse.de>
>
> * dwarf2-frame.c (struct dwarf2_fde): Add eh_frame_p.
> (execute_cfa_program): Add parameter eh_frame_p. Call
> dwarf2_frame_eh_frame_regnum when true.
> (dwarf2_frame_cache): Pass eh_frame_p from fde to
> execute_cfa_program.
> (decode_frame_entry_1): Call dwarf2_frame_eh_frame_regnum when
> processing .eh_frame. Copy eh_frame_p to the new fde.
> (struct dwarf2_frame_ops): Add eh_frame_regnum.
> (dwarf2_frame_set_eh_frame_regnum): Define.
> (dwarf2_frame_eh_frame_regnum): Define.
>
> * dwarf2-frame.h (dwarf2_frame_set_eh_frame_regnum): Declare.
> (dwarf2_frame_eh_frame_regnum): Declare.
More information about the Gdb-patches
mailing list