aboutsummaryrefslogtreecommitdiff
path: root/gdb/doc
diff options
context:
space:
mode:
authorAnton Kolesov <Anton.Kolesov@synopsys.com>2017-02-10 14:12:06 +0300
committerAnton Kolesov <Anton.Kolesov@synopsys.com>2017-03-28 21:36:35 +0300
commiteea787570f708e51048f812808e6cbd76fde6919 (patch)
treeb3df9e1ebf01db2652e0c1b99cab8b68e814eddb /gdb/doc
parent3be78afdeddd3ebf57eb0df8b029cf596f468c7a (diff)
downloadgdb-eea787570f708e51048f812808e6cbd76fde6919.zip
gdb-eea787570f708e51048f812808e6cbd76fde6919.tar.gz
gdb-eea787570f708e51048f812808e6cbd76fde6919.tar.bz2
arc: Add disassembler helper
Add disassembler helper for GDB, that uses opcodes structure arc_instruction and adds convenience functions to handle instruction operands. This interface solves at least those problems with arc_instruction: * Some instructions, like "push_s", have implicit operands which are not directly present in arc_instruction. * Operands of particular meaning, like branch/jump targets, have various locations and meaning depending on type of branch/target. * Access to operand value is abstracted into a separate function, so callee code shouldn't bother if operand value is an immediate value or in a register. Testcases included in this commit are fairly limited - they test exclusively branch instructions, something that will be used in software single stepping. Most of the other parts of this disassembler helper are tested during prologue analysis testing. gdb/ChangeLog: yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com> * configure.tgt: Add arc-insn.o. * arc-tdep.c (arc_delayed_print_insn): Make non-static. (dump_arc_instruction_command): New function. (arc_fprintf_disasm): Likewise. (arc_disassemble_info): Likewise. (arc_insn_get_operand_value): Likewise. (arc_insn_get_operand_value_signed): Likewise. (arc_insn_get_memory_base_reg): Likewise. (arc_insn_get_memory_offset): Likewise. (arc_insn_get_branch_target): Likewise. (arc_insn_dump): Likewise. (arc_insn_get_linear_next_pc): Likewise. * arc-tdep.h (arc_delayed_print_insn): Add function declaration. (arc_disassemble_info): Likewise. (arc_insn_get_branch_target): Likewise. (arc_insn_get_linear_next_pc): Likewise. * NEWS: Mention new "maint print arc arc-instruction". gdb/doc/ChangeLog: yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com> * gdb.texinfo (Synopsys ARC): Add "maint print arc arc-instruction". gdb/testsuite/ChangeLog: yyyy-mm-dd Anton Kolesov <anton.kolesov@synopsys.com> * gdb.arch/arc-decode-insn.S: New file. * gdb.arch/arc-decode-insn.exp: Likewise.
Diffstat (limited to 'gdb/doc')
-rw-r--r--gdb/doc/ChangeLog4
-rw-r--r--gdb/doc/gdb.texinfo4
2 files changed, 8 insertions, 0 deletions
diff --git a/gdb/doc/ChangeLog b/gdb/doc/ChangeLog
index 5eb3a6c..3088f13 100644
--- a/gdb/doc/ChangeLog
+++ b/gdb/doc/ChangeLog
@@ -1,3 +1,7 @@
+2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
+
+ * gdb.texinfo (Synopsys ARC): Add "maint print arc arc-instruction".
+
2017-03-22 Yao Qi <yao.qi@linaro.org>
* python.texi (Inferiors In Python): Remove @code from Python.
diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
index 90785dc..7e2fc81 100644
--- a/gdb/doc/gdb.texinfo
+++ b/gdb/doc/gdb.texinfo
@@ -22105,6 +22105,10 @@ messages.
@kindex show debug arc
Show the level of ARC specific debugging in operation.
+@item maint print arc arc-instruction @var{address}
+@kindex maint print arc arc-instruction
+Print internal disassembler information about instruction at a given address.
+
@end table
@node ARM