From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 87328 invoked by alias); 9 Dec 2015 12:42:23 -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 87311 invoked by uid 89); 9 Dec 2015 12:42:23 -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; Wed, 09 Dec 2015 12:42:21 +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 (Postfix) with ESMTPS id AFBE168E07; Wed, 9 Dec 2015 12:42:20 +0000 (UTC) Received: from [127.0.0.1] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id tB9CgITn032301; Wed, 9 Dec 2015 07:42:19 -0500 Message-ID: <566821AA.2010902@redhat.com> Date: Wed, 09 Dec 2015 12:42: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: Andrew Burgess , gdb-patches@sourceware.org CC: Doug Evans Subject: Re: [PATCH v2] gdb: Handle multiple base address in debug_ranges data. References: <81cb8e0b755217ed2ea2afdffb3a5c44421b72cd.1444985270.git.andrew.burgess@embecosm.com> <20151103103505.GO23628@embecosm.com> In-Reply-To: <20151103103505.GO23628@embecosm.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SW-Source: 2015-12/txt/msg00179.txt.bz2 On 11/03/2015 10:35 AM, Andrew Burgess wrote: > Below is a second attempt at fixing the multiple base address bug in > the gdb DWARF parsing code. > > The actual fix is identical to the first patch, the big change here is > in the testing. > > Gone is the x86-64 assembler example, and instead I have tried[1] to > extend the dwarf assembler to generate sufficient information to > trigger this bug, this required extensions to the .debug_line > generation, and new code to handle .debug_ranges generation. > > I've tested this new tests on x86-64 Linux compiling as a 64-bit > target, and when passing '-m32' to the test to compile as a 32-bit > target. > > My TCL skills are pretty weak[2] so constructive guidance on how to > improve this code would be great, alternatively if someone (anyone) > would like to show me how easy this is, please do improve on this > patch. > > Alternatively, how do you feel about letting this in ... for now. Thanks for doing this! I skimmed it, and it looks like the same style of code as the rest of the Dwarf assembler, so I'd feel quite comfortable putting this in as is. Tiny nit: > +Dwarf::assemble $asm_file { > + global srcdir subdir srcfile srcfile2 > + declare_labels ranges_label; > + declare_labels L; > + No need for ; at the end of those declare_labels lines. Thanks, Pedro Alves