This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[rfc] Replace macro TARGET_PRINT_INSN


Hi,

this patch replaces macro TARGET_PRINT_INSN by gdbarch_print_insn


ChangeLog:


	* gdbarch.sh (TARGET_PRINT_INSN): Replace by gdbarch_print_insn.
	* disasm.c (dump_insns, gdb_print_insn): Likewise.
	* gdbarch.c, gdbarch.h: Regenerate.



Is this ok to commit?


-- Markus Deuling GNU Toolchain for Linux on Cell BE deuling@de.ibm.com


diff -urN src/gdb/disasm.c dev/gdb/disasm.c
--- src/gdb/disasm.c	2007-01-09 18:58:50.000000000 +0100
+++ dev/gdb/disasm.c	2007-06-19 06:20:35.000000000 +0200
@@ -135,7 +135,7 @@
 	xfree (name);
 
       ui_file_rewind (stb->stream);
-      pc += TARGET_PRINT_INSN (pc, di);
+      pc += gdbarch_print_insn (current_gdbarch, pc, di);
       ui_out_field_stream (uiout, "inst", stb);
       ui_file_rewind (stb->stream);
       do_cleanups (ui_out_chain);
@@ -393,5 +393,5 @@
 gdb_print_insn (CORE_ADDR memaddr, struct ui_file *stream)
 {
   struct disassemble_info di = gdb_disassemble_info (current_gdbarch, stream);
-  return TARGET_PRINT_INSN (memaddr, &di);
+  return gdbarch_print_insn (current_gdbarch, memaddr, &di);
 }
diff -urN src/gdb/gdbarch.c dev/gdb/gdbarch.c
--- src/gdb/gdbarch.c	2007-06-19 05:22:04.000000000 +0200
+++ dev/gdb/gdbarch.c	2007-06-19 06:18:36.000000000 +0200
@@ -870,12 +870,6 @@
   fprintf_unfiltered (file,
                       "gdbarch_dump: print_float_info = <0x%lx>\n",
                       (long) current_gdbarch->print_float_info);
-#ifdef TARGET_PRINT_INSN
-  fprintf_unfiltered (file,
-                      "gdbarch_dump: %s # %s\n",
-                      "TARGET_PRINT_INSN(vma, info)",
-                      XSTRING (TARGET_PRINT_INSN (vma, info)));
-#endif
   fprintf_unfiltered (file,
                       "gdbarch_dump: print_insn = <0x%lx>\n",
                       (long) current_gdbarch->print_insn);
diff -urN src/gdb/gdbarch.h dev/gdb/gdbarch.h
--- src/gdb/gdbarch.h	2007-06-19 05:22:04.000000000 +0200
+++ dev/gdb/gdbarch.h	2007-06-19 06:18:26.000000000 +0200
@@ -572,12 +572,6 @@
 typedef int (gdbarch_print_insn_ftype) (bfd_vma vma, struct disassemble_info *info);
 extern int gdbarch_print_insn (struct gdbarch *gdbarch, bfd_vma vma, struct disassemble_info *info);
 extern void set_gdbarch_print_insn (struct gdbarch *gdbarch, gdbarch_print_insn_ftype *print_insn);
-#if !defined (GDB_TM_FILE) && defined (TARGET_PRINT_INSN)
-#error "Non multi-arch definition of TARGET_PRINT_INSN"
-#endif
-#if !defined (TARGET_PRINT_INSN)
-#define TARGET_PRINT_INSN(vma, info) (gdbarch_print_insn (current_gdbarch, vma, info))
-#endif
 
 typedef CORE_ADDR (gdbarch_skip_trampoline_code_ftype) (struct frame_info *frame, CORE_ADDR pc);
 extern CORE_ADDR gdbarch_skip_trampoline_code (struct gdbarch *gdbarch, struct frame_info *frame, CORE_ADDR pc);
diff -urN src/gdb/gdbarch.sh dev/gdb/gdbarch.sh
--- src/gdb/gdbarch.sh	2007-06-19 05:22:04.000000000 +0200
+++ dev/gdb/gdbarch.sh	2007-06-19 06:18:20.000000000 +0200
@@ -589,7 +589,7 @@
 M::int:single_step_through_delay:struct frame_info *frame:frame
 # FIXME: cagney/2003-08-28: Need to find a better way of selecting the
 # disassembler.  Perhaps objdump can handle it?
-f:TARGET_PRINT_INSN:int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info::0:
+f::int:print_insn:bfd_vma vma, struct disassemble_info *info:vma, info::0:
 f::CORE_ADDR:skip_trampoline_code:struct frame_info *frame, CORE_ADDR pc:frame, pc::generic_skip_trampoline_code::0
 
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]