2003-04-28 Andrew Cagney <cagney@redhat.com>
[deliverable/binutils-gdb.git] / gdb / d10v-tdep.c
index 0924bc64f0b44c8252bd3ef5a70ed3a7282cbe0f..93236a350fecd66bfb3f6c21d8cb618ce74e9c7c 100644 (file)
@@ -102,8 +102,6 @@ extern void _initialize_d10v_tdep (void);
 
 static CORE_ADDR d10v_read_sp (void);
 
-static CORE_ADDR d10v_read_fp (void);
-
 static void d10v_eva_prepare_to_trace (void);
 
 static void d10v_eva_get_trace_data (void);
@@ -918,12 +916,6 @@ d10v_read_sp (void)
   return (d10v_make_daddr (read_register (D10V_SP_REGNUM)));
 }
 
-static CORE_ADDR
-d10v_read_fp (void)
-{
-  return (d10v_make_daddr (read_register (D10V_FP_REGNUM)));
-}
-
 /* When arguments must be pushed onto the stack, they go on in reverse
    order.  The below implements a FILO (stack) to do this. */
 
@@ -1207,19 +1199,6 @@ trace_info (char *args, int from_tty)
   printf_filtered ("Tracing is currently %s.\n", (tracing ? "on" : "off"));
 }
 
-/* Print the instruction at address MEMADDR in debugged memory,
-   on STREAM.  Returns length of the instruction, in bytes.  */
-
-static int
-print_insn (CORE_ADDR memaddr, struct ui_file *stream)
-{
-  if (TARGET_BYTE_ORDER == BFD_ENDIAN_BIG)
-    tm_print_insn_info.endian = BFD_ENDIAN_BIG;
-  else
-    tm_print_insn_info.endian = BFD_ENDIAN_LITTLE;
-  return TARGET_PRINT_INSN (memaddr, &tm_print_insn_info);
-}
-
 static void
 d10v_eva_prepare_to_trace (void)
 {
@@ -1380,7 +1359,8 @@ display_trace (int low, int high)
          printf_filtered (":");
          printf_filtered ("\t");
          wrap_here ("    ");
-         next_address = next_address + print_insn (next_address, gdb_stdout);
+         next_address += TARGET_PRINT_INSN (next_address,
+                                            &tm_print_insn_info);
          printf_filtered ("\n");
          gdb_flush (gdb_stdout);
        }
@@ -1596,7 +1576,6 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
 
   set_gdbarch_read_pc (gdbarch, d10v_read_pc);
   set_gdbarch_write_pc (gdbarch, d10v_write_pc);
-  set_gdbarch_read_fp (gdbarch, d10v_read_fp);
   set_gdbarch_read_sp (gdbarch, d10v_read_sp);
 
   set_gdbarch_num_regs (gdbarch, d10v_num_regs);
@@ -1673,6 +1652,8 @@ d10v_gdbarch_init (struct gdbarch_info info, struct gdbarch_list *arches)
   /* Return the unwound PC value.  */
   set_gdbarch_unwind_pc (gdbarch, d10v_unwind_pc);
 
+  set_gdbarch_print_insn (gdbarch, print_insn_d10v);
+
   return gdbarch;
 }
 
@@ -1681,8 +1662,6 @@ _initialize_d10v_tdep (void)
 {
   register_gdbarch_init (bfd_arch_d10v, d10v_gdbarch_init);
 
-  tm_print_insn = print_insn_d10v;
-
   target_resume_hook = d10v_eva_prepare_to_trace;
   target_wait_loop_hook = d10v_eva_get_trace_data;
 
This page took 0.039 seconds and 4 git commands to generate.