GDB (API)
|
00001 /* Disassemble support for GDB. 00002 Copyright (C) 2002-2013 Free Software Foundation, Inc. 00003 00004 This file is part of GDB. 00005 00006 This program is free software; you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation; either version 3 of the License, or 00009 (at your option) any later version. 00010 00011 This program is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with this program. If not, see <http://www.gnu.org/licenses/>. */ 00018 00019 #ifndef DISASM_H 00020 #define DISASM_H 00021 00022 #define DISASSEMBLY_SOURCE (0x1 << 0) 00023 #define DISASSEMBLY_RAW_INSN (0x1 << 1) 00024 #define DISASSEMBLY_OMIT_FNAME (0x1 << 2) 00025 #define DISASSEMBLY_FILENAME (0x1 << 3) 00026 #define DISASSEMBLY_OMIT_PC (0x1 << 4) 00027 00028 struct ui_out; 00029 struct ui_file; 00030 00031 extern void gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout, 00032 char *file_string, int flags, int how_many, 00033 CORE_ADDR low, CORE_ADDR high); 00034 00035 /* Print the instruction at address MEMADDR in debugged memory, 00036 on STREAM. Returns the length of the instruction, in bytes, 00037 and, if requested, the number of branch delay slot instructions. */ 00038 00039 extern int gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr, 00040 struct ui_file *stream, int *branch_delay_insns); 00041 00042 /* Return the length in bytes of the instruction at address MEMADDR in 00043 debugged memory. */ 00044 00045 extern int gdb_insn_length (struct gdbarch *gdbarch, CORE_ADDR memaddr); 00046 00047 /* Return the length in bytes of INSN, originally at MEMADDR. MAX_LEN 00048 is the size of the buffer containing INSN. */ 00049 00050 extern int gdb_buffered_insn_length (struct gdbarch *gdbarch, 00051 const gdb_byte *insn, int max_len, 00052 CORE_ADDR memaddr); 00053 00054 #endif