From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20905 invoked by alias); 19 Jan 2017 17:44:00 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 20890 invoked by uid 89); 19 Jan 2017 17:44:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RCVD_IN_SORBS_SPAM,SPF_PASS autolearn=no version=3.3.2 spammy=Hx-languages-length:1573, arnez, assemble, Arnez X-HELO: mail-wm0-f68.google.com Received: from mail-wm0-f68.google.com (HELO mail-wm0-f68.google.com) (74.125.82.68) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 19 Jan 2017 17:43:58 +0000 Received: by mail-wm0-f68.google.com with SMTP id r144so610160wme.0 for ; Thu, 19 Jan 2017 09:43:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=86g2I8bs8en6m0u7LLTS7TJz8VIpEFvEgrcqc07+M1c=; b=seGJEF+uGgMt+7ulNg3CW4p36MhS45vMr65/IpWigd1lsccb67m/UaXQagQGZzwysu PgY/kdR/rcDG70GPCMC5usdiQdDXivGAjXr3JA89R9/D2B271FyfKzxgNDcHyYrBaPry 0Xw6jCMPRQClFvGZILIPSAQNq5G03zi3p7PGWt5NBZV8LIGMhqy1cSnLMHcMnFUZCTTS pnPKejkEYdbAauMziO/CYzkQmVRXUiYh6QJCYPKOLfcRyOQDN1+w5pOFnBkd109t/hDO i3rYi37eXVRboYnB+N+jkQRhuG8P7hkTBsBdDATTZvL2+AJ8YdXhas9PnGa8N2+LUaXe rjqg== X-Gm-Message-State: AIkVDXJfiWM4inLxmSyh6YFpBDFWTnVtHFcLprUFsgUtoPFmqRqXidDjGw3BmoiQ87C83g== X-Received: by 10.28.181.145 with SMTP id e139mr7751998wmf.103.1484847836895; Thu, 19 Jan 2017 09:43:56 -0800 (PST) Received: from E107787-LIN (gcc1-power7.osuosl.org. [140.211.15.137]) by smtp.gmail.com with ESMTPSA id l74sm14288991wmg.2.2017.01.19.09.43.54 (version=TLS1_2 cipher=AES128-SHA bits=128/128); Thu, 19 Jan 2017 09:43:56 -0800 (PST) Date: Thu, 19 Jan 2017 17:44:00 -0000 From: Yao Qi To: Andreas Arnez Cc: gdb-patches@sourceware.org, Jan Kratochvil Subject: Re: [PATCH] Big-endian targets: don't ignore offset into DW_OP_implicit_value Message-ID: <20170119174339.GP28060@E107787-LIN> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-IsSubscribed: yes X-SW-Source: 2017-01/txt/msg00392.txt.bz2 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 (齐尧)