This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC 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: [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
> 


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