This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
Re: Register numbers on hppa64
- From: Mark Kettenis <mark dot kettenis at xs4all dot nl>
- To: dave at hiauly1 dot hia dot nrc dot ca
- Cc: randolph at tausq dot org, gdb at sources dot redhat dot com, brobecker at adacore dot com
- Date: Sat, 26 Nov 2005 18:34:05 +0100 (CET)
- Subject: Re: Register numbers on hppa64
- References: <200511261652.jAQGqY9Y023338@hiauly1.hia.nrc.ca>
> Date: Sat, 26 Nov 2005 11:52:34 -0500 (EST)
> From: "John David Anglin" <dave@hiauly1.hia.nrc.ca>
>
> One bit in gcc bothers me. If we didn't define DWARF_FRAME_REGNUM
> (i.e., used the dbx default), it appears we could map the dbx numbers
> to frame numbers using DWARF2_FRAME_REG_OUT. The two techniques
> appear redundant unless we actually need to define DWARF2_FRAME_REG_OUT
> to map dbx numbers to frame numbers (i.e., the documentation is
> wrong about the numbers being collected using DWARF_FRAME_REGNUM).
> In the rs6000 sysv4.h case, DWARF_FRAME_REGNUM is also the gcc hard
> registers but it appears that the ABIs mandate numbers for .debug_frame,
> so a remapping is needed. In our case, we don't have an ABI...
But we have a de-facto ABI since GCC has been using
DBX_REGISTER_NUMBER for all non-CFI DWARF2 output. I never noticed
DWARF2_FRAME_REG_OUT before, but it seems to implement a suggestion I
made in the ppc64 discussion. Now that it's there I really think you
should consider using it for hppa/hppa64 too. Something like
#define DWARF2_FRAME_REG_OUT(REGNO, FOR_EH) \
((FOR_EH) ? (REGNO) : DBX_REGISTER_NUMBER (REGNO)
if pa32-reg.h and pa64-reg.h should be enough.
Meanwhile, I should get busy and implement the necessary support in
gdb to cope with the fact that .debug_frame has a different encoding
than .eh_frame.
Mark