This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: .eh_frame vs. .debug_frame register encoding
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: schwab at suse dot de
- Cc: gdb-patches at sourceware dot org
- Date: Tue, 9 May 2006 21:57:46 +0200 (CEST)
- Subject: Re: .eh_frame vs. .debug_frame register encoding
- References: <jelktb1ee9.fsf@sykes.suse.de>
> 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.