From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11332 invoked by alias); 22 Dec 2008 20:52:55 -0000 Received: (qmail 11324 invoked by uid 22791); 22 Dec 2008 20:52:54 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 22 Dec 2008 20:52:07 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 416BB2A9637; Mon, 22 Dec 2008 15:52:05 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id ip1mcxsnH-AF; Mon, 22 Dec 2008 15:52:05 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6C9B42A9630; Mon, 22 Dec 2008 15:52:04 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 246C0E7ACD; Tue, 23 Dec 2008 00:51:57 +0400 (RET) Date: Mon, 22 Dec 2008 20:52:00 -0000 From: Joel Brobecker To: Tom Tromey Cc: gdb-patches@sourceware.org Subject: Re: RFA: fix pretty-printing in "bt full" Message-ID: <20081222205157.GA15887@adacore.com> References: <20081222050024.GD25416@adacore.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.2i 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 X-SW-Source: 2008-12/txt/msg00394.txt.bz2 > Also, this may introduce a behavior change in print_frame_arg_vars. I > haven't tried to test this, but the old code printed the variable name > before looking up the second symbol; it seems to me that the new code > could fail while looking up the second symbol and then not print > anything. I don't think that this would be a problem in practice. I don't think it should error out. See lookup_block_symbol: /* Note that parameter symbols do not always show up last in the list; this loop makes sure to take anything else other than parameter symbols first; it only uses parameter symbols as a last resort. Note that this only takes up extra computation time on a match. */ So, even if there is no local symbol for our parameter symbol, lookup_symbol should still return the parameter one as a fallback. But even if the call to lookup_symbol did error-out, not having the name of the parameter under those unusual circumstance shouldn't be too bad, given that the output will be broken by the error message. > 2008-12-22 Tom Tromey > > * stack.c (print_block_frame_locals): Print spaces, not tabs. > Update for call to print_variable_and_value. > (print_frame_arg_vars): Update. > * value.h (print_variable_and_value): Rename from > print_variable_value. Add 'name' and 'indent' parameters. > * printcmd.c (print_variable_and_value): Rename from > print_variable_value. Add 'name' and 'indent' parameters. Use > common_val_print. > * f-valprint.c (info_common_command): Update. OK. -- Joel