From de46f45f87244ebb4cd78f5c12cf601caef2bd02 Mon Sep 17 00:00:00 2001 From: Matthew Green Date: Sat, 15 Dec 2001 05:08:44 +0000 Subject: * main.c: Include "defs.h", "bfd.h", "callback.h" and "remote-sim.h". (sim_io_error): New function. * sim_calls.c: (sim_io_error): New function. --- sim/ppc/main.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'sim/ppc/main.c') diff --git a/sim/ppc/main.c b/sim/ppc/main.c index a2948e0..3144454 100644 --- a/sim/ppc/main.c +++ b/sim/ppc/main.c @@ -30,6 +30,10 @@ #include "device.h" /* FIXME: psim should provide the interface */ #include "events.h" /* FIXME: psim should provide the interface */ +#include "bfd.h" +#include "callback.h" +#include "remote-sim.h" + #ifdef HAVE_STDLIB_H #include #endif @@ -222,6 +226,22 @@ sim_io_flush_stdoutput(void) } } +void +sim_io_error (SIM_DESC sd, const char *msg, ...) +{ + va_list ap; + va_start(ap, msg); + vprintf(msg, ap); + printf("\n"); + va_end(ap); + + /* any final clean up */ + if (ppc_trace[trace_print_info] && simulation != NULL) + psim_print_info (simulation, ppc_trace[trace_print_info]); + + exit (1); +} + void * zalloc(long size) -- cgit v1.1