aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.h
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2010-05-06 00:21:53 +0000
committerPedro Alves <palves@redhat.com>2010-05-06 00:21:53 +0000
commiteda5a4d72028db748b14d3995f49d6c8b609e9b1 (patch)
tree636dc0361832fa3fb27e1fb53680caa8012d15e1 /gdb/disasm.h
parent02357a4aafd655e14222cdfa5e1c316bd1bbb092 (diff)
downloadfsf-binutils-gdb-eda5a4d72028db748b14d3995f49d6c8b609e9b1.zip
fsf-binutils-gdb-eda5a4d72028db748b14d3995f49d6c8b609e9b1.tar.gz
fsf-binutils-gdb-eda5a4d72028db748b14d3995f49d6c8b609e9b1.tar.bz2
* amd64-tdep.c: Include disasm.h.
(amd64_insn_length_fprintf, amd64_insn_length_init_dis) (amd64_insn_length): Moved to disasm.c and renamed. (fixup_riprel): Adjust. * disasm.c (do_ui_file_delete): New. (gdb_insn_length): New. (gdb_buffered_insn_length_fprintf) (gdb_buffered_insn_length_init_dis) (gdb_buffered_insn_length): New, moved from amd64-tdep.c, and renamed. * disasm.h (gdb_insn_length): Declare. (gdb_buffered_insn_length): Declare.
Diffstat (limited to 'gdb/disasm.h')
-rw-r--r--gdb/disasm.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/gdb/disasm.h b/gdb/disasm.h
index c2f5ec3..e308985 100644
--- a/gdb/disasm.h
+++ b/gdb/disasm.h
@@ -37,4 +37,16 @@ extern void gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
extern int gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
struct ui_file *stream, int *branch_delay_insns);
+/* Return the length in bytes of the instruction at address MEMADDR in
+ debugged memory. */
+
+extern int gdb_insn_length (struct gdbarch *gdbarch, CORE_ADDR memaddr);
+
+/* Return the length in bytes of INSN, originally at MEMADDR. MAX_LEN
+ is the size of the buffer containing INSN. */
+
+extern int gdb_buffered_insn_length (struct gdbarch *gdbarch,
+ const gdb_byte *insn, int max_len,
+ CORE_ADDR memaddr);
+
#endif