This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] Patch to limit field name completion candidates
> From: Tom Tromey <tromey@redhat.com>
> Date: Thu, 05 Jun 2008 14:49:35 -0600
>
> + @cindex completion of field names
> + @cindex field name completion
> + When completing in an expression which looks up a field in a
> + structure, @value{GDBN} also tries to limit completions to the field
> + names available in the type of the left-hand-side:
> +
> + @smallexample
> + (@value{GDBP}) p gdb_stdout.@key{M-?}
> + magic to_delete to_fputs to_put to_rewind
> + to_data to_flush to_isatty to_read to_write
> + @end smallexample
> +
Otherwise,
This is good. I have three comments:
. in the @cindex entries, I think it's better to use "structure
fields" instead of just "fields", at least in one of them;
. please use @kbd{M-?}, not @key (there's no key labeled literally
with M-?);
. not every GDB user knows by heart the definition of the ui_file
structure, so I'd add the following passage right after your text:
@noindent
This is because the @code{gdb_stdout} is a variable of the type
@code{struct ui_file} that is defined in @value{GDBN} sources as
follows:
@smallexample
struct ui_file
@{
int *magic;
ui_file_flush_ftype *to_flush;
ui_file_write_ftype *to_write;
ui_file_fputs_ftype *to_fputs;
ui_file_read_ftype *to_read;
ui_file_delete_ftype *to_delete;
ui_file_isatty_ftype *to_isatty;
ui_file_rewind_ftype *to_rewind;
ui_file_put_ftype *to_put;
void *to_data;
@}
@end smallexample