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: [RFC] Let "gcore" command accept a suffix argument


> 2010-06-21  Hui Zhu  <teawater@gmail.com>
> 
>        * printcmd.c (ui_printf_maybe_filtered): New function.
>        (printf_command): Call ui_printf_maybe_filtered.
>        (_initialize_printcmd): New command "eval".

This is close.

>  static void
> -printf_command (char *arg, int from_tty)
> +ui_printf_maybe_filtered (char *arg, struct ui_file *stream, int filter)

I would personally prefer it if we called this function "ui_printf",
dropping the "maybe_filtered". The "maybe_filtered" is just noise, IMO.

Also, this function needs a comment documenting its behavior.

> +static void
> +printf_command (char *arg, int from_tty)

Please add a comment as well. It can be as simple as ``Implement the
"print" command''.

> +static void
> +eval_command (char *arg, int from_tty)
> +{

And same here.

> +  add_com ("eval", no_class, eval_command, _("\
> +Call command with variable."));

This part will need to be approved by Eli. He's also ask for
documentation.

-- 
Joel


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