summaryrefslogtreecommitdiff
path: root/sim/common/sim-trace.h
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>1997-04-17 14:06:10 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>1997-04-17 14:06:10 +0000
commit15d8adf5b56ba1200a1b1ff52558ef4dd0e44307 (patch)
tree29d76bc3250c9ebd2952bef01d0951e29938211d /sim/common/sim-trace.h
parentd4f1c49e78428ef479c64855afbcf1d354266c5b (diff)
downloadbinutils-gdb-15d8adf5b56ba1200a1b1ff52558ef4dd0e44307.tar.gz
Clean up.
Diffstat (limited to 'sim/common/sim-trace.h')
-rw-r--r--sim/common/sim-trace.h71
1 files changed, 7 insertions, 64 deletions
diff --git a/sim/common/sim-trace.h b/sim/common/sim-trace.h
index 2707269c491..ff28a6b5764 100644
--- a/sim/common/sim-trace.h
+++ b/sim/common/sim-trace.h
@@ -23,9 +23,10 @@ with this program; if not, write to the Free Software Foundation, Inc.,
#ifndef SIM_TRACE_H
#define SIM_TRACE_H
-/* Tracing support. */
+/* forward reference */
+struct _sim_cpu;
-#if WITH_SMP
+/* Tracing support. */
/* Return non-zero if tracing of IDX is enabled for CPU. */
#define TRACE_P(cpu,idx) \
@@ -34,42 +35,13 @@ with this program; if not, write to the Free Software Foundation, Inc.,
/* Non-zero if "--trace-insn" specified for CPU. */
#define TRACE_INSN_P(cpu) TRACE_P (cpu, TRACE_INSN_IDX)
+/* Non-zero if "--trace-decode" specified for CPU. */
+#define TRACE_DECODE_P(cpu) TRACE_P (cpu, TRACE_DECODE_IDX)
-#define TRACE_PRINTF(cpu, idx, args) \
-do { \
- if ((WITH_TRACE & (1 << (idx))) != 0 \
- && CPU_TRACE_FLAGS (cpu)[idx] != 0) \
- trace_printf args; \
-} while (0)
-
-#else
-
-/* Fetch current tracing flags. */
-#define CURRENT_TRACE_FLAGS CPU_TRACE_FLAGS (& CURRENT_STATE->cpu)
-
-/* Return non-zero if tracing of IDX is enabled. */
-#define TRACE_P(idx) \
-((WITH_TRACE & (1 << (idx))) != 0 \
- && CURRENT_TRACE_FLAGS[idx] != 0)
-
-/* Non-zero if "--trace-insn" specified. */
-#define TRACE_INSN_P TRACE_P (TRACE_INSN_IDX)
-
-#define TRACE_PRINTF(idx, args) \
-do { \
- if ((WITH_TRACE & (1 << (idx))) != 0 \
- && CURRENT_TRACE_FLAGS[idx] != 0) \
- trace_printf args; \
-} while (0)
-
-#endif /* WITH_SMP */
-
-extern void trace_printf PARAMS ((char *, ...));
+extern void trace_printf PARAMS ((struct _sim_cpu *, const char *, ...));
/* Debug support. */
-#if WITH_SMP
-
/* Return non-zero if debugging of IDX for CPU is enabled. */
#define DEBUG_P(cpu, idx) \
((WITH_DEBUG & (1 << (idx))) != 0 \
@@ -78,35 +50,6 @@ extern void trace_printf PARAMS ((char *, ...));
/* Non-zero if "--debug-insn" specified. */
#define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX)
-#define DEBUG_PRINTF(cpu, idx, args) \
-do { \
- if ((WITH_DEBUG & (1 << (idx))) != 0 \
- && CPU_DEBUG_FLAGS (cpu)[idx] != 0) \
- debug_printf args; \
-} while (0)
-
-#else
-
-/* Fetch current debugging flags. */
-#define CURRENT_DEBUG_FLAGS CPU_DEBUG_FLAGS (& CURRENT_STATE->cpu)
-
-/* Return non-zero if debugging of IDX is enabled. */
-#define DEBUG_P(idx) \
-((WITH_DEBUG & (1 << (idx))) != 0 \
- && CURRENT_DEBUG_FLAGS[idx] != 0)
-
-/* Non-zero if "--debug-insn" specified. */
-#define DEBUG_INSN_P DEBUG_P (DEBUG_INSN_IDX)
-
-#define DEBUG_PRINTF(idx, args) \
-do { \
- if ((WITH_DEBUG & (1 << (idx))) != 0 \
- && CURRENT_DEBUG_FLAGS[idx] != 0) \
- debug_printf args; \
-} while (0)
-
-#endif /* WITH_SMP */
-
-extern void debug_printf PARAMS ((char *, ...));
+extern void debug_printf PARAMS ((struct _sim_cpu *, const char *, ...));
#endif /* SIM_TRACE_H */