delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2001/07/28/14:30:56

Date: Sat, 28 Jul 2001 14:30:54 -0400
Message-Id: <200107281830.OAA31402@delorie.com>
X-Authentication-Warning: delorie.com: eliz set sender to eliz AT delorie DOT com using -f
From: Eli Zaretskii <eliz AT delorie DOT com>
To: djgpp-workers AT delorie DOT com
Subject: [kettenis AT wins DOT uva DOT nl: Re: i386 register numbering]
Reply-To: djgpp-workers AT delorie DOT com

Per the attached, it sounds like GCC in its DJGPP port uses a register
naming scheme for DWARF2 that is different from other popular targets.
We need to decide whether to modify GCC or introduce a DJGPP-specific
remapping in GDB.  It's not hard to remap in GDB, but as Mark Kettenis
says, using a naming scheme no one esle sues might be problematic in
the long run.

Opinions?

PS. We should try to decide as quickly as possible, since GDB is going
to cut a 5.1 release branch in a few days.

------- Start of forwarded message -------
Date: Sat, 28 Jul 2001 20:02:07 +0200
From: Mark Kettenis <kettenis AT wins DOT uva DOT nl>
To: eliz AT is DOT elta DOT co DOT il
CC: gdb AT sources DOT redhat DOT com
In-reply-to: <200107281214 DOT IAA07439 AT delorie DOT com> (message from Eli Zaretskii
	     on Sat, 28 Jul 2001 08:14:26 -0400)
Subject: Re: i386 register numbering
Content-Type: text
Content-Length: 1349

   Date: Sat, 28 Jul 2001 08:14:26 -0400
   From: Eli Zaretskii <eliz AT delorie DOT com>

   DJGPP supports 3 debug info formats: COFF, stabs, and (lately) DWARF2;
   the default is COFF.  (Btw, I don't see any COFF_REG_TO_REGNUM.)  I'm
   guessing that no one (including myself ;-) bothered to review the
   register naming scheme when support for stabs and DWARF2 was added...

With the patch that I just checked in, COFF and stabs should do the
right thing for DJGPP.  DWARF2 will probably still give you the wrong
register.  You might want to consider changing GCC such that it uses
the standard Dwarf renumbering for DWARF2.  I don't think it really
matters since there aren't any native tools that you need to be
compatible with.  On the other hand, using DWARF2 with a numbering
scheme that nobody else uses, might trigger some bugs.
If you don't change GCC you should probably override
DWARF2_REG_TO_REGNO in config/i386/tm-go32.h.

   But there's something in your explanation that I don't get: if GCC
   always uses the same scheme, no matter what the debug info, and since
   all i386 targets use the same i386.h header which defines this scheme,
   how come DJGPP can use something different than the other targets?
   What am I missing?

Several GCC targets redefine DBX_REGISTER_NUMBER, see for example
linux.h in that same directory.

Mark
------- End of forwarded message -------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019