ff28a6b57644fa82e8a31a6626b9199d7df0cbbe
1 /* Simulator tracing/debugging support.
2 Copyright (C) 1997 Free Software Foundation, Inc.
3 Contributed by Cygnus Support.
5 This file is part of GDB, the GNU debugger.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License along
18 with this program; if not, write to the Free Software Foundation, Inc.,
19 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
21 /* This file is meant to be included by sim-basics.h. */
26 /* forward reference */
29 /* Tracing support. */
31 /* Return non-zero if tracing of IDX is enabled for CPU. */
32 #define TRACE_P(cpu,idx) \
33 ((WITH_TRACE & (1 << (idx))) != 0 \
34 && CPU_TRACE_FLAGS (cpu)[idx] != 0)
36 /* Non-zero if "--trace-insn" specified for CPU. */
37 #define TRACE_INSN_P(cpu) TRACE_P (cpu, TRACE_INSN_IDX)
38 /* Non-zero if "--trace-decode" specified for CPU. */
39 #define TRACE_DECODE_P(cpu) TRACE_P (cpu, TRACE_DECODE_IDX)
41 extern void trace_printf
PARAMS ((struct _sim_cpu
*, const char *, ...));
45 /* Return non-zero if debugging of IDX for CPU is enabled. */
46 #define DEBUG_P(cpu, idx) \
47 ((WITH_DEBUG & (1 << (idx))) != 0 \
48 && CPU_DEBUG_FLAGS (cpu)[idx] != 0)
50 /* Non-zero if "--debug-insn" specified. */
51 #define DEBUG_INSN_P(cpu) DEBUG_P (cpu, DEBUG_INSN_IDX)
53 extern void debug_printf
PARAMS ((struct _sim_cpu
*, const char *, ...));
55 #endif /* SIM_TRACE_H */