You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. */
-#include "config.h"
+/* This must come before any other includes. */
+#include "defs.h"
+
#include <errno.h>
#include <stdlib.h>
+#include "diagnostics.h"
#include "dis-asm.h"
#include "bfd.h"
#include "sim-main.h"
#include "sim-fpu.h"
+#include "sim/callback.h"
#ifndef SIZE_INSTRUCTION
#define SIZE_INSTRUCTION 16
}
void
-cgen_trace_extract (SIM_CPU *cpu, IADDR pc, char *name, ...)
+cgen_trace_extract (SIM_CPU *cpu, IADDR pc, const char *name, ...)
{
va_list args;
int printed_one_p = 0;
- char *fmt;
+ const char *fmt;
va_start (args, name);
do {
int type,ival;
- fmt = va_arg (args, char *);
+ fmt = va_arg (args, const char *);
if (fmt)
{
{
case 'x' :
ival = va_arg (args, int);
+ DIAGNOSTIC_PUSH
+ DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL
trace_printf (CPU_STATE (cpu), cpu, fmt, ival);
+ DIAGNOSTIC_POP
break;
default :
abort ();
}
void
-cgen_trace_result (SIM_CPU *cpu, char *name, int type, ...)
+cgen_trace_result (SIM_CPU *cpu, const char *name, int type, ...)
{
va_list args;
This is only for tracing semantic code. */
void
-cgen_trace_printf (SIM_CPU *cpu, char *fmt, ...)
+cgen_trace_printf (SIM_CPU *cpu, const char *fmt, ...)
{
va_list args;