This is the mail archive of the gdb@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Register numbers on hppa64


> It looks like we need some
> GCC_DEVELOPERS_DONT_THINK_BEFORE_THEY_CODE_MAP_REG_TO_REGNUM mapping.
> (sorry Dave) Sigh....
~

> > I wrote that code... :) but I think it's actually wrong; for 32-bit we 
> > have a 1:1 mapping between what gcc outputs for "dbx" register numbers 
> > in dwarf debug mode and the gdb internal register numbering, so we 
> > shouldn't need this mapping function for 32-bit.
> 
> No, even for 32-bit stuff there is a mapping:
> 
> /* How to renumber registers for dbx and gdb.
> 
>    Registers 0  - 31 remain unchanged.
> 
>    Registers 32 - 87 are mapped to 72 - 127
> 
>    Register 88 is mapped to 32.  */
> 
> But you're right, it's not right to use this encoding for decoding
> DWARF CFI since that uses the a different mapping (but that mapping
> isn't 1:1).

I believe that we have a 1:1 mapping between gcc's frame and dbx
numbers at the moment.  I haven't fully thought this through but
the save state contains information that we don't currently
copy to the frame state.  We could record this frame state data
if there was a way to restore it.  Thus, I don't believe that
gcc's sets of frame and dbx registers have to be the same.  For
example, there is no direct way in gcc to set the floating point
status registers.

Dave
-- 
J. David Anglin                                  dave.anglin@nrc-cnrc.gc.ca
National Research Council of Canada              (613) 990-0752 (FAX: 952-6602)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]