This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RE: [cygwin/mingw32] DBX_REGISTER_NUMBER vs DWARF2_FRAME_REF_OUT
- From: Danny Smith <dannysmith at clear dot net dot nz>
- To: 'Mark Kettenis' <mark dot kettenis at xs4all dot nl>
- Cc: gcc at gcc dot gnu dot org
- Date: Fri, 28 Jul 2006 14:06:52 +1200
- Subject: RE: [cygwin/mingw32] DBX_REGISTER_NUMBER vs DWARF2_FRAME_REF_OUT
> > Date: Thu, 27 Jul 2006 09:46:36 +1200
> > From: Danny Smith <dannysmith@clear.net.nz>
> >
> > From: Mark Kettenis
> > Sent: Thursday, July 27, 2006 9:34 AM
> >
> > > The best thing to do is probably to define
> > > DWARF2_FRAME_REG_OUT to always use the SVR4 register map.
> >
> > Thanks for that advice. I'm in process of testing with
> > the simple one-line change:
> >
> > #define DBX_REGISTER_NUMBER(n) svr4_dbx_register_map[n]
>
> That'd be bad, since it will break debugging code compiled
> with -gstabs in a very confusing way. And it would be
> impossible to fix in GDB without screwing over people that
> are still using older versions of GCC.
>
It certainly is bad.
This hasn't caused any problems yet.
/* Maintain compatibility with old -gstabs code. */
#undef DBX_REGISTER_NUMBER
#define DBX_REGISTER_NUMBER(n) (write_symbols == DWARF2_DEBUG \
? svr4_dbx_register_map[(n)]
\
: dbx_register_map[(n)])
/* Map gcc register number to DWARF 2 CFA column number.
Always use the svr4_dbx_register_map for DWARF .eh_frame even
if we don't use DWARF for debugging. */
#undef DWARF_FRAME_REGNUM
#define DWARF_FRAME_REGNUM(n) svr4_dbx_register_map[(n)]
Danny
> Mark
>