This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [MI] -stack-list-variables
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Vladimir Prus <vladimir at codesourcery dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Sat, 19 Sep 2009 08:45:25 -0700
- Subject: Re: [MI] -stack-list-variables
- References: <200909191412.37692.vladimir@codesourcery.com>
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