From: Brian Ford <ford@vss.fsi.com>
To: Eli Zaretskii <eliz@gnu.org>
Cc: jimb@redhat.com, gdb-patches@sources.redhat.com
Subject: Re: [PATCH] i386_stab_reg_to_regnum (4 <-> 5, ebp <-> esp)
Date: Fri, 02 Apr 2004 22:47:00 -0000 [thread overview]
Message-ID: <Pine.GSO.4.58.0404021616220.21204@thing1-200> (raw)
In-Reply-To: <6654-Fri02Apr2004213037+0300-eliz@gnu.org>
On Fri, 2 Apr 2004, Eli Zaretskii wrote:
> > Some time ago I did find a problem in register numbering, and IIRC it
> > was fixed, although I don't recall the details and don't see anything
> > in the logs.
>
> Found it. See the thread started by this message:
>
> http://sources.redhat.com/ml/gdb/2001-07/msg00392.html
>
Thanks. Things sure have changed since then, haven't they ;-).
Some comments:
> (Btw, I don't see any COFF_REG_TO_REGNUM.)
>
Now that is set_gdbarch_sdb_reg_to_regnum, and it uses
i386_stab_reg_to_regnum.
Mark Kettenis wrote:
> With the patch that I just checked in, COFF and stabs should do the
> right thing for DJGPP.
>
Um..., except the ebp <-> esp thing.
> DWARF2 will probably still give you the wrong
> register.
>
Yup. I don't see that you fixed that.
> 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.
>
Precisely my reasoning (what do ya think, Jim?).
> If you don't change GCC you should probably override
> DWARF2_REG_TO_REGNO in config/i386/tm-go32.h.
>
You would now do that by calling set_gdbarch_dwarf2_reg_to_regnum in
i386_go32_init_abi with i386_stab_reg_to_regnum as the argument.
Andrew Cagney wrote:
> Yep.
>
> They map a stab/dwarf/... reg onto a cooked regnum (not to be confused
> with a raw reg found in the register cache). Because the i386
> implements its registers using the old PSUEDO / CONVERT stuff, the
> importance of differentiating between the two may not be obvious.
>
Wish I knew how all this cooked regnum stuff worked. That's why I can't
figure out a testcase for you. If it's internally cooked wrong, but
straightened out by the back end, how do you tell?
> There is something here I don't get either.
>
> At present it is assumed that, for a given ISA/ABI, there is only one
> mapping from a DEBUG reg to a REGNUM. I take it, Mark, that you're
> saying that in reality, the mapping depends on all of:
>
> (compiler, object format, debug format, ISA/ABI) (debug reg) -> REGNUM
>
> True? Ulgh!
>
True, and I think all the hooks are there to accomodate this. They just
aren't all fully used/consistent yet.
--
Brian Ford
Senior Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
Phone: 314-551-8460
Fax: 314-551-8444
prev parent reply other threads:[~2004-04-02 22:47 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
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 [this message]
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=Pine.GSO.4.58.0404021616220.21204@thing1-200 \
--to=ford@vss.fsi.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sources.redhat.com \
--cc=jimb@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