From patchwork Fri Aug 3 04:19:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Buettner X-Patchwork-Id: 28747 Received: (qmail 22694 invoked by alias); 3 Aug 2018 04:19:53 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 22276 invoked by uid 89); 3 Aug 2018 04:19:52 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Aug 2018 04:19:51 +0000 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id BC1F08F242 for ; Fri, 3 Aug 2018 04:19:50 +0000 (UTC) Received: from pinnacle.lan (ovpn-116-57.phx2.redhat.com [10.3.116.57]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 9EC68600C5 for ; Fri, 3 Aug 2018 04:19:50 +0000 (UTC) Date: Thu, 2 Aug 2018 21:19:49 -0700 From: Kevin Buettner To: gdb-patches@sourceware.org Subject: [PATCH 2/3] Add support of DW_OP_GNU_variable_value to DWARF assembler Message-ID: <20180802211949.6dbd4e00@pinnacle.lan> In-Reply-To: <20180802210405.5c04ca7a@pinnacle.lan> References: <20180802210405.5c04ca7a@pinnacle.lan> MIME-Version: 1.0 X-IsSubscribed: yes gdb/testsuite/ChangeLog: * lib/dwarf.exp: Add support for DW_OP_GNU_variable_value. --- gdb/testsuite/lib/dwarf.exp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 82ec29b..0c3f50a 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -962,6 +962,20 @@ namespace eval Dwarf { _op .sleb128 [lindex $line 2] } + DW_OP_GNU_variable_value { + if {[llength $line] != 2} { + error "usage: $opcode LABEL" + } + + # Here label is a section offset. + set label [lindex $line 1] + if { $_cu_version == 2 } { + _op .${_cu_addr_size}byte $label + } else { + _op .${_cu_offset_size}byte $label + } + } + DW_OP_deref_size { if {[llength $line] != 2} { error "usage: DW_OP_deref_size SIZE"