* [PATCH] Improve load command's help text
@ 2017-01-06 16:41 Luis Machado
2017-01-06 18:29 ` Simon Marchi
2017-01-10 14:59 ` Yao Qi
0 siblings, 2 replies; 4+ messages in thread
From: Luis Machado @ 2017-01-06 16:41 UTC (permalink / raw)
To: gdb-patches
This fairly obvious patch adds usage text to the load command's help text.
Originally it did not have usage and mentioned things like FILE and OFFSET
without explaining how those should be passed in the command.
gdb/ChangeLog:
2017-01-05 Luis Machado <lgustavo@codesourcery.com>
* symfile (_initialize_symfile): Add usage text to the load command's
help text.
---
gdb/symfile.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/symfile.c b/gdb/symfile.c
index 61b9e5b..0af1900 100644
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -3952,7 +3952,8 @@ 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\
-A load OFFSET may also be given."), &cmdlist);
+A load offset may also be given.\n\
+Usage: load [FILE] [offset expression]"), &cmdlist);
set_cmd_completer (c, filename_completer);
add_prefix_cmd ("overlay", class_support, overlay_command,
--
2.7.4
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Improve load command's help text
2017-01-06 16:41 [PATCH] Improve load command's help text Luis Machado
@ 2017-01-06 18:29 ` Simon Marchi
2017-01-06 18:31 ` Luis Machado
2017-01-10 14:59 ` Yao Qi
1 sibling, 1 reply; 4+ messages in thread
From: Simon Marchi @ 2017-01-06 18:29 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On 2017-01-06 11:41, Luis Machado wrote:
> diff --git a/gdb/symfile.c b/gdb/symfile.c
> index 61b9e5b..0af1900 100644
> --- a/gdb/symfile.c
> +++ b/gdb/symfile.c
> @@ -3952,7 +3952,8 @@ 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\
> -A load OFFSET may also be given."), &cmdlist);
> +A load offset may also be given.\n\
> +Usage: load [FILE] [offset expression]"), &cmdlist);
For consistency, I think this would look better:
Usage: load [FILE] [OFFSET]
The fact that offset can be an expression can be specified in the text
just before.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Improve load command's help text
2017-01-06 18:29 ` Simon Marchi
@ 2017-01-06 18:31 ` Luis Machado
0 siblings, 0 replies; 4+ messages in thread
From: Luis Machado @ 2017-01-06 18:31 UTC (permalink / raw)
To: Simon Marchi; +Cc: gdb-patches
On 01/06/2017 12:29 PM, Simon Marchi wrote:
> On 2017-01-06 11:41, Luis Machado wrote:
>> diff --git a/gdb/symfile.c b/gdb/symfile.c
>> index 61b9e5b..0af1900 100644
>> --- a/gdb/symfile.c
>> +++ b/gdb/symfile.c
>> @@ -3952,7 +3952,8 @@ 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\
>> -A load OFFSET may also be given."), &cmdlist);
>> +A load offset may also be given.\n\
>> +Usage: load [FILE] [offset expression]"), &cmdlist);
>
> For consistency, I think this would look better:
>
> Usage: load [FILE] [OFFSET]
>
> The fact that offset can be an expression can be specified in the text
> just before.
That sounds good to me.
Thanks,
Luis
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Improve load command's help text
2017-01-06 16:41 [PATCH] Improve load command's help text Luis Machado
2017-01-06 18:29 ` Simon Marchi
@ 2017-01-10 14:59 ` Yao Qi
1 sibling, 0 replies; 4+ messages in thread
From: Yao Qi @ 2017-01-10 14:59 UTC (permalink / raw)
To: Luis Machado; +Cc: gdb-patches
On 17-01-06 10:41:28, Luis Machado wrote:
> This fairly obvious patch adds usage text to the load command's help text.
>
> Originally it did not have usage and mentioned things like FILE and OFFSET
> without explaining how those should be passed in the command.
>
> gdb/ChangeLog:
>
> 2017-01-05 Luis Machado <lgustavo@codesourcery.com>
>
> * symfile (_initialize_symfile): Add usage text to the load command's
> help text.
Patch is good to me, with Simon's suggestion.
--
Yao (é½å°§)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-01-10 14:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-06 16:41 [PATCH] Improve load command's help text Luis Machado
2017-01-06 18:29 ` Simon Marchi
2017-01-06 18:31 ` Luis Machado
2017-01-10 14:59 ` Yao Qi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).