+2001-02-22 Ben Elliston <bje@redhat.com>
+
+ * sim-trace.h (TRACE_VPU_IDX): Add.
+ (TRACE_vpu): Define.
+ (WITH_TRACE_VPU_P): Likewise.
+ (TRACE_VPU_P): Likewise.
+ * sim-trace.c (OPTION_TRACE_VPU): Define.
+ (trace_options): Add --trace-vpu.
+ (trace_option_handler): Handle OPTION_TRACE_VPU.
+ (trace_option_handler): Include VPU tracing in --trace-semantics.
+ (trace_idx_to_str): Handle TRACE_VPU_IDX.
+
2001-02-21 Ben Elliston <bje@redhat.com>
* sim-trace.h (TRACE_BRANCH_INPUT1): New macro.
/* 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.
OPTION_TRACE_RANGE,
OPTION_TRACE_FUNCTION,
OPTION_TRACE_DEBUG,
- OPTION_TRACE_FILE
+ OPTION_TRACE_FILE,
+ OPTION_TRACE_VPU
};
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 },
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);
{
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;
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;
/* 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.
/* Trace fpu operations. */
TRACE_FPU_IDX,
+ /* Trace vpu operations. */
+ TRACE_VPU_IDX,
+
/* Trace branching. */
TRACE_BRANCH_IDX,
#define TRACE_core (1 << TRACE_CORE_IDX)
#define TRACE_events (1 << TRACE_EVENTS_IDX)
#define TRACE_fpu (1 << TRACE_FPU_IDX)
+#define TRACE_vpu (1 << TRACE_VPU_IDX)
#define TRACE_branch (1 << TRACE_BRANCH_IDX)
#define TRACE_debug (1 << TRACE_DEBUG_IDX)
#define WITH_TRACE_CORE_P (WITH_TRACE & TRACE_core)
#define WITH_TRACE_EVENTS_P (WITH_TRACE & TRACE_events)
#define WITH_TRACE_FPU_P (WITH_TRACE & TRACE_fpu)
+#define WITH_TRACE_VPU_P (WITH_TRACE & TRACE_vpu)
#define WITH_TRACE_BRANCH_P (WITH_TRACE & TRACE_branch)
#define WITH_TRACE_DEBUG_P (WITH_TRACE & TRACE_debug)
#define TRACE_CORE_P(cpu) TRACE_P (cpu, TRACE_CORE_IDX)
#define TRACE_EVENTS_P(cpu) TRACE_P (cpu, TRACE_EVENTS_IDX)
#define TRACE_FPU_P(cpu) TRACE_P (cpu, TRACE_FPU_IDX)
+#define TRACE_VPU_P(cpu) TRACE_P (cpu, TRACE_VPU_IDX)
#define TRACE_BRANCH_P(cpu) TRACE_P (cpu, TRACE_BRANCH_IDX)
#define TRACE_DEBUG_P(cpu) TRACE_P (cpu, TRACE_DEBUG_IDX)
\f
-/* Traceing functions.
-
- */
+/* Tracing functions. */
/* Prime the trace buffers ready for any trace output.
Must be called prior to any other trace operation */