Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: Stan Shebs <stan@codesourcery.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jkratoch@redhat.com>
Subject: Re: RFC: implement DW_OP_bit_piece
Date: Thu, 20 May 2010 07:12:00 -0000	[thread overview]
Message-ID: <m38w7f5c0h.fsf@fleche.redhat.com> (raw)
In-Reply-To: <m3y6ff5k0h.fsf@fleche.redhat.com> (Tom Tromey's message of "Wed,	19 May 2010 21:28:46 -0600")

Tom> But it seems like this can probably be done without that.  Though, I
Tom> haven't looked enough at ax.h to know whether it can represent all of
Tom> DWARF... which reminds me, how much trouble is it to add to AX?  Is it
Tom> versioned so we can detect old remotes?

I looked a little.

I didn't see explicit versioning in the agent expressions but I gather
from remote.c that we could add a new remote feature and query it.

I looked at DWARF->AX translation.  I see how most of it can be done,
except:

DW_OP_implicit_value can be arbitrarily wide.  It seems strange to even
want to upload a constant, but this could be used as part of a bigger
expression.  However in practice it is probably ok.

Some stack ops are missing: DW_OP_pick, DW_OP_rot, DW_OP_over.
I think 'over' is emitted by gcc, but maybe we could recognize the
particular bytecode sequence and generate a signed modulus directly.
(Yuck.)

DW_OP_call_frame_cfa seems to require some gyrations, I didn't trace all
the way down to see if it is reasonably possible.

DW_OP_GNU_push_tls_address.  Maybe possible, but I don't know enough.

DW_OP_piece and DW_OP_bit_piece.  These are problems in some contexts,
but not others.  A few cases I've considered:

* As the terminus of a trace expression they ought to be ok.  This means
  a simple expression, like a variable, which is made of pieces.  In
  this case I think we can probably trace the various parts and discard
  each result until the final one.

* They might be ok as part of an aggregate which is then "sliced" at a
  constant offset.  So, something like "struct.field" or "array[5]".
  However, I think they are not ok, or at least difficult to compile, if
  the expression is something like "array[i]".  Even the possible case
  here will probably lead to ridiculous bytecode in some cases.

Tom


  reply	other threads:[~2010-05-20  6:21 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
2010-05-20  5:10       ` Tom Tromey
2010-05-20  7:12         ` Tom Tromey [this message]
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=m38w7f5c0h.fsf@fleche.redhat.com \
    --to=tromey@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jkratoch@redhat.com \
    --cc=stan@codesourcery.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