2003-09-03 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 2003 23:46:58 +0000 (23:46 +0000)
committerAndrew Cagney <cagney@redhat.com>
Wed, 3 Sep 2003 23:46:58 +0000 (23:46 +0000)
* 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.

gdb/ChangeLog
gdb/disasm.c

index cd63db2f90bec90133ce824836a25d3123099e0d..a3b6fe1a83297dae4253d5a97f342d6d90fb04a3 100644 (file)
@@ -1,3 +1,12 @@
+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.
+
 2003-09-03  Michael Snyder  <msnyder@redhat.com>
 
        * config/djgpp/fnchange.lst: Fix up sim/frv/profile-fr*.[ch].
index 47bb125bfc6d3ae8f7f56d93c30900a9b62bca81..b84571c702cc019d74e28c269e0942563a5f7414 100644 (file)
@@ -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;