From: mrg Date: Sat, 15 Dec 2001 05:08:44 +0000 (+0000) Subject: * main.c: Include "defs.h", "bfd.h", "callback.h" and "remote-sim.h". X-Git-Tag: cygwin_daemon_merge_HEAD~1511 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=6353eaa4ef35f840181c6f0cb2f8517c4711c26c;p=pf3gnuchains%2Fpf3gnuchains4x.git * 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. --- diff --git a/sim/ppc/ChangeLog b/sim/ppc/ChangeLog index dc5d004bb7..47a7f1f850 100644 --- a/sim/ppc/ChangeLog +++ b/sim/ppc/ChangeLog @@ -1,3 +1,9 @@ +2001-12-15 matthew green + + * 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. + 2001-12-14 matthew green * Makefile.in (LIB_OBJ): Add @sim_fpu@. diff --git a/sim/ppc/main.c b/sim/ppc/main.c index a2948e0a6b..31444546af 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) diff --git a/sim/ppc/sim_calls.c b/sim/ppc/sim_calls.c index b6defa0778..72f90d23d5 100644 --- a/sim/ppc/sim_calls.c +++ b/sim/ppc/sim_calls.c @@ -441,6 +441,16 @@ sim_io_flush_stdoutput(void) } } +void +sim_io_error (SIM_DESC sd, const char *fmt, ...) +{ + va_list ap; + va_start(ap, fmt); + callbacks->evprintf_filtered (callbacks, fmt, ap); + va_end(ap); + callbacks->error (callbacks, ""); +} + /****/ void *