* 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.
This commit is contained in:
Matthew Green 2001-12-15 05:08:44 +00:00
parent c9b2b0e016
commit de46f45f87
3 changed files with 36 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2001-12-15 matthew green <mrg@redhat.com>
* 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 <mrg@redhat.com>
* Makefile.in (LIB_OBJ): Add @sim_fpu@.

View File

@ -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)

View File

@ -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 *