diff options
author | Andrew Burgess <aburgess@redhat.com> | 2023-10-20 11:15:51 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2023-11-08 11:18:39 +0000 |
commit | f3a8a979bbed4f9462761638a57136fcb38bad68 (patch) | |
tree | 3ad7c23e271ae003959e6735827ed6af5f561c99 /gdb/doc | |
parent | 80968745ee9fd6b48996e35adaf998d1ccf35642 (diff) | |
download | gdb-f3a8a979bbed4f9462761638a57136fcb38bad68.zip gdb-f3a8a979bbed4f9462761638a57136fcb38bad68.tar.gz gdb-f3a8a979bbed4f9462761638a57136fcb38bad68.tar.bz2 |
gdb: error if /r and /b are used with disassemble command
The disassembler gained a new /b flag in this commit:
commit d4ce49b7ac077a9882d6a5e689e260300045ca88
Date: Tue Jun 21 20:23:35 2022 +0100
gdb: disassembler opcode display formatting
The /b and /r flags result in the instruction opcodes displayed in
different formats, so it's not possible to have both at the same
time. Currently the /b flag overrides the /r flag.
We have a similar situation with the /m and /s flags, but here, if the
user tries to use both flags then they will get an error.
I think the error is clearer, so in this commit I propose that we add
an error if /r and /b are both used.
Obviously this change breaks backwards compatibility. I don't have a
compelling argument for why we should make the change beyond my
feeling that it was a mistake not to add this error from the start,
and that the new behaviour is better.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
Diffstat (limited to 'gdb/doc')
-rw-r--r-- | gdb/doc/gdb.texinfo | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo index db1a82e..2cd565e 100644 --- a/gdb/doc/gdb.texinfo +++ b/gdb/doc/gdb.texinfo @@ -10060,12 +10060,20 @@ This specialized command dumps a range of memory as machine instructions. It can also print mixed source+disassembly by specifying the @code{/m} or @code{/s} modifier and print the raw instructions in hex as well as in symbolic form by specifying the @code{/r} or @code{/b} -modifier. The default memory range is the function surrounding the -program counter of the selected frame. A single argument to this -command is a program counter value; @value{GDBN} dumps the function -surrounding this value. When two arguments are given, they should be -separated by a comma, possibly surrounded by whitespace. The arguments -specify a range of addresses to dump, in one of two forms: +modifier. + +Only one of @code{/m} and @code{/s} can be used, attempting to use +both flag will give an error. + +Only one of @code{/r} and @code{/b} can be used, attempting to use +both flag will give an error. + +The default memory range is the function surrounding the program +counter of the selected frame. A single argument to this command is a +program counter value; @value{GDBN} dumps the function surrounding +this value. When two arguments are given, they should be separated by +a comma, possibly surrounded by whitespace. The arguments specify a +range of addresses to dump, in one of two forms: @table @code @item @var{start},@var{end} |