Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: Daniel Jacobowitz <drow@mvista.com>, Kevin Buettner <kevinb@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [RFA] Limited DW_OP_piece support
Date: Thu, 22 May 2003 21:42:00 -0000	[thread overview]
Message-ID: <1030522214223.ZM31427@localhost.localdomain> (raw)
In-Reply-To: Daniel Jacobowitz <drow@mvista.com> "Re: [RFA] Limited DW_OP_piece support" (May 22,  5:29pm)

On May 22,  5:29pm, Daniel Jacobowitz wrote:

> On Thu, May 22, 2003 at 02:19:31PM -0700, Kevin Buettner wrote:
> > On May 22,  2:19pm, Daniel Jacobowitz wrote:
> > 
> > > On Thu, May 22, 2003 at 10:00:39AM -0700, Kevin Buettner wrote:
> > > > The patch below adds limited DW_OP_piece support to dwarf2expr.c.  I
> > > > will post a patch to rs6000-tdep.c which illustrates what a
> > > > ``dwarf2_compose_register_pieces'' method should look like.
> > > > 
> > > > Okay?
> > > 
> > > I would really strongly prefer that we not do it this way.
> > > 
> > > You'll notice that there are no other gdbarch calls in the expression
> > > evaluator.  There might be some implicit ones through macros, for
> > > instance there is TARGET_ADDR_BIT.  That needs to be fixed properly
> > > some day already.
> > > 
> > > Instead, IMHO, we should devise a way to represent multiple locations
> > > in the evaluator's return value.  This is not suggesting the complete
> > > overhaul that we need to support multiple locations in the rest of GDB.
> > > Then have the expression evaluator properly return a list of locations,
> > > and have the massaging done via gdbarch in the evaluator's client. 
> > > Does that sound reasonable?
> > 
> > I must admit that it sure sounded reasonable when I first read it. 
> > I've been looking at the code to see how doable it is, and it's
> > looking less reasonable to me now.  It appears to me that there are
> > multiple clients and it seems ugly to do the massaging that you speak
> > of in multiple places.  (Or perhaps I misunderstand who the client
> > is?)
> 
> I'm suggesting that the massaging be done in the caller of
> dwarf_expr_eval.  There are three of them at present: one which only
> cares about whether we need a frame, and two for locations.  One's the
> frame base, and the other's via dwarf2_evaluate_loc_desc.
> 
> For the moment, I believe everything you need could be done in
> dwarf2_evaluate_loc_desc.  The frame base will not (on current
> platforms, etc.) use DW_OP_piece, and that call should be going away
> anyway.  There will be more calls, as we use the evaluator for more,
> but it's not clear how they should react to DW_OP_piece.
> 
> Another alternative is to do it in dwarf_expr_eval.  This would
> probably want us to separate it into two functions: one for evaluating
> an expression as a location, and one otherwise.  i.e. there are times
> when DW_OP_piece should be handled, and times when it is not valid. 
> They can have different return signatures.
> 
> Does that make more sense?

Yeah.  I was going too far up the stack.

Thanks,

Kevin


      reply	other threads:[~2003-05-22 21:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-22 17:00 Kevin Buettner
2003-05-22 17:53 ` Andrew Cagney
2003-05-22 18:30   ` Kevin Buettner
2003-05-22 18:42     ` Andrew Cagney
2003-05-22 18:19 ` Daniel Jacobowitz
2003-05-22 21:21   ` Kevin Buettner
2003-05-22 21:29     ` Daniel Jacobowitz
2003-05-22 21:42       ` Kevin Buettner [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=1030522214223.ZM31427@localhost.localdomain \
    --to=kevinb@redhat.com \
    --cc=drow@mvista.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