This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [MI] -stack-list-variables


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]