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


> Date: Sun, 27 Nov 2005 23:07:16 +0800
> From: Randolph Chung <randolph@tausq.org>
> 
> > If we change the register use in .dwarf_frame, then we are breaking
> > compatibility with previously compiled code.  This isn't a big deal
> > under HP-UX (dwarf debugging was totally broken on hppa64 until a
> > recent assembler fix).  However, there is a fair bit of installed
> > code running linux.  Thus, I would say not change the status quo
> > if the above confusion can be handled.  The actual numbers used for
> > the FP registers are obscure and I doubt many people actually care
> > what they are.  It's only people maintaining the dwarf code that
> > are likely to get confused.  If readelf produced a text rather than
> > numeric representation, then the problem would largely go away.
> 
> If I understand Mark correctly, the suggestion would change the 
> numbering used for dwarf cfi/eh, but not the register numbers emitted 
> for .debug_info, right?

Sorry no.  I propose to use DWARF2_FRAME_REG_OUT() on hppa and hppa32
to change the register numbers for .dwarf_frame to match the ones in
.dwarf_info for ages, and leave .eh_frame alone.  We can't change the
numbers in .eh_frame because that will break binary compatibility for
(C++) exception handling.  It's really silly for .dwarf_info and
.dwarf_frame to use different register numbers.  The fact that on hppa
there is no ABI that defines these register numbers doesn't really
change the argument I made for powerpc.

> FWIW currently on hppa-linux, gdb does not use dwarf cfi for frame 
> unwinding. It's on my list of things to do, but if something need 
> changing in gcc for whatever reason, now is a good time to do it as far 
> as I'm concerned.

Indeed, so the impact of changing the register numbers should be
small.  In addition it doesn't affect the integer registers.  Some
people might have old object modules around that contain the wrong
register numbers, but they'll only affect floating-point registers
which probably don't show up in CFI a lot anyway.

Mark


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