Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jim Blandy <jimb@redhat.com>
To: tromey@redhat.com
Cc: gdb-patches@sources.redhat.com
Subject: Re: Patch: Dwarf2 reader -vs- DW_OP_piece
Date: Sat, 23 Feb 2002 22:15:00 -0000	[thread overview]
Message-ID: <npn0xzquc4.fsf@zwingli.cygnus.com> (raw)
In-Reply-To: <87zo22ctbq.fsf@creche.redhat.com>


That makes sense.

Could you change your patch to detect that pattern, verify that the
register numbers are consecutive (according to DWARF2_REG_TO_REGNUM),
return the number of the first register if everything seems right, and
give a dwarf2_complex_location_expr complaint otherwise?

This is a bit more work, but it's more correct.


Tom Tromey <tromey@redhat.com> writes:

> >>>>> "Jim" == Jim Blandy <jimb@redhat.com> writes:
> 
> Jim> Can you explain what sorts of location expressions this is
> Jim> supposed to help GDB handle?
> 
> Yes, sorry.
> 
> Suppose a value spans multiple registers.  Currently gcc encodes this
> as DW_OP_reg for the first register.  However, I believe that is not
> fully correct according to the Dwarf-2 spec.
> 
> The gcc patch changes the output in this case to a series of
> DW_OP_reg/DW_OP_piece instructions.
> 
> So previously gcc could generate this for a `long long' value (on x86
> Linux):
> 
>     DW_OP_reg1
> 
> With the patch gcc will now generate:
> 
>     DW_OP_reg1
>     DW_OP_piece 4
>     DW_OP_reg2
>     DW_OP_piece 4
> 
> Tom


  reply	other threads:[~2002-02-24  6:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-02-21 10:53 Tom Tromey
2002-02-21 14:09 ` Jim Blandy
2002-02-21 14:58   ` Tom Tromey
2002-02-23 22:15     ` Jim Blandy [this message]
2002-02-24  9:12       ` Andrew Cagney

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=npn0xzquc4.fsf@zwingli.cygnus.com \
    --to=jimb@redhat.com \
    --cc=gdb-patches@sources.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