aboutsummaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-06-10 18:02:52 +0800
committerMike Frysinger <vapier@gentoo.org>2015-06-11 10:39:43 -0400
commit83034798de7d11d2e26b3760e26b2c9cadec9fd4 (patch)
tree33c35108b500e798f42abd2e2e1d8f5aa2cfaaa6 /sim/common/sim-trace.c
parentce4eda4a58d4634577cf998b928572bed6779246 (diff)
downloadgdb-83034798de7d11d2e26b3760e26b2c9cadec9fd4.zip
gdb-83034798de7d11d2e26b3760e26b2c9cadec9fd4.tar.gz
gdb-83034798de7d11d2e26b3760e26b2c9cadec9fd4.tar.bz2
sim: trace: centralize the system tracing
First we convert the ETRACE_P to STRACE_EVENTS_P. This means we move from using the sim_events.trace storage to the common sim_state_base.trace_data array. With that deleted, the common trace init code can be simplified so the sim state works the same as the sim cpu.
Diffstat (limited to 'sim/common/sim-trace.c')
-rw-r--r--sim/common/sim-trace.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/sim/common/sim-trace.c b/sim/common/sim-trace.c
index a706f1d..915965d 100644
--- a/sim/common/sim-trace.c
+++ b/sim/common/sim-trace.c
@@ -173,22 +173,14 @@ set_trace_option_mask (SIM_DESC sd, const char *name, int mask, const char *arg)
}
}
- /* update applicable trace bits */
+ /* Update applicable trace bits. */
for (trace_nr = 0; trace_nr < MAX_TRACE_VALUES; ++trace_nr)
{
if ((mask & (1 << trace_nr)) == 0)
continue;
/* Set non-cpu specific values. */
- switch (trace_nr)
- {
- case TRACE_EVENTS_IDX:
- STATE_EVENTS (sd)->trace = trace_val;
- break;
- case TRACE_DEBUG_IDX:
- STATE_TRACE_FLAGS (sd)[trace_nr] = trace_val;
- break;
- }
+ STATE_TRACE_FLAGS (sd)[trace_nr] = trace_val;
/* Set cpu values. */
for (cpu_nr = 0; cpu_nr < MAX_NR_PROCESSORS; cpu_nr++)