[RFA,04/12] Update memattr.c help strings
Commit Message
This changes memattr.c to use the GNU style for help strings.
2018-04-29 Tom Tromey <tom@tromey.com>
* memattr.c (_initialize_mem): Update help string.
---
gdb/ChangeLog | 4 ++++
gdb/memattr.c | 14 +++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
Comments
On 04/30/2018 03:37 PM, Tom Tromey wrote:
> This changes memattr.c to use the GNU style for help strings.
>
> 2018-04-29 Tom Tromey <tom@tromey.com>
>
> * memattr.c (_initialize_mem): Update help string.
> ---
> gdb/ChangeLog | 4 ++++
> gdb/memattr.c | 14 +++++++-------
> 2 files changed, 11 insertions(+), 7 deletions(-)
>
> diff --git a/gdb/memattr.c b/gdb/memattr.c
> index 8dad38b039..328a63a19d 100644
> --- a/gdb/memattr.c
> +++ b/gdb/memattr.c
> @@ -603,27 +603,27 @@ _initialize_mem (void)
> Define attributes for memory region or reset memory region handling to\n\
> target-based.\n\
> Usage: mem auto\n\
> - mem <lo addr> <hi addr> [<mode> <width> <cache>],\n\
> -where <mode> may be rw (read/write), ro (read-only) or wo (write-only),\n\
> - <width> may be 8, 16, 32, or 64, and\n\
> - <cache> may be cache or nocache"));
> + mem LOW HIGH [MODE WIDTH CACHE],\n\
> +where MODE may be rw (read/write), ro (read-only) or wo (write-only),\n\
> + WIDTH may be 8, 16, 32, or 64, and\n\
> + CACHE may be cache or nocache"));
>
> add_cmd ("mem", class_vars, enable_mem_command, _("\
> Enable memory region.\n\
> Arguments are the code numbers of the memory regions to enable.\n\
> -Usage: enable mem <code number>...\n\
> +Usage: enable mem [CODE]...\n\
> Do \"info mem\" to see current list of code numbers."), &enablelist);
>
> add_cmd ("mem", class_vars, disable_mem_command, _("\
> Disable memory region.\n\
> Arguments are the code numbers of the memory regions to disable.\n\
> -Usage: disable mem <code number>...\n\
> +Usage: disable mem [CODE]...\n\
> Do \"info mem\" to see current list of code numbers."), &disablelist);
>
> add_cmd ("mem", class_vars, delete_mem_command, _("\
> Delete memory region.\n\
> Arguments are the code numbers of the memory regions to delete.\n\
> -Usage: delete mem <code number>...\n\
> +Usage: delete mem [CODE]...\n\
> Do \"info mem\" to see current list of code numbers."), &deletelist);
>
I was surprised and confused with the references to "code" and
"code numbers" here. These are just the numbers as displayed
in the first column of "info mem", right? How about changing
the references to "code numbers" and "CODE" above to
numbers or IDs? The manuals uses "nums".
Thanks,
Pedro Alves
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>> add_cmd ("mem", class_vars, delete_mem_command, _("\
>> Delete memory region.\n\
>> Arguments are the code numbers of the memory regions to delete.\n\
>> -Usage: delete mem <code number>...\n\
>> +Usage: delete mem [CODE]...\n\
>> Do \"info mem\" to see current list of code numbers."), &deletelist);
>>
Pedro> I was surprised and confused with the references to "code" and
Pedro> "code numbers" here. These are just the numbers as displayed
Pedro> in the first column of "info mem", right? How about changing
Pedro> the references to "code numbers" and "CODE" above to
Pedro> numbers or IDs? The manuals uses "nums".
I went with IDs, like:
add_cmd ("mem", class_vars, delete_mem_command, _("\
Delete memory region.\n\
Arguments are the identifiers of the memory regions to delete.\n\
Usage: delete mem [ID]...\n\
Do \"info mem\" to see current list of IDs."), &deletelist);
Tom
On 05/09/2018 09:34 PM, Tom Tromey wrote:
>>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
>
>>> add_cmd ("mem", class_vars, delete_mem_command, _("\
>>> Delete memory region.\n\
>>> Arguments are the code numbers of the memory regions to delete.\n\
>>> -Usage: delete mem <code number>...\n\
>>> +Usage: delete mem [CODE]...\n\
>>> Do \"info mem\" to see current list of code numbers."), &deletelist);
>>>
>
> Pedro> I was surprised and confused with the references to "code" and
> Pedro> "code numbers" here. These are just the numbers as displayed
> Pedro> in the first column of "info mem", right? How about changing
> Pedro> the references to "code numbers" and "CODE" above to
> Pedro> numbers or IDs? The manuals uses "nums".
>
> I went with IDs, like:
>
> add_cmd ("mem", class_vars, delete_mem_command, _("\
> Delete memory region.\n\
> Arguments are the identifiers of the memory regions to delete.\n\
> Usage: delete mem [ID]...\n\
> Do \"info mem\" to see current list of IDs."), &deletelist);
Great, thanks.
Thanks,
Pedro Alves
@@ -603,27 +603,27 @@ _initialize_mem (void)
Define attributes for memory region or reset memory region handling to\n\
target-based.\n\
Usage: mem auto\n\
- mem <lo addr> <hi addr> [<mode> <width> <cache>],\n\
-where <mode> may be rw (read/write), ro (read-only) or wo (write-only),\n\
- <width> may be 8, 16, 32, or 64, and\n\
- <cache> may be cache or nocache"));
+ mem LOW HIGH [MODE WIDTH CACHE],\n\
+where MODE may be rw (read/write), ro (read-only) or wo (write-only),\n\
+ WIDTH may be 8, 16, 32, or 64, and\n\
+ CACHE may be cache or nocache"));
add_cmd ("mem", class_vars, enable_mem_command, _("\
Enable memory region.\n\
Arguments are the code numbers of the memory regions to enable.\n\
-Usage: enable mem <code number>...\n\
+Usage: enable mem [CODE]...\n\
Do \"info mem\" to see current list of code numbers."), &enablelist);
add_cmd ("mem", class_vars, disable_mem_command, _("\
Disable memory region.\n\
Arguments are the code numbers of the memory regions to disable.\n\
-Usage: disable mem <code number>...\n\
+Usage: disable mem [CODE]...\n\
Do \"info mem\" to see current list of code numbers."), &disablelist);
add_cmd ("mem", class_vars, delete_mem_command, _("\
Delete memory region.\n\
Arguments are the code numbers of the memory regions to delete.\n\
-Usage: delete mem <code number>...\n\
+Usage: delete mem [CODE]...\n\
Do \"info mem\" to see current list of code numbers."), &deletelist);
add_info ("mem", info_mem_command,