+2015-06-12 Mike Frysinger <vapier@gentoo.org>
+
+ * sim-module.c (modules): Change WITH_TRACE to WITH_TRACE_ANY_P.
+ * sim-trace.c (trace_option_handler): Likewise.
+ * sim-trace.h (WITH_TRACE_ANY_P): Define.
+ (STRACE_ANY_P): Use WITH_TRACE_ANY_P.
+ (TRACE_ANY_P): Likewise.
+
2015-06-12 Mike Frysinger <vapier@gentoo.org>
* cgen-run.c (sim_resume): Rename TRACE_INSN_FINI to
switch (opt)
{
case 't' :
- if (! WITH_TRACE)
+ if (!WITH_TRACE_ANY_P)
sim_io_eprintf (sd, "Tracing not compiled in, `-t' ignored\n");
else
return set_trace_option_mask (sd, "trace", TRACE_USEFUL_MASK, arg);
#ifdef SIM_HAVE_ADDR_RANGE
case OPTION_TRACE_RANGE :
- if (WITH_TRACE)
+ if (WITH_TRACE_ANY_P)
{
int cpu_nr;
char *chp = arg;
break;
case OPTION_TRACE_FUNCTION :
- if (WITH_TRACE)
+ if (WITH_TRACE_ANY_P)
{
/*wip: need to compute function range given name*/
}
break;
case OPTION_TRACE_FILE :
- if (! WITH_TRACE)
+ if (!WITH_TRACE_ANY_P)
sim_io_eprintf (sd, "Tracing not compiled in, `--trace-file' ignored\n");
else
{
#define TRACE_syscall (1 << TRACE_SYSCALL_IDX)
#define TRACE_debug (1 << TRACE_DEBUG_IDX)
-/* Preprocessor macros to simplify tests of WITH_TRACE. */
+/* Return non-zero if tracing of idx is enabled (compiled in). */
#define WITH_TRACE_P(idx) (WITH_TRACE & (1 << idx))
+
+/* Preprocessor macros to simplify tests of WITH_TRACE. */
+#define WITH_TRACE_ANY_P (WITH_TRACE)
#define WITH_TRACE_INSN_P WITH_TRACE_P (TRACE_INSN_IDX)
#define WITH_TRACE_DECODE_P WITH_TRACE_P (TRACE_DECODE_IDX)
#define WITH_TRACE_EXTRACT_P WITH_TRACE_P (TRACE_EXTRACT_IDX)
(WITH_TRACE_P (idx) && STATE_TRACE_FLAGS (sd)[idx] != 0)
/* Non-zero if --trace-<xxxx> was specified for SD. */
-#define STRACE_ANY_P(sd) ((WITH_TRACE) && (STATE_TRACE_DATA (sd)->trace_any_p))
+#define STRACE_ANY_P(sd) (WITH_TRACE_ANY_P && (STATE_TRACE_DATA (sd)->trace_any_p))
#define STRACE_INSN_P(sd) STRACE_P (sd, TRACE_INSN_IDX)
#define STRACE_DECODE_P(sd) STRACE_P (sd, TRACE_DECODE_IDX)
#define STRACE_EXTRACT_P(sd) STRACE_P (sd, TRACE_EXTRACT_IDX)
(WITH_TRACE_P (idx) && CPU_TRACE_FLAGS (cpu)[idx] != 0)
/* Non-zero if --trace-<xxxx> was specified for CPU. */
-#define TRACE_ANY_P(cpu) ((WITH_TRACE) && (CPU_TRACE_DATA (cpu)->trace_any_p))
+#define TRACE_ANY_P(cpu) (WITH_TRACE_ANY_P && (CPU_TRACE_DATA (cpu)->trace_any_p))
#define TRACE_INSN_P(cpu) TRACE_P (cpu, TRACE_INSN_IDX)
#define TRACE_DECODE_P(cpu) TRACE_P (cpu, TRACE_DECODE_IDX)
#define TRACE_EXTRACT_P(cpu) TRACE_P (cpu, TRACE_EXTRACT_IDX)