From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1628 invoked by alias); 1 Aug 2015 16:04:12 -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 1593 invoked by uid 89); 1 Aug 2015 16:04:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.3 required=5.0 tests=AWL,BAYES_50,KAM_STOCKGEN,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 01 Aug 2015 16:04:09 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1ZLZGX-0004Xc-Id from Luis_Gustavo@mentor.com ; Sat, 01 Aug 2015 09:04:05 -0700 Received: from [172.30.12.45] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Sat, 1 Aug 2015 09:04:04 -0700 Message-ID: <55BCEDF1.2070806@codesourcery.com> Date: Sat, 01 Aug 2015 16:04:00 -0000 From: Luis Machado Reply-To: Luis Machado User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 To: Pierre-Marie de Rodat , Doug Evans CC: GDB Patches , Pedro Alves Subject: Re: [PATCH] Replace the block_found global with explicit data-flow References: <55AE7520.1010307@adacore.com> <55AE943F.3000009@adacore.com> <55BA299D.7040407@adacore.com> <55BC89E6.9040705@adacore.com> <55BC8CA9.3070505@adacore.com> <55BC92D8.8070407@adacore.com> In-Reply-To: <55BC92D8.8070407@adacore.com> Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-08/txt/msg00003.txt.bz2 On 08/01/2015 06:35 AM, Pierre-Marie de Rodat wrote: > On 08/01/2015 11:08 AM, Pierre-Marie de Rodat wrote: > gdb/ > > * alpha-mdebug-tdep.c (find_proc_desc): Update call to > lookup_symbol. > * ft32-tdep.c (ft32_skip_prologue): Likewise. > * moxie-tdep.c (moxie_skip_prologue): Likewise. > * mt-tdep.c (mt_skip_prologue): Likewise. > * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise. > --- > gdb/ChangeLog | 9 +++++++++ > gdb/alpha-mdebug-tdep.c | 3 ++- > gdb/ft32-tdep.c | 2 +- > gdb/moxie-tdep.c | 2 +- > gdb/mt-tdep.c | 2 +- > gdb/xstormy16-tdep.c | 2 +- > 6 files changed, 15 insertions(+), 5 deletions(-) > > diff --git a/gdb/ChangeLog b/gdb/ChangeLog > index e8c04c0..a62415f 100644 > --- a/gdb/ChangeLog > +++ b/gdb/ChangeLog > @@ -1,5 +1,14 @@ > 2015-08-01 Pierre-Marie de Rodat > > + * alpha-mdebug-tdep.c (find_proc_desc): Update call to > + lookup_symbol. > + * ft32-tdep.c (ft32_skip_prologue): Likewise. > + * moxie-tdep.c (moxie_skip_prologue): Likewise. > + * mt-tdep.c (mt_skip_prologue): Likewise. > + * xstormy16-tdep.c (xstormy16_skip_prologue): Likewise. > + > +2015-08-01 Pierre-Marie de Rodat > + > * ada-exp.y (write_object_renaming): Replace struct > ada_symbol_info with struct block_symbol. Update field > references accordingly. > diff --git a/gdb/alpha-mdebug-tdep.c b/gdb/alpha-mdebug-tdep.c > index 2f58c64..a8a511b 100644 > --- a/gdb/alpha-mdebug-tdep.c > +++ b/gdb/alpha-mdebug-tdep.c > @@ -107,7 +107,8 @@ find_proc_desc (CORE_ADDR pc) > symbol reading. */ > sym = NULL; > else > - sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, 0); > + sym = lookup_symbol (MDEBUG_EFI_SYMBOL_NAME, b, LABEL_DOMAIN, > + 0).symbol; > } It is probably a matter of personal taste, but i find it easier and cleaner to get the result of lookup_symbol (...) assigned to a variable and then have the code access its 'symbol' field as opposed to chaining things like the above. The current codebase doesn't show many occurrences like the above.