This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch]: 2 more needed changes for sim-fpu.c & psim
- From: matthew green <mrg at cygnus dot com>
- To: gdb-patches at sources dot redhat dot com
- Date: Fri, 14 Dec 2001 12:29:18 +1100
- Subject: [patch]: 2 more needed changes for sim-fpu.c & psim
- Organisation: Red Hat, Asia-Pacific.
these provide the missing sim_io_error function that's required for
sim-fpu.c to actually link & be used.
OK?
.mrg.
2001-12-14 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.
Index: main.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/main.c,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 main.c
*** main.c 1999/04/16 01:35:11 1.1.1.1
--- main.c 2001/12/14 01:11:24
***************
*** 30,35 ****
--- 30,40 ----
#include "device.h" /* FIXME: psim should provide the interface */
#include "events.h" /* FIXME: psim should provide the interface */
+ #include "defs.h"
+ #include "bfd.h"
+ #include "callback.h"
+ #include "remote-sim.h"
+
#ifdef HAVE_STDLIB_H
#include <stdlib.h>
#endif
*************** sim_io_flush_stdoutput(void)
*** 220,225 ****
--- 225,248 ----
error("sim_io_flush_stdoutput: invalid switch\n");
break;
}
+ }
+
+ 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);
+
+ #if 0 /* FIXME: `simulation' is static to ppc/main.c */
+ /* any final clean up */
+ if (ppc_trace[trace_print_info] && simulation != NULL)
+ psim_print_info (simulation, ppc_trace[trace_print_info]);
+ #endif
+
+ exit (1);
}
Index: sim_calls.c
===================================================================
RCS file: /cvs/src/src/sim/ppc/sim_calls.c,v
retrieving revision 1.2
diff -p -r1.2 sim_calls.c
*** sim_calls.c 2000/12/08 01:52:41 1.2
--- sim_calls.c 2001/12/14 01:11:28
*************** sim_io_flush_stdoutput(void)
*** 441,446 ****
--- 441,464 ----
}
}
+ 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);
+
+ #if 0 /* FIXME: `simulation' is static to ppc/main.c */
+ /* any final clean up */
+ if (ppc_trace[trace_print_info] && simulation != NULL)
+ psim_print_info (simulation, ppc_trace[trace_print_info]);
+ #endif
+
+ exit (1);
+ }
+
/****/
void *