binutils-gdb/gdb/doc
Andrew Burgess 08f406e9a1 gdb/mi: new options for -data-disassemble command
Now that the disassembler has two different strategies for laying out
the opcode bytes of an instruction (see /r vs /b for the disassemble
command), I wanted to add support for this to the MI disassemble
command.

Currently the -data-disassemble command takes a single 'mode' value,
which currently has 6 different values (0 -> 5), 3 of these modes
relate to opcode display.

So, clearly I should just add an additional 3 modes to handle the new
opcode format, right?

No, I didn't think that was a great idea either.

So, I wonder, could I adjust the -data-disassemble command in a
backward compatible way, that would allow GDB to move away from using
the mode value altogether?

I think we can.

In this commit, I propose adding two new options to -data-disassemble,
these are:

  --opcodes none|bytes|display
  --source

Additionally, I will make the mode optional, and default to mode 0 if
no mode value is given.  Mode 0 is the simplest, no source code, no
opcodes disassembly mode.

The two new options are only valid for mode 0, if they are used with
any other mode then an error is thrown.

The --opcodes option can add opcodes to the result, with 'bytes' being
equivalent to 'disassemble /b' and 'display' being 'disassemble /r'.

The --source option will enable the /s style source code display, this
is equivalent to modes 4 and 5.  There is no way, using the new
command options to get the now deprecated /m style source code
display, that is mode 1 and 3.

My hope is that new users of the MI will not use the mode at all, and
instead will just use the new options to achieve the output they need.
Existing MI users can continue to use the mode, and will not need to
be updated to use the new options.
2022-10-02 11:58:28 +01:00
..
.gitignore
a4rc.sed
agentexpr.texi
all-cfg.texi
annotate.texinfo
ChangeLog-1991-2021
doxy-index.in
Doxyfile-base.in
Doxyfile-gdb-api.in
Doxyfile-gdb-xref.in
Doxyfile-gdbserver.in
fdl.texi
filter-for-doxygen
filter-params.pl
gdb.texinfo gdb/mi: new options for -data-disassemble command 2022-10-02 11:58:28 +01:00
gpl.texi
guile.texi GDB/doc: Document the Guile `#:unlimited' keyword 2022-09-01 11:30:18 +01:00
lpsrc.sed
Makefile.in
psrc.sed
python.texi gdb/python: restrict the names accepted by gdb.register_window_type 2022-09-22 10:34:15 +01:00
refcard.tex
stabs.texinfo
stack_frame.eps
stack_frame.pdf
stack_frame.png
stack_frame.svg
stack_frame.txt