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: [RFA 2/2] Update usage text for load, symbol-file


On 11/04/2017 10:34 PM, Tom Tromey wrote:
> This updates the usage text for the load and symbol-file commands.
> 
> ChangeLog
> 2017-11-04  Tom Tromey  <tom@tromey.com>
> 
> 	* symfile.c (_initialize_symfile): Update usage text for
> 	symbol-file, load.
> ---
>  gdb/ChangeLog | 5 +++++
>  gdb/symfile.c | 5 +++--
>  2 files changed, 8 insertions(+), 2 deletions(-)
> 
> diff --git a/gdb/symfile.c b/gdb/symfile.c
> index 11e67e52b6..f9ae437b6b 100644
> --- a/gdb/symfile.c
> +++ b/gdb/symfile.c
> @@ -3881,6 +3881,7 @@ _initialize_symfile (void)
>  
>    c = add_cmd ("symbol-file", class_files, symbol_file_command, _("\
>  Load symbol table from executable file FILE.\n\
> +Usage: symbol-file [-readnow] FILENAME\n\

The sentence above says FILE, while the usage line says FILENAME.
That doesn't look 100% right.  OK with that fixed.

While at it, I wonder whether we could we crib some sentence
for "-readnow" from some other command's help?  Hmm, maybe
none documents it.  gdb/NEWS has:

~~ 
You can cause GDB to read the entire symbol table immediately by using
the '-readnow' option with any of the commands that load symbol table
information (or on the GDB command line).  This makes the command
slower, but makes future operations faster.
~~ 

Maybe we could steal that sentence, put it behind a #define, and
reuse it in all the commands that have -readnow, similar to 
LOCATION_HELP_STRING.

But you really don't have to do this yourself -- at first I
thought it be a trivial copy/paste...

Thanks,
Pedro Alves


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