From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25702 invoked by alias); 1 Nov 2014 21:46:19 -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 25642 invoked by uid 89); 1 Nov 2014 21:46:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.3 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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 (AES256-GCM-SHA384 encrypted) ESMTPS; Sat, 01 Nov 2014 21:46:17 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id sA1LkGcM006275 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL) for ; Sat, 1 Nov 2014 17:46:16 -0400 Received: from host1.jankratochvil.net (ovpn-116-27.ams2.redhat.com [10.36.116.27]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id sA1LkE1X031582 for ; Sat, 1 Nov 2014 17:46:15 -0400 Subject: [PATCH v3 03/14] add some missing ops to DWARF assembler From: Jan Kratochvil To: gdb-patches@sourceware.org Date: Sat, 01 Nov 2014 21:46:00 -0000 Message-ID: <20141101214614.13230.3574.stgit@host1.jankratochvil.net> In-Reply-To: <20141101214552.13230.45564.stgit@host1.jankratochvil.net> References: <20141101214552.13230.45564.stgit@host1.jankratochvil.net> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2014-11/txt/msg00008.txt.bz2 From: Tom Tromey This changes the DWARF assembler to allow comments in a location expression, and also adds support for a few new opcodes I needed. 2014-10-07 Tom Tromey * lib/dwarf.exp (_location): Ignore blank lines. Allow comments. Handle DW_OP_pick, DW_OP_skip, DW_OP_bra. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/lib/dwarf.exp | 9 ++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 4f2f208..8fa75d1 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-10-07 Tom Tromey + + * lib/dwarf.exp (_location): Ignore blank lines. Allow comments. + Handle DW_OP_pick, DW_OP_skip, DW_OP_bra. + 2014-10-30 Doug Evans * gdb.python/py-objfile.exp: Add tests for setting random attributes diff --git a/gdb/testsuite/lib/dwarf.exp b/gdb/testsuite/lib/dwarf.exp index 1483271..eac2c80 100644 --- a/gdb/testsuite/lib/dwarf.exp +++ b/gdb/testsuite/lib/dwarf.exp @@ -678,7 +678,8 @@ namespace eval Dwarf { variable _cu_offset_size foreach line [split $body \n] { - if {[lindex $line 0] == ""} { + # Ignore blank lines, and allow embedded comments. + if {[lindex $line 0] == "" || [regexp -- {^[ \t]*#} $line]} { continue } set opcode [_map_name [lindex $line 0] _OP] @@ -689,6 +690,7 @@ namespace eval Dwarf { _op .${_cu_addr_size}byte [lindex $line 1] } + DW_OP_pick - DW_OP_const1u - DW_OP_const1s { _op .byte [lindex $line 1] @@ -729,6 +731,11 @@ namespace eval Dwarf { _op .uleb128 [lindex $line 2] } + DW_OP_skip - + DW_OP_bra { + _op .2byte [lindex $line 1] + } + DW_OP_GNU_implicit_pointer { if {[llength $line] != 3} { error "usage: DW_OP_GNU_implicit_pointer LABEL OFFSET"