This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA 2/2] Update usage text for load, symbol-file
- From: Pedro Alves <palves at redhat dot com>
- To: Tom Tromey <tom at tromey dot com>, gdb-patches at sourceware dot org
- Date: Tue, 7 Nov 2017 15:04:01 +0000
- Subject: Re: [RFA 2/2] Update usage text for load, symbol-file
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx04.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=palves at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 4C6058B135
- References: <20171104223455.539-1-tom@tromey.com> <20171104223455.539-3-tom@tromey.com>
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