aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.c
diff options
context:
space:
mode:
authorBen Elliston <bje@au.ibm.com>2001-02-22 20:47:49 +0000
committerBen Elliston <bje@au.ibm.com>2001-02-22 20:47:49 +0000
commit01816cd804ec526927f53f0e408dae8c6ea269f2 (patch)
treea720856f2564cd16f8ad0153d1fedcbe1d8d879b /sim/common/sim-trace.c
parent41c4999810228d4795d0855426bfa4d24bb31230 (diff)
downloadgdb-01816cd804ec526927f53f0e408dae8c6ea269f2.zip
gdb-01816cd804ec526927f53f0e408dae8c6ea269f2.tar.gz
gdb-01816cd804ec526927f53f0e408dae8c6ea269f2.tar.bz2
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.
Diffstat (limited to 'sim/common/sim-trace.c')
-rw-r--r--sim/common/sim-trace.c17
1 files changed, 15 insertions, 2 deletions
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;