sim: trace: drop unused trace_one_insn
authorMike Frysinger <vapier@gentoo.org>
Wed, 24 Jun 2015 15:09:07 +0000 (22:09 +0700)
committerMike Frysinger <vapier@gentoo.org>
Wed, 24 Jun 2015 15:10:30 +0000 (11:10 -0400)
Everyone has migrated to the split functions (trace_prefix + trace_generic)
a while ago, so we can drop this one now.

sim/common/ChangeLog
sim/common/sim-trace.c
sim/common/sim-trace.h

index 37f97dc4aea745e764bb4071a9453280927c3364..ffb7ea8a0f03248dadfdca135d44c7b1e857e056 100644 (file)
@@ -1,3 +1,8 @@
+2015-06-24  Mike Frysinger  <vapier@gentoo.org>
+
+       * sim-trace.c (trace_one_insn): Delete.
+       * sim-trace.h (trace_one_insn): Delete.
+
 2015-06-24  Mike Frysinger  <vapier@gentoo.org>
 
        * sim-trace.c (debug_printf): Rename to ...
index 40286e14f21ad93d7c7d558778f7685d9beafe18..e69c62df290c0d168a9385c197a176a34b16e20c 100644 (file)
@@ -1218,91 +1218,6 @@ trace_vprintf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, va_list ap)
     }
 }
 
-/* The function trace_one_insn has been replaced by the function pair
-   trace_prefix() + trace_generic().  It is still used. */
-void
-trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
-               int line_p, const char *filename, int linenum,
-               const char *phase_wo_colon, const char *fmt,
-               ...)
-{
-  va_list ap;
-  char phase[SIZE_PHASE+2];
-
-  strncpy (phase, phase_wo_colon, SIZE_PHASE);
-  strcat (phase, ":");
-
-  if (!line_p)
-    {
-      trace_printf (sd, cpu, "%-*s %s:%-*d 0x%.*lx ",
-                   SIZE_PHASE+1, phase,
-                   filename,
-                   SIZE_LINE_NUMBER, linenum,
-                   SIZE_PC, (long)pc);
-      va_start (ap, fmt);
-      trace_vprintf (sd, cpu, fmt, ap);
-      va_end (ap);
-      trace_printf (sd, cpu, "\n");
-    }
-  else
-    {
-      char buf[256];
-
-      buf[0] = 0;
-      if (STATE_TEXT_SECTION (CPU_STATE (cpu))
-         && pc >= STATE_TEXT_START (CPU_STATE (cpu))
-         && pc < STATE_TEXT_END (CPU_STATE (cpu)))
-       {
-         const char *pc_filename = (const char *)0;
-         const char *pc_function = (const char *)0;
-         unsigned int pc_linenum = 0;
-
-         if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)),
-                                    STATE_TEXT_SECTION (CPU_STATE (cpu)),
-                                    (struct bfd_symbol **) 0,
-                                    pc - STATE_TEXT_START (CPU_STATE (cpu)),
-                                    &pc_filename, &pc_function, &pc_linenum))
-           {
-             char *p = buf;
-             if (pc_linenum)
-               {
-                 sprintf (p, "#%-*d ", SIZE_LINE_NUMBER, pc_linenum);
-                 p += strlen (p);
-               }
-             else
-               {
-                 sprintf (p, "%-*s ", SIZE_LINE_NUMBER+1, "---");
-                 p += SIZE_LINE_NUMBER+2;
-               }
-
-             if (pc_function)
-               {
-                 sprintf (p, "%s ", pc_function);
-                 p += strlen (p);
-               }
-             else if (pc_filename)
-               {
-                 char *q = (char *) strrchr (pc_filename, '/');
-                 sprintf (p, "%s ", (q) ? q+1 : pc_filename);
-                 p += strlen (p);
-               }
-
-             if (*p == ' ')
-               *p = '\0';
-           }
-       }
-
-      trace_printf (sd, cpu, "%-*s 0x%.*x %-*.*s ",
-                   SIZE_PHASE+1, phase,
-                   SIZE_PC, (unsigned) pc,
-                   SIZE_LOCATION, SIZE_LOCATION, buf);
-      va_start (ap, fmt);
-      trace_vprintf (sd, cpu, fmt, ap);
-      va_end (ap);
-      trace_printf (sd, cpu, "\n");
-    }
-}
-
 void
 trace_printf (SIM_DESC sd, sim_cpu *cpu, const char *fmt, ...)
 {
index 580cd4e1f98469e7b596c39084004e423b857649..28fc35162c8e9558aeb43dc70c1985a9812acc13 100644 (file)
@@ -618,19 +618,6 @@ do { \
 } while (0)
 
 \f
-/* The function trace_one_insn has been replaced by the function pair
-   trace_prefix() + trace_generic() */
-extern void trace_one_insn (SIM_DESC sd,
-                           sim_cpu * cpu,
-                           address_word cia,
-                           int print_linenum_p,
-                           const char *file_name,
-                           int line_nr,
-                           const char *unit,
-                           const char *fmt,
-                           ...)
-     __attribute__((format (printf, 8, 9)));
-
 extern void trace_printf (SIM_DESC, sim_cpu *, const char *, ...)
      __attribute__((format (printf, 3, 4)));
 
This page took 0.030471 seconds and 4 git commands to generate.