Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: Brian Ford <ford@vss.fsi.com>
Cc: Eli Zaretskii <eliz@gnu.org>, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp)
Date: Mon, 05 Apr 2004 23:38:00 -0000	[thread overview]
Message-ID: <vt2llla2e03.fsf@zenia.home> (raw)
In-Reply-To: <Pine.GSO.4.58.0404051748340.21204@thing1-200>


Brian Ford <ford@vss.fsi.com> writes:
> On Mon, 5 Apr 2004, Jim Blandy wrote:
> > For the first question: I think your original patch is correct.
> 
> Me too ;-).
> 
> ... I still propose we rename the _to_regnum functions, replacing
> stabs and dwarf with dbx and svr4 to reduce confusion.  I'll be happy to
> make a patch :-).

I agree that would be better.

(I should make it clear that I can't approve this patch.  We need Mark
Kettenis's okay.)

> > For the second question, about what register numbering to use in
> > Cygwin Dwarf 2:
> >
> > We agree that there are no toolchains, other than the one we're
> > putting together right now, that uses Dwarf 2 in PE, right?
> > So we could choose any numbering we please without introducing
> > incompatibilities with any existing toolchain.  I'm not talking about
> > what would be most consistent yet; I'm just observing that we wouldn't
> > misread any prior existing compiler's output, or misdirect any prior
> > existing debugger.
> 
> To my *very* limited knowledge, yes.
> 
> > So what would b the most consistent numbering to use?  It's been said
> > that "Dwarf 2 uses svr4_dbx_register_map."  This is true, but it's
> > incomplete.
> 
> True except for DJGPP?
> 
> > The big picture, I think, is this:
> >
> > - GCC doesn't switch register numberings depending on the debug format
> >   in use (except on rs6000).  For a given GCC, -gstabs+ and -gdwarf-2
> >   use the same numberings.
> >
> > - Dwarf 2 is mostly widely used on ELF systems, which almost all use
> >   svr4_dbx_register_map --- for both STABS and Dwarf 2.
> >
> > The statement "Dwarf 2 uses svr4_dbx_register_map" suggests that there
> > would be targets that use svr4_dbx_register_map with Dwarf 2, but a
> > different map for other debug formats.  But that's the exception (the
> > rs6000), not the rule.  In fact, it looks to me as if DJGPP uses
> > dbx_register_map for both STABS and Dwarf 2.  (Eli, is this right?)
> 
> It looks like that to me too.  But, if that were the case, and the backend
> had not coded around these bugs, I don't see how it could be working.
> That is why we are stuck in these tangential DJGPP ramblings.

Right.  I'm really wondering how DJGPP Dwarf 2 works at this point.

> > It's true that the comments for svr4_dbx_register_map in
> 
> Just svr4_register_map (so noone gets confused).

Really?  I'm looking at revision 1.660 of gcc/config/i386/i386.c, like
657:

int const svr4_dbx_register_map[FIRST_PSEUDO_REGISTER] =

Not to be "back-atcha" or anything like that; this is just such a maze
of twisty little...

> > gcc/config/i386/i386.c say:
> >
> >   /* Define the register numbers to be used in Dwarf debugging information.
> >
> > but this comment doesn't match the code it accompanies: every i386 GCC
> > configuration uses either dbx_register_map or svr4_dbx_register_map
> > for both debug formats.
> 
> Agreed.  I'm happy to stick with dbx_register_map on Cygwin for all debug
> formats if a version of my patch is accepted.  DWARF 2 (and STABS) will
> work fine then.  And, I'd be glad to help Eli sort through the
> ramifications, since his is just about the only target to be affected.

Sounds great.


  reply	other threads:[~2004-04-05 23:38 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-04-01  0:11 Brian Ford
2004-04-01 17:22 ` Jim Blandy
2004-04-01 18:00   ` Brian Ford
2004-04-01 21:29     ` Jim Blandy
2004-04-01 22:54       ` Brian Ford
2004-04-02  7:45         ` Eli Zaretskii
     [not found]           ` <Pine dot GSO dot 4 dot 58 dot 0404021000390 dot 21204 at thing1-200>
     [not found]             ` <2719-Fri02Apr2004213907+0300-eliz at gnu dot org>
     [not found]               ` <Pine dot GSO dot 4 dot 58 dot 0404021648050 dot 21204 at thing1-200>
2004-04-02 17:31           ` Brian Ford
2004-04-02 19:42             ` Eli Zaretskii
2004-04-02 23:15               ` Brian Ford
2004-04-03  9:08                 ` Eli Zaretskii
2004-04-05 18:18                   ` Jim Blandy
2004-04-05 21:57                     ` Brian Ford
2004-04-18 16:33                       ` Eli Zaretskii
2004-04-05 18:21                   ` Jim Blandy
2004-04-05 22:46                   ` Brian Ford
2004-04-18 17:00                     ` Eli Zaretskii
2004-04-05 22:46                 ` Jim Blandy
2004-04-05 23:19                   ` Brian Ford
2004-04-05 23:38                     ` Jim Blandy [this message]
2004-04-06 14:53                       ` Brian Ford
2004-04-15  9:38                         ` Eli Zaretskii
2004-04-06 23:24                     ` Mark Kettenis
2004-04-07 16:25                       ` Brian Ford
2004-04-07 18:02                         ` Jim Blandy
2004-04-07 20:06                       ` [PATCH] Rename i386_xxx_reg_to_regnum Brian Ford
2004-04-07 20:48                         ` Jim Blandy
2004-04-07 21:06                           ` Brian Ford
2004-04-07 21:41                             ` Jim Blandy
2004-04-09 12:37                               ` Mark Kettenis
2004-04-09 17:49                                 ` Brian Ford
2004-04-06 23:23                   ` [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp) Mark Kettenis
2004-04-07 16:46                     ` Jim Blandy
2004-04-18 16:48                   ` Eli Zaretskii
2004-04-19  2:06                     ` ix86 PE/COFF DWARF register numbering (was Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp)) Brian Ford
2004-04-19  5:59                       ` Eli Zaretskii
2004-04-19 16:34                         ` ix86 PE/COFF DWARF register numbering Brian Ford
2004-04-19 12:42                     ` [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp) Jim Blandy
2004-04-19  7:02                       ` Eli Zaretskii
2004-04-02 19:33           ` Eli Zaretskii
2004-04-02 22:47             ` Brian Ford

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=vt2llla2e03.fsf@zenia.home \
    --to=jimb@redhat.com \
    --cc=eliz@gnu.org \
    --cc=ford@vss.fsi.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox