From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 72508 invoked by alias); 5 Nov 2015 21:19:10 -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 72486 invoked by uid 89); 5 Nov 2015 21:19:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Thu, 05 Nov 2015 21:19:09 +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 (Postfix) with ESMTPS id 9B1B68C1A5 for ; Thu, 5 Nov 2015 21:19:07 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.ams2.redhat.com [10.39.146.11]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tA5LJ6Dq025599; Thu, 5 Nov 2015 16:19:06 -0500 Message-ID: <563BC7C9.3040404@redhat.com> Date: Thu, 05 Nov 2015 21:19:00 -0000 From: Pedro Alves User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-Version: 1.0 To: Kevin Buettner , gdb-patches@sourceware.org Subject: Re: [PATCH] gdb.dwarf2: Define and use gdb_target_symbol_prefix for symbol prefixes References: <20151029212509.438b5642@pinnacle.lan> <56334F21.1020205@redhat.com> <20151104144908.320110e1@pinnacle.lan> <563B2BF1.2050007@redhat.com> <20151105130140.0fd3404f@pinnacle.lan> In-Reply-To: <20151105130140.0fd3404f@pinnacle.lan> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-11/txt/msg00190.txt.bz2 On 11/05/2015 08:01 PM, Kevin Buettner wrote: > On Thu, 05 Nov 2015 10:14:09 +0000 > Pedro Alves wrote: >> > Not sure I see what makes gdb.dwarf2/atomic-type.exp different? >> > E.g., the gdb.dwarf2/dw2-bad-mips-linkage-name.exp hunk looks quite >> > similar. What makes gdb.dwarf2/atomic-type.exp special? > I was mistaken. Both of these tests - dw2-bad-mips-linkage-name.exp > and atomic-type.exp - have problems due to the fact that the call to > gdb_target_symbol appears within a DW_TAG_ construct. The proc > _handle_DW_TAG performs command and variable expansion within a DW_TAG_ > construct. (It does other things too.) ... > --- a/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp > +++ b/gdb/testsuite/gdb.dwarf2/dw2-regno-invalid.exp ... > compile_unit { > - {low_pc main DW_FORM_addr} > - {high_pc main+0x10000 DW_FORM_addr} > + {low_pc [gdb_target_symbol main] DW_FORM_addr} > + {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr} > } { > declare_labels integer_label > > @@ -43,8 +43,8 @@ Dwarf::assemble $asm_file { > DW_TAG_subprogram { > {name main} > {DW_AT_external 1 flag} > - {low_pc main DW_FORM_addr} > - {high_pc main+0x10000 DW_FORM_addr} > + {low_pc [gdb_target_symbol main] DW_FORM_addr} > + {high_pc [gdb_target_symbol main]+0x10000 DW_FORM_addr} Aren't these above more instances that needed the "join"? I believe so, but if not, I'd like to understand why not. The patch looks good to me otherwise. BTW, OOC, it seems to be that "main+0x10000" were written without spaces before to make it a single element. Looks like that requirement is gone now and we could write: {high_pc [gdb_target_symbol main] + 0x10000 DW_FORM_addr} (not saying you should do that, just it's just an OOC.) Thanks, Pedro Alves