summaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.h
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2011-05-26 00:09:59 +0000
committerMike Frysinger <vapier@gentoo.org>2011-05-26 00:09:59 +0000
commit3a49ea9faceb2a5c0d8d3afdee0a057c8ebe9501 (patch)
tree2bb4cee29cc74384e4ec52406a5a892c4252f46a /sim/common/sim-trace.h
parent39f8b7c1fa376ee6d1ecb6ebee6b5fe506d269f4 (diff)
downloadbinutils-gdb-3a49ea9faceb2a5c0d8d3afdee0a057c8ebe9501.tar.gz
sim: add syscall tracing level
It's useful to be able to trace just the system calls the simulated program is calling, so add a new --trace-syscall option for ports to leverage if they choose. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'sim/common/sim-trace.h')
-rw-r--r--sim/common/sim-trace.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 0f616bfd81e..c429b25049e 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -69,6 +69,9 @@ enum {
/* Trace branching. */
TRACE_BRANCH_IDX,
+ /* Trace syscalls. */
+ TRACE_SYSCALL_IDX,
+
/* Add information useful for debugging the simulator to trace output. */
TRACE_DEBUG_IDX,
@@ -105,6 +108,7 @@ enum {
#define TRACE_fpu (1 << TRACE_FPU_IDX)
#define TRACE_vpu (1 << TRACE_VPU_IDX)
#define TRACE_branch (1 << TRACE_BRANCH_IDX)
+#define TRACE_syscall (1 << TRACE_SYSCALL_IDX)
#define TRACE_debug (1 << TRACE_DEBUG_IDX)
/* Preprocessor macros to simplify tests of WITH_TRACE. */
@@ -120,6 +124,7 @@ enum {
#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_SYSCALL_P (WITH_TRACE & TRACE_syscall)
#define WITH_TRACE_DEBUG_P (WITH_TRACE & TRACE_debug)
/* Tracing install handler. */
@@ -217,6 +222,7 @@ typedef struct _trace_data {
#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_SYSCALL_P(cpu) TRACE_P (cpu, TRACE_SYSCALL_IDX)
#define TRACE_DEBUG_P(cpu) TRACE_P (cpu, TRACE_DEBUG_IDX)
/* Tracing functions. */