aboutsummaryrefslogtreecommitdiff
path: root/sim
diff options
context:
space:
mode:
Diffstat (limited to 'sim')
-rw-r--r--sim/common/ChangeLog12
-rw-r--r--sim/common/sim-trace.c17
-rw-r--r--sim/common/sim-trace.h12
3 files changed, 35 insertions, 6 deletions
diff --git a/sim/common/ChangeLog b/sim/common/ChangeLog
index 1822604..95d9d7e 100644
--- a/sim/common/ChangeLog
+++ b/sim/common/ChangeLog
@@ -1,3 +1,15 @@
+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.
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index 0fa2313..bbdff62 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -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.
@@ -76,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[] =
@@ -106,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 },
@@ -322,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);
@@ -337,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;
@@ -617,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;
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 167e710..53a10f3 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -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.
@@ -63,6 +63,9 @@ enum {
/* Trace fpu operations. */
TRACE_FPU_IDX,
+ /* Trace vpu operations. */
+ TRACE_VPU_IDX,
+
/* Trace branching. */
TRACE_BRANCH_IDX,
@@ -100,6 +103,7 @@ enum {
#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)
@@ -114,6 +118,7 @@ enum {
#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)
@@ -210,12 +215,11 @@ typedef struct _trace_data {
#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)
-/* Traceing functions.
-
- */
+/* Tracing functions. */
/* Prime the trace buffers ready for any trace output.
Must be called prior to any other trace operation */