2002-09-30 23:57:26 +08:00
|
|
|
/* Disassemble support for GDB.
|
2013-01-01 14:33:28 +08:00
|
|
|
Copyright (C) 2002-2013 Free Software Foundation, Inc.
|
2002-09-30 23:57:26 +08: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-24 02:08:50 +08:00
|
|
|
the Free Software Foundation; either version 3 of the License, or
|
2002-09-30 23:57:26 +08: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-24 02:08:50 +08:00
|
|
|
along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
2002-09-30 23:57:26 +08:00
|
|
|
|
|
|
|
#ifndef DISASM_H
|
|
|
|
#define DISASM_H
|
|
|
|
|
2009-07-11 22:04:23 +08:00
|
|
|
#define DISASSEMBLY_SOURCE (0x1 << 0)
|
|
|
|
#define DISASSEMBLY_RAW_INSN (0x1 << 1)
|
2009-10-23 08:49:33 +08:00
|
|
|
#define DISASSEMBLY_OMIT_FNAME (0x1 << 2)
|
2012-11-13 23:35:43 +08:00
|
|
|
#define DISASSEMBLY_FILENAME (0x1 << 3)
|
2013-03-11 16:53:17 +08:00
|
|
|
#define DISASSEMBLY_OMIT_PC (0x1 << 4)
|
2009-07-11 22:04:23 +08: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-13 01:41:26 +08:00
|
|
|
struct ui_out;
|
2003-05-12 08:26:19 +08: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-13 01:41:26 +08:00
|
|
|
|
2009-07-03 01:17:42 +08:00
|
|
|
extern void gdb_disassembly (struct gdbarch *gdbarch, struct ui_out *uiout,
|
2009-10-23 08:49:33 +08:00
|
|
|
char *file_string, int flags, int how_many,
|
|
|
|
CORE_ADDR low, CORE_ADDR high);
|
2003-05-04 03:13:04 +08:00
|
|
|
|
2007-06-21 23:18:51 +08: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-04 03:13:04 +08:00
|
|
|
|
2009-07-03 01:17:42 +08:00
|
|
|
extern int gdb_print_insn (struct gdbarch *gdbarch, CORE_ADDR memaddr,
|
|
|
|
struct ui_file *stream, int *branch_delay_insns);
|
2003-05-04 03:13:04 +08:00
|
|
|
|
2010-05-06 08:21:53 +08: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 23:57:26 +08:00
|
|
|
#endif
|