[RFA,2/2] Update usage text for load, symbol-file
Commit Message
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(-)
Comments
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
@@ -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 `file' command can also load symbol tables, as well as setting the file\n\
to execute."), &cmdlist);
set_cmd_completer (c, filename_completer);
@@ -3907,10 +3908,10 @@ that lies within the boundaries of this symbol file in memory."),
c = add_cmd ("load", class_files, load_command, _("\
Dynamically load FILE into the running program, and record its symbols\n\
for access from GDB.\n\
+Usage: load [FILE] [OFFSET]\n\
An optional load OFFSET may also be given as a literal address.\n\
When OFFSET is provided, FILE must also be provided. FILE can be provided\n\
-on its own.\n\
-Usage: load [FILE] [OFFSET]"), &cmdlist);
+on its own."), &cmdlist);
set_cmd_completer (c, filename_completer);
add_prefix_cmd ("overlay", class_support, overlay_command,