[PATCH 2/4] save itsets into file

Eli Zaretskii eliz@gnu.org
Fri Aug 31 19:32:00 GMT 2012


> From: Yao Qi <yao@codesourcery.com>
> Date: Thu, 30 Aug 2012 10:40:23 +0800
> 
> This patch adds a command 'save itsets' to a file, which can be used
> later by command 'source'.  New command 'save itsets' is similar to
> command 'save breakpoints'.

Thanks.

> +@kindex save itsets
> +@cindex save itsets to a file for future sessions

Please remove this @cindex, it is redundant given the @kindex before
it.

Alternatively, modify the @cindex test, like this:

 @cindex itset, saving to a file

> +@item save itsets
> +This command saves all current itset definitions into a file
> +@file{@var{filename}} suitable for use in a later debugging session.

What "@var{filename}"?  There's no such parameter on the @item line.

> +  pathname = tilde_expand (filename);
> +  cleanup = make_cleanup (xfree, pathname);
> +  fp = gdb_fopen (pathname, "w");

GNU coding standards discourage using "pathname" for file names.

> +  c = add_cmd ("itsets", no_class, itset_save_command, _("\
> +Save the definitions of named itsets as a script.\n\
> +This includes named itset\n\

This is not a complete sentence, and it is unclear what is its value
here.  I would remove it.

Thanks.



More information about the Gdb-patches mailing list