Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
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: Wed, 30 Apr 2003 03:37:00 -0000	[thread overview]
Message-ID: <20030429150810.GA12043@nevyn.them.org> (raw)
In-Reply-To: <3EAE8C6B.2050403@redhat.com>

On Tue, Apr 29, 2003 at 10:30:03AM -0400, Andrew Cagney wrote:
> 
> >>>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.
> >
> >>
> >>(are you sure you're refering to the correct architectures here?)
> >
> >
> >Absolutely.
> 
> The MIPS/i386 in the above be interpreted as i386 VS long long and not 
> i386/x86-64.  The reword below clarified it.
> 
> > I know the e500 situation (limited form of DW_OP_piece for
> >64-bit registers), and both MIPS/MIPS and x86-64/i386 are trying to
> >expose the same register in multiple ways.
> 
> All three require a projection such that, assumed contigious, debug info 
> registers project onto raw registers.  Isn't this what i386 has?

I don't think so.  All three need a view of registers slightly
different from the "normal" one, but they don't have "assumed
contiguous debug info registers".  In fact in e500 they're assumed
not-contiguous.

> >>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.
> >
> >>
> >>Going back to an earlier point it contains an i386 specific problem to 
> >>the i386.  That way yet another hack doesn't get in the core code. 
> >>However, the knowledge of needing to handle that case does.
> >
> >
> >If the choice is:
> >  - contain an i386 specific problem to i386 specific code by using a
> >    hack
> 
> You mean that the cooked->raw mechanism is a hack?

As I said above, the mechanism isn't.  This use of it is.

> >  - provide a general, well-defined mechanism that at least now we only
> >    need for i386
> 
> (and I'm calling it a quick and tempoary hack, because it isn't the 
> final solution)

Why not?  This is my view of the road:
  - If we have multiple parts reported for a variable's location, use
    that.
  - Otherwise if the variable fits in the reported location, just use
    that.
  - Otherwise, use a defined mechanism to guess where the next part is.
    Instead of assuming "oh, it's a register, the next part must be
    in register <this + 1>", which isn't true.  Instead of fudging the
    regcache using cooked->raw in order to make this invalid assumption
    appear true.

> GDB can't afford to accumulate yet more mechanisms just on the off 
> chance that a second architecture might just happen to need it.  This is 
> how GDB ended up with so many architecture methods used by 1 (then zero) 
> targets (what's the harm in #define ...; #ifdef ...?).  Instead, where 
> possible, target dependand code should start out by using existing 
> mechanisms; while the core is extended to use a more complete solution.

The "more complete solution" won't solve the problem for the debug info
we have today.  That'll be around for a very long time.  I'm more
worried about the fragility of doing complex things with the regcache,
which will have a maintenance cost every time we (you?) work on the
regcache.  When we could just do a simple method with low to no
maintenance cost.

Why _not_ acquire this mechanism?  There's only a problem with buildup
of not-thought-out and not-well-documented mechanisms, and this doesn't
have to be either.

> >I suppose I could mark both versions of %eax saved in i386's
> >frame_get_saved_regs to fix the immediate problem...
> 
> That is what was done (minus possible missed edge cases).
> 
> Being able to project cooked onto raw registers at the frame level, 
> should simplify this.

OK.  If I ever get frustrated/bored enough, I'll try to fix the patch I
posted.

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer


  reply	other threads:[~2003-04-29 15:08 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
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 [this message]
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=20030429150810.GA12043@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