From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27000 invoked by alias); 19 Sep 2009 15:45:45 -0000 Received: (qmail 26989 invoked by uid 22791); 19 Sep 2009 15:45:43 -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; Sat, 19 Sep 2009 15:45:39 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id AA1FC2BAB72; Sat, 19 Sep 2009 11:45:37 -0400 (EDT) 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 cwZRDQGYCPF2; Sat, 19 Sep 2009 11:45:37 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 6B4342BAB66; Sat, 19 Sep 2009 11:45:37 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 96FFBF5935; Sat, 19 Sep 2009 08:45:25 -0700 (PDT) Date: Sat, 19 Sep 2009 15:45:00 -0000 From: Joel Brobecker To: Vladimir Prus Cc: gdb-patches@sources.redhat.com Subject: Re: [MI] -stack-list-variables Message-ID: <20090919154525.GS8910@adacore.com> References: <200909191412.37692.vladimir@codesourcery.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200909191412.37692.vladimir@codesourcery.com> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2009-09/txt/msg00631.txt.bz2 Hi, I just noticed a couple of things while glancing at the patch... > +/* Print a list of the local variables (including arguments) for the > + current frame. With argument of 0, print only the names, with ^ Space missing > + argument of 1 print also the values. */ I also found the comment a little confusing. I would probably have said that ARGC must be 1 or an error is thown, and to see parse_print_values for a list of valid values for ARGV[0]. (there is no comment for parse_print_value, btw). > + if (argc != 1) > + error (_("Usage: PRINT_VALUES")); > + > + frame = get_selected_frame (NULL); > + > + list_args_or_locals (all, parse_print_values (argv[0]), frame); The indentation of the last couple of statements is off by one. -- Joel