diff options
author | Andrew Cagney <cagney@redhat.com> | 2003-09-09 04:41:32 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 2003-09-09 04:41:32 +0000 |
commit | a89aa300140bab0f0a12c652367635c8291cad9c (patch) | |
tree | b9337d57c18415468aee0fb6c100b7a04f80f013 /gdb/disasm.c | |
parent | 88a82a65e0c920f2b543fb1c9eed02b8554b2db2 (diff) | |
download | gdb-a89aa300140bab0f0a12c652367635c8291cad9c.zip gdb-a89aa300140bab0f0a12c652367635c8291cad9c.tar.gz gdb-a89aa300140bab0f0a12c652367635c8291cad9c.tar.bz2 |
2003-09-04 Andrew Cagney <cagney@redhat.com>
* avr-tdep.c: Include "dis-asm.h".
* cris-tdep.c: Include "dis-asm.h".
(cris_delayed_get_disassembler): Use "struct disassemble_info"
instead of corresponding typedef.
* h8300-tdep.c: Include "dis-asm.h".
* ia64-tdep.c: Include "dis-asm.h".
* i386-tdep.c: Include "dis-asm.h".
(i386_print_insn): Use "struct disassemble_info" instead of
corresponding typedef.
* m68k-tdep.c: Include "dis-asm.h".
* mcore-tdep.c: Include "dis-asm.h".
* mips-tdep.c: Include "dis-asm.h".
(gdb_print_insn_mips): Make static, use "struct disassemble_info"
instead of corresponding typedef.
* ns32k-tdep.c: Include "dis-asm.h".
* s390-tdep.c: Include "dis-asm.h".
* sparc-tdep.c: Include "dis-asm.h".
* vax-tdep.c: Include "dis-asm.h".
* v850-tdep.c: Include "dis-asm.h".
* mn10300-tdep.c: Include "dis-asm.h".
* rs6000-tdep.c: Include "dis-asm.h".
* xstormy16-tdep.c: Include "dis-asm.h".
(_initialize_xstormy16_tdep): Delete "extern" declaration of
print_insn_xstormy16.
* Makefile.in (v850-tdep.o): Update dependencies.
(vax-tdep.o, sparc-tdep.o, s390-tdep.o): Ditto.
(ns32k-tdep.o, mips-tdep.o, mcore-tdep.o): Ditto.
(m68k-tdep.o, ia64-tdep.o, i386-tdep.o): Ditto.
(h8300-tdep.o, cris-tdep.o, avr-tdep.o): Ditto.
(mn10300-tdep.o, xstormy16-tdep.o, disasm.o): Ditto.
(gdbarch_h): Remove $(dis_asm_h).
* disasm.c: Include "dis-asm.h".
(dis_asm_read_memory): Use "struct disassemble_info" instead of
corresponding typedef.
(dis_asm_memory_error, dump_insns, do_assembly_only): Ditto.
(gdb_disassemble_info, gdb_disassembly, gdb_print_insn): Ditto.
* gdbarch.sh: Do not include "dis-asm.h".
(struct disassemble_info): Declare opaque.
(TARGET_PRINT_INSN): Update declaration.
* gdbarch.h, gdbarch.c: Re-generate.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r-- | gdb/disasm.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c index 0dfd20a..5f4d07a 100644 --- a/gdb/disasm.c +++ b/gdb/disasm.c @@ -26,6 +26,7 @@ #include "gdb_string.h" #include "disasm.h" #include "gdbcore.h" +#include "dis-asm.h" /* Disassemble functions. FIXME: We should get rid of all the duplicate code in gdb that does @@ -46,14 +47,15 @@ struct dis_line_entry /* Like target_read_memory, but slightly different parameters. */ static int dis_asm_read_memory (bfd_vma memaddr, bfd_byte *myaddr, unsigned int len, - disassemble_info *info) + struct disassemble_info *info) { return target_read_memory (memaddr, (char *) myaddr, len); } /* Like memory_error with slightly different parameters. */ static void -dis_asm_memory_error (int status, bfd_vma memaddr, disassemble_info *info) +dis_asm_memory_error (int status, bfd_vma memaddr, + struct disassemble_info *info) { memory_error (status, memaddr); } @@ -83,7 +85,7 @@ compare_lines (const void *mle1p, const void *mle2p) } static int -dump_insns (struct ui_out *uiout, disassemble_info * di, +dump_insns (struct ui_out *uiout, struct disassemble_info * di, CORE_ADDR low, CORE_ADDR high, int how_many, struct ui_stream *stb) { @@ -296,7 +298,7 @@ do_mixed_source_and_assembly (struct ui_out *uiout, static void -do_assembly_only (struct ui_out *uiout, disassemble_info * di, +do_assembly_only (struct ui_out *uiout, struct disassemble_info * di, CORE_ADDR low, CORE_ADDR high, int how_many, struct ui_stream *stb) { @@ -324,10 +326,10 @@ fprintf_disasm (void *stream, const char *format, ...) return 0; } -static disassemble_info +static struct disassemble_info gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file) { - disassemble_info di; + struct disassemble_info di; init_disassemble_info (&di, file, fprintf_disasm); di.flavour = bfd_target_unknown_flavour; di.memory_error_func = dis_asm_memory_error; @@ -356,7 +358,7 @@ gdb_disassembly (struct ui_out *uiout, { struct ui_stream *stb = ui_out_stream_new (uiout); struct cleanup *cleanups = make_cleanup_ui_out_stream_delete (stb); - disassemble_info di = gdb_disassemble_info (current_gdbarch, stb->stream); + struct disassemble_info di = gdb_disassemble_info (current_gdbarch, stb->stream); /* To collect the instruction outputted from opcodes. */ struct symtab *symtab = NULL; struct linetable_entry *le = NULL; @@ -390,6 +392,6 @@ gdb_disassembly (struct ui_out *uiout, int gdb_print_insn (CORE_ADDR memaddr, struct ui_file *stream) { - disassemble_info di = gdb_disassemble_info (current_gdbarch, stream); + struct disassemble_info di = gdb_disassemble_info (current_gdbarch, stream); return TARGET_PRINT_INSN (memaddr, &di); } |