MI: Add -a option to the "-data-disassemble" command
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 14 Aug 2018 13:13:28 +0000 (14:13 +0100)
committerPedro Alves <palves@redhat.com>
Tue, 14 Aug 2018 13:13:28 +0000 (14:13 +0100)
commit26fb3983d7062c6f6bc43028ae2074cc29d22c7e
tree85d063d26e8b205cd713db224064d363decd88b6
parent67943c005fafa4397535766787b4fbda338ac07d
MI: Add -a option to the "-data-disassemble" command

The CLI "disassemble" command allows specifying a single address - in
that case the function surrounding that address is disassembled.

This commit adds this feature to the equivalent MI command
"-data-disassemble".

gdb/ChangeLog:
2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>

* mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
If used, use find_pc_partial_function to find address range
to disassemble.
* mi/mi-main.c (mi_cmd_list_features): Report
"data-disassemble-a-option" feature.
* NEWS: Mention new -data-disassemble option -a.

gdb/doc/ChangeLog:
2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>

* gdb.texinfo (GDB/MI Data Manipulation): Document
"-data-disassemble -a addr".
(GDB/MI Support Commands): Document "data-disassemble-a-option"
feature.

gdb/testsuite/ChangeLog:
2018-08-14  Jan Vrany  <jan.vrany@fit.cvut.cz>

* gdb.mi/mi-disassemble.exp (test_disassembly_only): Add tests for
-data-disassemble -a.
(test_disassembly_bogus_args): Likewise.
gdb/ChangeLog
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/mi/mi-cmd-disas.c
gdb/mi/mi-main.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-disassemble.exp