1 /* This file is part of the program psim.
3 Copyright (C) 1994-1995, Andrew Cagney <cagney@highland.com.au>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 #include "filter_filename.h"
40 trace_register_device
,
66 extern int ppc_trace
[nr_trace_options
];
69 #define TRACE(OBJECT, ARGS) \
71 if (ppc_trace[OBJECT]) { \
72 printf_filtered("%s:%d:%s: ", filter_filename(__FILE__), __LINE__, #OBJECT); \
73 printf_filtered ARGS; \
77 #define ITRACE(OBJECT, ARGS) \
79 if (ppc_trace[OBJECT]) { \
80 printf_filtered("%s:%d:0x%x", my_prefix, cpu_nr(processor) + 1, cia); \
81 printf_filtered ARGS; \
85 #define DTRACE(OBJECT, ARGS) \
87 if (ppc_trace[trace_devices] || ppc_trace[trace_##OBJECT##_device]) { \
88 printf_filtered("%s:%d:%s: ", filter_filename(__FILE__), __LINE__, #OBJECT); \
89 printf_filtered ARGS; \
93 #define TRACE(OBJECT, ARGS)
94 #define ITRACE(OBJECT, ARGS)
95 #define DTRACE(OBJECT, ARGS)
99 #define ASSERT(EXPRESSION) \
101 if (!(EXPRESSION)) { \
102 error("%s:%d: assertion failed - %s\n", \
103 filter_filename(__FILE__), __LINE__, #EXPRESSION); \
107 #define ASSERT(EXPRESSION)
110 /* Parse OPTION updating the trace array */
112 trace_option(const char *option
);
114 /* Output the list of trace options */
119 #endif /* _DEBUG_H_ */
This page took 0.03831 seconds and 4 git commands to generate.