[PATCH] gdb/disassembly: Update to handle non-statement addresses

Pedro Alves pedro@palves.net
Fri Jul 24 10:59:16 GMT 2020


On 7/24/20 10:13 AM, Andrew Burgess wrote:
> * Tom Tromey <tom@tromey.com> [2020-07-23 14:44:40 -0600]:
> 
>> Pedro> I've always thought that these two paragraphs are backwards -- i.e.,
>> Pedro> that we should describe /s first since it's the preferred format,
>> Pedro> and then /m should be described in comparison to /s.
>>
>> How about the appended?
>>
>> Tom
>>
>> commit 007c27fe2c11a35d7f8b6b13077b6d42dffb06bd
>> Author: Tom Tromey <tromey@adacore.com>
>> Date:   Thu Jul 23 14:43:11 2020 -0600
>>
>>     Update "disassemble" help
>>     
>>     Pedro pointed out that disassemble/m should be documented after
>>     disassemble/s, because /m is deprecated.  This patch does so, and adds
>>     a usage line.
>>     
>>     Regression tested on x86-64 Fedora 32.
>>     
>>     gdb/ChangeLog
>>     2020-07-23  Tom Tromey  <tromey@adacore.com>
>>     
>>             * cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
>>             help.  Add usage.
>>
>> diff --git a/gdb/ChangeLog b/gdb/ChangeLog
>> index 37035206f49..f0732ef0331 100644
>> --- a/gdb/ChangeLog
>> +++ b/gdb/ChangeLog
>> @@ -1,3 +1,8 @@
>> +2020-07-23  Tom Tromey  <tromey@adacore.com>
>> +
>> +	* cli/cli-cmds.c (_initialize_cli_cmds): Rearrange "disassemble"
>> +	help.  Add usage.
>> +
>>  2020-07-23  Tom de Vries  <tdevries@suse.de>
>>  
>>  	PR tui/26282
>> diff --git a/gdb/cli/cli-cmds.c b/gdb/cli/cli-cmds.c
>> index 14718d1181a..300f7725cb0 100644
>> --- a/gdb/cli/cli-cmds.c
>> +++ b/gdb/cli/cli-cmds.c
>> @@ -2528,8 +2528,13 @@ can be shown using \"show listsize\"."));
>>  
>>    c = add_com ("disassemble", class_vars, disassemble_command, _("\
>>  Disassemble a specified section of memory.\n\
>> +Usage: disassemble[/m|/r|/s] START [, END]\n\
>>  Default is the function surrounding the pc of the selected frame.\n\
>>  \n\
>> +With a /s modifier, source lines are included (if available).\n\
>> +In this mode, the output is still in PC address order, and\n\
>> +file names and contents for all relevant source files are displayed.\n\
> 
> Doesn't really make sense any more, "output is still in PC address",
> the use of 'still' seems odd as this is the first description for this
> command.  How about replacing it with 'displayed'.

+1

Thanks,
Pedro Alves


More information about the Gdb-patches mailing list