From eda5a4d72028db748b14d3995f49d6c8b609e9b1 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Thu, 6 May 2010 00:21:53 +0000 Subject: * 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. --- gdb/disasm.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'gdb/disasm.h') 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 -- cgit v1.1