* config.in, configure: Regenerate.
[deliverable/binutils-gdb.git] / sim / common / sim-trace.c
index 2319670fe45523e1fb14605f424efc133f843b67..ccae100c2d71e5d8c325b2f539141e89e21eb002 100644 (file)
@@ -1,5 +1,5 @@
 /* Simulator tracing/debugging support.
-   Copyright (C) 1997, 1998 Free Software Foundation, Inc.
+   Copyright (C) 1997, 1998, 2001 Free Software Foundation, Inc.
    Contributed by Cygnus Support.
 
 This file is part of GDB, the GNU debugger.
@@ -35,6 +35,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,
 #include <strings.h>
 #endif
 #endif
+#ifdef HAVE_STDLIB_H
+#include <stdlib.h>
+#endif
 
 #ifndef SIZE_PHASE
 #define SIZE_PHASE 8
@@ -73,7 +76,8 @@ enum {
   OPTION_TRACE_RANGE,
   OPTION_TRACE_FUNCTION,
   OPTION_TRACE_DEBUG,
-  OPTION_TRACE_FILE
+  OPTION_TRACE_FILE,
+  OPTION_TRACE_VPU
 };
 
 static const OPTION trace_options[] =
@@ -103,6 +107,9 @@ static const OPTION trace_options[] =
   { {"trace-fpu", optional_argument, NULL, OPTION_TRACE_FPU},
       '\0', "on|off", "Trace FPU operations",
       trace_option_handler },
+  { {"trace-vpu", optional_argument, NULL, OPTION_TRACE_VPU},
+      '\0', "on|off", "Trace VPU operations",
+      trace_option_handler },
   { {"trace-branch", optional_argument, NULL, OPTION_TRACE_BRANCH},
       '\0', "on|off", "Trace branching",
       trace_option_handler },
@@ -319,6 +326,13 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
        sim_io_eprintf (sd, "FPU tracing not compiled in, `--trace-fpu' ignored\n");
       break;
 
+    case OPTION_TRACE_VPU :
+      if (WITH_TRACE_VPU_P)
+       return set_trace_option (sd, "-vpu", TRACE_VPU_IDX, arg);
+      else
+       sim_io_eprintf (sd, "VPU tracing not compiled in, `--trace-vpu' ignored\n");
+      break;
+
     case OPTION_TRACE_BRANCH :
       if (WITH_TRACE_BRANCH_P)
        return set_trace_option (sd, "-branch", TRACE_BRANCH_IDX, arg);
@@ -334,6 +348,7 @@ trace_option_handler (SIM_DESC sd, sim_cpu *cpu, int opt,
        {
          if (set_trace_option (sd, "-semantics", TRACE_ALU_IDX, arg) != SIM_RC_OK
              || set_trace_option (sd, "-semantics", TRACE_FPU_IDX, arg) != SIM_RC_OK
+             || set_trace_option (sd, "-semantics", TRACE_VPU_IDX, arg) != SIM_RC_OK
              || set_trace_option (sd, "-semantics", TRACE_MEMORY_IDX, arg) != SIM_RC_OK
              || set_trace_option (sd, "-semantics", TRACE_BRANCH_IDX, arg) != SIM_RC_OK)
            return SIM_RC_FAIL;
@@ -614,6 +629,7 @@ trace_idx_to_str (int trace_idx)
     case TRACE_EVENTS_IDX:  return "events:  ";
     case TRACE_FPU_IDX:     return "fpu:     ";
     case TRACE_BRANCH_IDX:  return "branch:  ";
+    case TRACE_VPU_IDX:     return "vpu:     ";
     default:
       sprintf (num, "?%d?", trace_idx);
       return num;
@@ -812,7 +828,7 @@ void
 trace_generic (SIM_DESC sd,
               sim_cpu *cpu,
               int trace_idx,
-              char *fmt,
+              const char *fmt,
               ...)
 {
   va_list ap;
@@ -1247,7 +1263,7 @@ trace_one_insn (SIM_DESC sd, sim_cpu *cpu, address_word pc,
 
          if (bfd_find_nearest_line (STATE_PROG_BFD (CPU_STATE (cpu)),
                                     STATE_TEXT_SECTION (CPU_STATE (cpu)),
-                                    (struct symbol_cache_entry **) 0,
+                                    (struct bfd_symbol **) 0,
                                     pc - STATE_TEXT_START (CPU_STATE (cpu)),
                                     &pc_filename, &pc_function, &pc_linenum))
            {
This page took 0.034288 seconds and 4 git commands to generate.