From patchwork Fri May 16 15:26:24 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Tromey X-Patchwork-Id: 960 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx23.g.dreamhost.com (mx2.sub5.homie.mail.dreamhost.com [208.113.200.128]) by wilcox.dreamhost.com (Postfix) with ESMTP id 1F28D36007B for ; Fri, 16 May 2014 08:26:53 -0700 (PDT) Received: by homiemail-mx23.g.dreamhost.com (Postfix, from userid 14314964) id CF8FD63C45D50; Fri, 16 May 2014 08:26:52 -0700 (PDT) X-Original-To: gdb@patchwork.siddhesh.in Delivered-To: x14314964@homiemail-mx23.g.dreamhost.com Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by homiemail-mx23.g.dreamhost.com (Postfix) with ESMTPS id 9B1E963C45D49 for ; Fri, 16 May 2014 08:26:52 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; q=dns; s=default; b=Nfm4e9w2n4rI91LcEC5z87qLOGnLmdS R8Nrj0AvsnI4U+B9PdBdHzi5QhNGzXfR0/ed4plR75IWLrtQKVOcci8Ffkeu9dya uE4blDY1YpgDZjoPwRRW3ZJplMZBBe6DL+vdTJndiICG8PNtpKFjIS6i0ONQ9lEF 2nJdt4qXCMNk= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:cc:subject:date:message-id:in-reply-to :references; s=default; bh=DmrJT+ww3FPECNOkDIPkpiekcAY=; b=e9/IV PxGLXS/SM/3W2SkzEOH22hy66rUb30UOc62zTkjQXKgaYVbhfhXYXz/ivOr2C3bB dBYHGCAlLqChQU52WOabhLpCv5u8gYHGJmetNu7JHW0cRy1TwwOqQ64AHV5X/8HE fZLVoS/k7cTPt1+OPdrrwaLxnrpoGtAmXE/4GA= Received: (qmail 15040 invoked by alias); 16 May 2014 15:26:44 -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 15010 invoked by uid 89); 16 May 2014 15:26:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 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 ESMTP; Fri, 16 May 2014 15:26:42 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQfHw019070 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Fri, 16 May 2014 11:26:41 -0400 Received: from barimba.redhat.com (ovpn-113-182.phx2.redhat.com [10.3.113.182]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s4GFQcV5006849; Fri, 16 May 2014 11:26:40 -0400 From: Tom Tromey To: gdb-patches@sourceware.org Cc: Tom Tromey Subject: [PATCH 03/14] add some missing ops to DWARF assembler Date: Fri, 16 May 2014 09:26:24 -0600 Message-Id: <1400253995-12333-4-git-send-email-tromey@redhat.com> In-Reply-To: <1400253995-12333-1-git-send-email-tromey@redhat.com> References: <1400253995-12333-1-git-send-email-tromey@redhat.com> X-DH-Original-To: gdb@patchwork.siddhesh.in This changes the DWARF assembler to allow comments in a location expression, and also adds support for a few new opcodes I needed. 2014-05-16 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/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"