summaryrefslogtreecommitdiff
path: root/sim/ppc/main.c
diff options
context:
space:
mode:
authorMatthew Green <mrg@redhat.com>2001-12-15 05:08:44 +0000
committerMatthew Green <mrg@redhat.com>2001-12-15 05:08:44 +0000
commitde46f45f87244ebb4cd78f5c12cf601caef2bd02 (patch)
treea3cdb12c0f385d6a12c8b3b3d9b195e9162ddf81 /sim/ppc/main.c
parentc9b2b0e01686e3bf993de41ed8868af3101c2740 (diff)
downloadbinutils-gdb-de46f45f87244ebb4cd78f5c12cf601caef2bd02.tar.gz
* 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.
Diffstat (limited to 'sim/ppc/main.c')
-rw-r--r--sim/ppc/main.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/sim/ppc/main.c b/sim/ppc/main.c
index a2948e0a6b0..31444546afb 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 <stdlib.h>
#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)