Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andreas Arnez <arnez@linux.vnet.ibm.com>
To: Yao Qi <qiyaoltc@gmail.com>
Cc: gdb-patches@sourceware.org, Jan Kratochvil <jan.kratochvil@redhat.com>
Subject: Re: [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value
Date: Thu, 19 Jan 2017 18:21:00 -0000	[thread overview]
Message-ID: <m3shoevrkf.fsf@oc1027705133.ibm.com> (raw)
In-Reply-To: <20170119174339.GP28060@E107787-LIN> (Yao Qi's message of "Thu,	19 Jan 2017 17:43:39 +0000")

On Thu, Jan 19 2017, Yao Qi wrote:

> Nit: we could also match one digit to simplify the usage.  With your
> patch, we need to use it like this,
>
>
> +		    {DW_AT_location {
> +			DW_OP_implicit_value 0x01 0x01 0x01 0x01
> +		    } SPECIAL_expr}

Right, or in this particular case you could say

      DW_OP_implicit_value 0x01010101

instead, because the number is endianness-symmetric ;-)

>
> but if we add "{^0x[[:xdigit:]]{2}$} {_op .byte $value}", the use
> above can be simplified,
>
> +                   {DW_AT_location {
> +                       DW_OP_implicit_value 0x1 0x1 0x1 0x1
> +                   } SPECIAL_expr}

You probably mean "{^0x[[:xdigit:]]{1,2}$} {_op .byte $value}"?  Sure,
will do.  The idea behind the existing logic is that the resulting
immediate value always has half as many bytes as there are hex digits.
But for single byte integers I agree that this is a bit picky and the
simplification is useful.  I would not extend this to multi-byte
integers, though, such as allowing 0x123456 or such.

> During the review, I am trying to use DW_OP_implicit_value in
> gdb.dwarf2/implptr-64bit.exp, because I think we should use this new
> added DW_OP as much as we can in existing test case.

Sounds good!

> I get some troubles on using Dwarf::assemble for two cus.  I'll let
> you know once I resolve the issues there.

OK, let's see how that goes.

--
Andreas


  reply	other threads:[~2017-01-19 18:21 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 19:24 Andreas Arnez
2017-01-19 17:44 ` Yao Qi
2017-01-19 18:21   ` Andreas Arnez [this message]
2017-01-24  9:42     ` [PATCH 0/2] Add DW_OP_implicit_value in dwarf assembler Yao Qi
2017-01-24  9:43       ` [PATCH 1/2] Handle DW_OP_GNU_implicit_pointer " Yao Qi
2017-01-24  9:43       ` [PATCH 2/2] Use dwarf assembler in gdb.dwarf2/implptr-64bit.exp Yao Qi
2017-01-24 19:21         ` Andreas Arnez
2017-01-25 16:26           ` Yao Qi
2017-01-25 22:12 ` [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value Yao Qi
2017-01-27 19:35   ` Andreas Arnez
2017-02-01  9:09     ` Andreas Arnez
2017-02-01  9:16       ` Yao Qi

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=m3shoevrkf.fsf@oc1027705133.ibm.com \
    --to=arnez@linux.vnet.ibm.com \
    --cc=gdb-patches@sourceware.org \
    --cc=jan.kratochvil@redhat.com \
    --cc=qiyaoltc@gmail.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