2002-09-30 15:57:26 +00:00
|
|
|
/* Disassemble support for GDB.
|
2011-01-01 15:34:07 +00:00
|
|
|
Copyright (C) 2002, 2007, 2008, 2009, 2010, 2011
|
|
|
|
Free Software Foundation, Inc.
|
2002-09-30 15:57:26 +00:00
|
|
|
|
|
|
|
This file is part of GDB.
|
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
2007-08-23 18:08:50 +00:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2002-09-30 15:57:26 +00:00
|
|
|
(at your option) any later version.
|
|
|
|
|
|
|
|
This program is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
2007-08-23 18:08:50 +00:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2002-09-30 15:57:26 +00:00
|
|
|
|
|
|
|
#ifndef DISASM_H
|
|
|
|
#define DISASM_H
|
|
|
|
|
2009-07-11 14:04:23 +00:00
|
|
|
#define DISASSEMBLY_SOURCE (0x1 << 0)
|
|
|
|
#define DISASSEMBLY_RAW_INSN (0x1 << 1)
|
2009-10-23 00:49:33 +00:00
|
|
|
#define DISASSEMBLY_OMIT_FNAME (0x1 << 2)
|
2009-07-11 14:04:23 +00:00
|
|
|
|
2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
* gdbarch.h: Regnerate.
* symtab.h: Add missing opaque declarations.
* value.h, target.h, symfile.h, stabsread.h: Ditto.
* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-12 17:41:26 +00:00
|
|
|
struct ui_out;
|
2003-05-12 00:26:19 +00:00
|
|
|
struct ui_file;
|
2003-04-12 Andrew Cagney <cagney@redhat.com>
* gdbarch.sh: Add missing opaque declarations.
* gdbarch.h: Regnerate.
* symtab.h: Add missing opaque declarations.
* value.h, target.h, symfile.h, stabsread.h: Ditto.
* x86-64-tdep.h, xmodem.h, monitor.h, typeprint.h: Ditto.
* srec.h, solib-svr4.h, source.h, inferior.h: Ditto.
* ser-unix.h, serial.h, remote-utils.h, gdbcore.h: Ditto.
* ppc-tdep.h, ocd.h, mips-tdep.h, gdbtypes.h: Ditto.
* buildsym.h, builtin-regs.h, linespec.h, language.h: Ditto.
* i387-tdep.h, gdbthread.h, event-top.h, gdb.h: Ditto.
* dwarf2cfi.h, doublest.h, disasm.h, cp-abi.h: Ditto.
* cli-out.h, c-lang.h, ax-gdb.h, arch-utils.h: Ditto.
* ada-lang.h, config/nm-lynx.h, config/nm-linux.h: Ditto.
* config/sparc/tm-sp64.h, config/rs6000/tm-rs6000.h: Ditto.
* config/pa/tm-hppah.h, config/m68k/tm-delta68.h: Ditto.
* cli/cli-setshow.h, cli/cli-script.h: Ditto.
2003-04-12 17:41:26 +00:00
|
|
|
|
2009-07-02 17:17:42 +00:00
|
|
|
extern void gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
2009-10-23 00:49:33 +00:00
|
|
|
char *file_string, int flags, int how_many,
|
|
|
|
CORE_ADDR low, CORE_ADDR high);
|
2003-05-03 19:13:04 +00:00
|
|
|
|
2007-06-21 15:18:51 +00:00
|
|
|
/* Print the instruction at address MEMADDR in debugged memory,
|
|
|
|
on STREAM. Returns the length of the instruction, in bytes,
|
|
|
|
and, if requested, the number of branch delay slot instructions. */
|
2003-05-03 19:13:04 +00:00
|
|
|
|
2009-07-02 17:17:42 +00:00
|
|
|
extern int gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
|
|
|
|
struct ui_file *stream, int *branch_delay_insns);
|
2003-05-03 19:13:04 +00:00
|
|
|
|
2010-05-06 00:21:53 +00:00
|
|
|
/* 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);
|
|
|
|
|
2002-09-30 15:57:26 +00:00
|
|
|
#endif
|