aboutsummaryrefslogtreecommitdiff
path: root/gdb/disasm.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2003-09-03 23:46:58 +0000
committerAndrew Cagney <cagney@redhat.com>2003-09-03 23:46:58 +0000
commit242e8be59c4170464ebaa23bf1ffd7aa9ac945b8 (patch)
treee3c2a69dc7431b59c2ceb14740ae5741a068cf89 /gdb/disasm.c
parent92c2346c02b55ad56a1070f625c289e58ddbd740 (diff)
downloadgdb-242e8be59c4170464ebaa23bf1ffd7aa9ac945b8.zip
gdb-242e8be59c4170464ebaa23bf1ffd7aa9ac945b8.tar.gz
gdb-242e8be59c4170464ebaa23bf1ffd7aa9ac945b8.tar.bz2
2003-09-03 Andrew Cagney <cagney@redhat.com>
* disasm.c (fprintf_disasm): New function. (gdb_disassemble_info): Call "init_disassemble_info", instead of INIT_DISASSEMBLE_INFO_NO_ARCH. Do not initialize "insn_sets", reverts 2003-08-14 change. (_initialize_disasm): Call "init_disassemble_info", instead of INIT_DISASSEMBLE_INFO_NO_ARCH.
Diffstat (limited to 'gdb/disasm.c')
-rw-r--r--gdb/disasm.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/gdb/disasm.c b/gdb/disasm.c
index 47bb125..b84571c 100644
--- a/gdb/disasm.c
+++ b/gdb/disasm.c
@@ -313,12 +313,22 @@ do_assembly_only (struct ui_out *uiout, disassemble_info * di,
/* Initialize the disassemble info struct ready for the specified
stream. */
+static int
+fprintf_disasm (void *stream, const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ vfprintf_filtered (stream, format, args);
+ va_end (args);
+ /* Something non -ve. */
+ return 0;
+}
+
static disassemble_info
gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
{
disassemble_info di;
- INIT_DISASSEMBLE_INFO_NO_ARCH (di, file,
- (fprintf_ftype) fprintf_filtered);
+ init_disassemble_info (&di, file, fprintf_disasm);
di.flavour = bfd_target_unknown_flavour;
di.memory_error_func = dis_asm_memory_error;
di.print_address_func = dis_asm_print_address;
@@ -334,7 +344,6 @@ gdb_disassemble_info (struct gdbarch *gdbarch, struct ui_file *file)
di.arch = gdbarch_bfd_arch_info (gdbarch)->arch;
di.mach = gdbarch_bfd_arch_info (gdbarch)->mach;
di.endian = gdbarch_byte_order (gdbarch);
- di.insn_sets = 0;
return di;
}
@@ -395,9 +404,8 @@ extern void _initialize_disasm (void);
void
_initialize_disasm (void)
{
-
- INIT_DISASSEMBLE_INFO_NO_ARCH (deprecated_tm_print_insn_info, gdb_stdout,
- (fprintf_ftype)fprintf_filtered);
+ init_disassemble_info (&deprecated_tm_print_insn_info, gdb_stdout,
+ fprintf_disasm);
deprecated_tm_print_insn_info.flavour = bfd_target_unknown_flavour;
deprecated_tm_print_insn_info.read_memory_func = dis_asm_read_memory;
deprecated_tm_print_insn_info.memory_error_func = dis_asm_memory_error;