From: Yao Qi <qiyaoltc@gmail.com>
To: Andreas Arnez <arnez@linux.vnet.ibm.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 17:44:00 -0000 [thread overview]
Message-ID: <20170119174339.GP28060@E107787-LIN> (raw)
In-Reply-To: <m3o9zcgjys.fsf@oc1027705133.ibm.com>
On 17-01-12 20:24:27, Andreas Arnez wrote:
> diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp
> index 9f5fa6c..6bd563a 100644
> --- a/gdb/testsuite/lib/dwarf.exp
> +++ b/gdb/testsuite/lib/dwarf.exp
> @@ -906,6 +906,25 @@ namespace eval Dwarf {
> _op .2byte [lindex $line 1]
> }
>
> + DW_OP_implicit_value {
> + set l1 [new_label "value_start"]
> + set l2 [new_label "value_end"]
> + _op .uleb128 "$l2 - $l1"
> + define_label $l1
> + foreach value [lrange $line 1 end] {
> + switch -regexp -- $value {
> + {^0x[[:xdigit:]]{2}$} {_op .byte $value}
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}
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}
> + {^0x[[:xdigit:]]{4}$} {_op .2byte $value}
> + {^0x[[:xdigit:]]{8}$} {_op .4byte $value}
> + {^0x[[:xdigit:]]{16}$} {_op .8byte $value}
> + default {
> + error "bad value '$value' in DW_OP_implicit_value"
> + }
> + }
> + }
> + define_label $l2
> + }
> +
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. I get some troubles
on using Dwarf::assemble for two cus. I'll let you know once I resolve
the issues there.
--
Yao (é½å°§)
next prev parent reply other threads:[~2017-01-19 17:44 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 [this message]
2017-01-19 18:21 ` Andreas Arnez
2017-01-24 9:42 ` [PATCH 0/2] Add DW_OP_implicit_value in dwarf assembler 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-24 9:43 ` [PATCH 1/2] Handle DW_OP_GNU_implicit_pointer in dwarf assembler 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=20170119174339.GP28060@E107787-LIN \
--to=qiyaoltc@gmail.com \
--cc=arnez@linux.vnet.ibm.com \
--cc=gdb-patches@sourceware.org \
--cc=jan.kratochvil@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