Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Stan Shebs <stan@codesourcery.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Stan Shebs <stan@codesourcery.com>,
	gdb-patches@sourceware.org,  Jan Kratochvil <jkratoch@redhat.com>
Subject: Re: RFC: implement DW_OP_bit_piece
Date: Thu, 20 May 2010 03:29:00 -0000	[thread overview]
Message-ID: <4BF48941.4090500@codesourcery.com> (raw)
In-Reply-To: <m3632j79fw.fsf@fleche.redhat.com>

Tom Tromey wrote:
> I am less sanguine about updating the tracepoint code, I suppose because
> it is pretty new and yet doesn't implement even what was already in gdb
> when it went in:
>
> 	  if (bytes != 4)
> 	    error (_("DW_OP_piece %s not supported in location for \"%s\"."),
> 		   pulongest (bytes), SYMBOL_PRINT_NAME (symbol));
>   

Touche'  :-)

> I did dig around in the code a little, and it turns out I'm also not
> clear on all the details I would need to implement the support.
>
> I don't really see how DWARF expressions can work with the current
> setup.  Maybe just some subset can -- but then I would like to
> understand how the subset is chosen, I guess so I can argue against
> choosing DW_OP_bit_piece ;-).  Ok, seriously...
>
> For instance, I don't understand how a DWARF expression involving a
> conditional could work.  You could compile DWARF to AX, including the
> condition.  But then I think you'd have to circumvent the DWARF
> expression when re-evaluating the expression at "replay" time (I don't
> know the real name of the mode, sorry).
>
>   

In theory, evaluation of the expression while examining a trace frame 
will just work, because the DWARF condition will evaluate to the same 
value as it would have when looking at the live state.

> GCC is already emitting nontrivial DWARF.  It can emit some stack ops
> (look at the MOD case in dwarf2out.c).  It can emit pieces and stack and
> literal values.  And, I think it can emit TLS references.  So this is
> not just hypothetical, today's expression translation is already
> insufficient for today's GCC.
>   

We've been special-casing things in the ax code as they've come along in 
real compiler output - your mention of bit pieces got my attention 
because it sounded like tracepoint test cases could start regressing if 
someone updated their GCC.

But yeah, this is the kind of thing that gets us to start muttering 
again about the common compilation / evaluation pathway idea.  
CodeSourcery's tracepoint work has already been decided for this year, 
and the closest related task is going to be some better handling of 
partially-collected values.  But now is a good time to start thinking 
about what we should do in 2011; I can see things getting to the point 
where the common pathway is the easiest strategy for coping with 
ever-more-complex debug info from GCC.

Stan


  reply	other threads:[~2010-05-20  0:59 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-18 23:43 Tom Tromey
2010-05-19 14:16 ` Stan Shebs
2010-05-19 23:35   ` Tom Tromey
2010-05-20  3:29     ` Stan Shebs [this message]
2010-05-20  5:10       ` Tom Tromey
2010-05-20  7:12         ` Tom Tromey
2010-05-26 22:41           ` Tom Tromey
2010-06-03 20:12             ` RFA: rewrite dwarf->ax translator (Was: RFC: implement DW_OP_bit_piece) Tom Tromey
2010-06-08 20:45               ` RFA: rewrite dwarf->ax translator Tom Tromey
2010-06-11 15:20                 ` Tom Tromey
2010-06-08 20:52               ` RFA: rewrite dwarf->ax translator (Was: RFC: implement DW_OP_bit_piece) Pedro Alves
2010-06-08 21:21                 ` RFA: rewrite dwarf->ax translator Tom Tromey
2010-06-08 22:48                   ` Tom Tromey
2010-06-09 14:04                     ` Pedro Alves
2010-07-01 12:43               ` collecting optimized out variables regression (Re: RFA: rewrite dwarf->ax translator (Was: RFC: implement DW_OP_bit_piece)) Pedro Alves
2010-07-01 15:25                 ` collecting optimized out variables regression (Re: RFA: rewrite dwarf->ax translator Tom Tromey
2010-07-01 15:57                   ` Pedro Alves
2010-07-01 15:34                 ` collecting optimized out variables regression (Re: RFA: rewrite dwarf->ax translator (Was: RFC: implement DW_OP_bit_piece)) Jan Kratochvil
2010-05-20 19:53     ` RFC: implement DW_OP_bit_piece Tom Tromey
2010-05-20 20:30       ` Jan Kratochvil
2010-05-21 20:16     ` Tom Tromey
2010-05-21 21:16       ` Stan Shebs
2010-05-21 21:18         ` Tom Tromey
2010-05-25 19:22         ` RFC: DWARF expression disassembly (Was: RFC: implement DW_OP_bit_piece) Tom Tromey
2010-05-25 19:27           ` Jan Kratochvil
2010-05-25 20:25             ` RFC: DWARF expression disassembly Tom Tromey
2010-05-25 20:52               ` Jan Kratochvil
2010-05-25 22:03                 ` Tom Tromey
2010-05-26 17:21                   ` Eli Zaretskii
2010-06-01 18:36                     ` Tom Tromey
2010-06-01 18:40                       ` Eli Zaretskii
2010-06-02 19:32                         ` Tom Tromey
2010-05-20 21:07 ` RFC: implement DW_OP_bit_piece Jan Kratochvil
2010-05-21 17:57   ` Tom Tromey
2010-05-25 18:19     ` performance talk [Re: RFC: implement DW_OP_bit_piece] Jan Kratochvil
2010-05-25 22:23       ` Tom Tromey

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=4BF48941.4090500@codesourcery.com \
    --to=stan@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jkratoch@redhat.com \
    --cc=tromey@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