From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 128998 invoked by alias); 9 Jun 2015 21:46:30 -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 128985 invoked by uid 89); 9 Jun 2015 21:46:29 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: smtp.eu.adacore.com Received: from mel.act-europe.fr (HELO smtp.eu.adacore.com) (194.98.77.210) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 09 Jun 2015 21:46:28 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 605082853723; Tue, 9 Jun 2015 23:46:25 +0200 (CEST) Received: from smtp.eu.adacore.com ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rubwc52irbP8; Tue, 9 Jun 2015 23:46:25 +0200 (CEST) Received: from [192.168.0.6] (nat75-2-78-193-84-173.fbxo.proxad.net [78.193.84.173]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.eu.adacore.com (Postfix) with ESMTPSA id 23BE42853720; Tue, 9 Jun 2015 23:46:25 +0200 (CEST) Message-ID: <55775EB0.4080701@adacore.com> Date: Tue, 09 Jun 2015 21:46:00 -0000 From: Pierre-Marie de Rodat User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Pedro Alves , GDB Patches Subject: Re: [PATCH] Add proper handling for non-local references in nested functions References: <54F47563.4050103@adacore.com> <54FF0D05.70907@redhat.com> <550C1170.9070208@adacore.com> <55685B60.3000004@redhat.com> In-Reply-To: <55685B60.3000004@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-06/txt/msg00161.txt.bz2 Pedro, On 05/29/2015 02:28 PM, Pedro Alves wrote: >> This would look cleaner indeed. It's a big change itself though so if >> most consider this as a good idea I don't mind doing it... although it >> would be for another commit! > > I would think it great if someone did that. :-) Okay... I may give it a try, then. ;-) > Thanks for the update, and sorry about the delay. No problem. I probably won't be able to resume my work on this until July, so more delay is to be expected. :-/ The good news is that then, my GCC patches to fix the corresponding DWARF may be integrated. :-) > This overall looks very reasonable to me. It's fine with me to > let the core changes in, and address Python API issues separately. Understood, thanks. > Add: > > /* See block.h. */ I will. > It'd be great if you could skim over the patch add any missing > function intro comments. You've already done a good job at that, > I think only here and there missed it. Will double-check and fix. >> + VAR_BLOCK is needed there's a possibility for VAR to be outside FRAME. > > I think an "if" is missing after "needed". Absolutely. >> - val = read_var_value (var, frame); >> + /* READ_VAR_VALUE needs a block in order to deal with non-local >> + references (i.e. to handlee nested functions). In this context, we > > typo "handle". Double space after period. Will fix. >> +# Please email any bugs, comments, and/or additions to this file to: >> +# bug-gdb@gnu.org > > It no longer makes sense to add this email address to tests. Please > drop it (here and elsewhere). Sure. >> +void iter_str (const char *str, void (*callback) (char c)) > > Could you make this follow GNU formatting? That is: > > void > iter_str (const char *str, void (*callback) (char c)) > > Here and elsewhere. I will. >> + >> +# Check we get correct values for both local and non-local variable references. >> + >> +# Note that in order to get the following test passing, one has to use a >> +# patched GCC: see . >> +gdb_test "print first" "1" >> +gdb_test "print parent_first" "1" > > Please make this XFAIL instead of FAIL with unpatched GCC. > > Otherwise looks good to me. Ok. Thank you again for the review! -- Pierre-Marie de Rodat