From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@redhat.com>
Cc: Mark Kettenis <kettenis@chello.nl>,
colins@google.com, gdb-patches@sources.redhat.com
Subject: Re: re-ordered i386 regcache
Date: Tue, 29 Apr 2003 04:45:00 -0000 [thread overview]
Message-ID: <20030428233106.GA7307@nevyn.them.org> (raw)
In-Reply-To: <3EADB095.2090409@redhat.com>
On Mon, Apr 28, 2003 at 06:52:05PM -0400, Andrew Cagney wrote:
> [I changed subjects, this thread is too long]
>
> >On Mon, Apr 28, 2003 at 12:37:12PM -0400, Andrew Cagney wrote:
> >
> >>Hmm, I think it will be needed anyway, what happens when the user is
> >>debugging an i386 mode function (with 32 bit register based long long
> >>debug info) on an x86-64 target? That's the MIPS problem, and it needs
> >>that projection(1).
> >>
> >>Also, the next_regnum method assumes that all debug infos use the same
> >>register sequencing.
> >>
> >>A word of caution though, the projection, at the register level works.
> >>Frame's might need tweaking. The alternative is to start out with
> >>deprecated_next_regnum so that it is clear where this stands.
> >
> >
> >Here's a discussion piece. I've implemented your suggestion. Two
> >notes:
> > - Having done it, I still don't like it :) Using the register cache
> >in this way seems very wrong to me.
>
> Got another way of getting MIPS (32 on 64), i386 on x86-64 (or even
> ia64?), e500 on PPC, sh4 on sh64, ... all working?
What problem besides the REGISTER_BYTE() problem are you solving with
this mechanism?
Of the above, at least the e500 issues I consider to be completely
different; that's dealing with a very particular set of debug info that
only has part of the register. That's a handy thing to solve in the
register cache. Besides, it doesn't play sequential-register-numbering
tricks. That was the whole point - the other numbers are way off in
the 1200 range.
I'd say the MIPS/i386 issues are also more like e500 than like this
debug info ordering problem that we're talking about here.
I'm not dismissing the value of the powerful pseudo technique that
you've put together. It's really handy. I just don't think it's the
answer to this problem.
> > - It doesn't work for frames, because by the time
> >i386_pseudo_register_read is called the regcache is always
> >current_regcache. I believe this is because of
> >legacy_saved_regs_prev_register:
> >
> >975 if (get_frame_saved_regs (frame) != NULL
> >976 && get_frame_saved_regs (frame)[regnum] != 0)
> >
> >I guess doing this much without doing the rest of the conversion makes
> >the frame machinery quite sad.
>
> Should there be a frame equivalent to the regcache's cooked->raw
> projection? Should the read side of the cooked->raw projection be moved
> to the frame?
>
> Note that things like the m68hc11 some of the cooked registers are
> mapped onto memory so the cooked->raw writes would likely still need to
> remain.
Hmm, certainly something will have to change. Invoking
gdbarch_pseudo_register_read on the current regcache when we're
actually several frames away doesn't respond right. It seems to me
that moving the logic such that gdbarch_pseudo_register_read takes a
frame parameter might work better, but I'm not sure of the
implications.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer
next prev parent reply other threads:[~2003-04-28 23:31 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-25 0:27 patch for printing 64-bit values in i386 registers; STABS format Colin Smith
2003-04-25 2:07 ` Daniel Jacobowitz
2003-04-25 22:18 ` Mark Kettenis
2003-04-25 22:24 ` Daniel Jacobowitz
2003-04-26 3:05 ` Andrew Cagney
2003-04-26 3:20 ` Daniel Jacobowitz
2003-04-26 3:32 ` Andrew Cagney
2003-04-26 3:39 ` Daniel Jacobowitz
2003-04-26 8:25 ` Andrew Cagney
2003-04-27 3:47 ` Daniel Jacobowitz
2003-04-28 15:22 ` Mark Kettenis
2003-04-28 16:09 ` Andrew Cagney
2003-04-28 16:14 ` Daniel Jacobowitz
2003-04-28 16:15 ` Andrew Cagney
2003-04-28 16:37 ` Daniel Jacobowitz
2003-04-28 19:26 ` Andrew Cagney
2003-04-28 22:47 ` Daniel Jacobowitz
2003-04-29 2:15 ` re-ordered i386 regcache Andrew Cagney
2003-04-29 4:45 ` Daniel Jacobowitz [this message]
2003-04-29 14:30 ` Andrew Cagney
2003-04-29 15:08 ` Daniel Jacobowitz
2003-04-29 15:25 ` Andrew Cagney
2003-04-30 3:37 ` Daniel Jacobowitz
2003-04-30 14:28 ` Andrew Cagney
2003-04-30 18:20 ` Daniel Jacobowitz
2003-04-28 20:06 ` Re: patch for printing 64-bit values in i386 registers; STABS format Colin Smith
2003-04-28 0:51 ` Mark Kettenis
2003-04-28 16:18 ` Andrew Cagney
2003-04-28 17:30 ` Daniel Jacobowitz
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=20030428233106.GA7307@nevyn.them.org \
--to=drow@mvista.com \
--cc=ac131313@redhat.com \
--cc=colins@google.com \
--cc=gdb-patches@sources.redhat.com \
--cc=kettenis@chello.nl \
/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