mirror of
https://github.com/bminor/binutils-gdb.git
synced 2025-12-27 09:38:57 +00:00
* interp.c (sim_*): Make result void where there isn't one.
(sim_set_pc): Delete. (sim_info): Delete printf_fn arg, all callers changed. Call printf_filtered instead. (sim_close): New function. (sim_load): New function. (sim_create_inferior): Renamed from sim_set_args, all callers changed. * run.c: #include <varargs.h>, "remote-sim.h". (printf_filtered): New function.
This commit is contained in:
24
sim/sh/run.c
24
sim/sh/run.c
@@ -22,10 +22,10 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
|
||||
sac@cygnus.com */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <varargs.h>
|
||||
#include "bfd.h"
|
||||
#include "sysdep.h"
|
||||
|
||||
extern printf();
|
||||
#include "remote-sim.h"
|
||||
|
||||
int
|
||||
main (ac, av)
|
||||
@@ -93,7 +93,7 @@ main (ac, av)
|
||||
}
|
||||
|
||||
start_address = bfd_get_start_address (abfd);
|
||||
sim_set_pc (start_address);
|
||||
sim_create_inferior (start_address, NULL, NULL);
|
||||
if (trace)
|
||||
{
|
||||
int done = 0;
|
||||
@@ -107,7 +107,7 @@ main (ac, av)
|
||||
sim_resume (0, 0);
|
||||
}
|
||||
if (verbose)
|
||||
sim_info (printf, 0);
|
||||
sim_info (0);
|
||||
|
||||
/* Find out what was in r0 and return that */
|
||||
{
|
||||
@@ -121,3 +121,19 @@ main (ac, av)
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Callbacks used by the simulator proper. */
|
||||
|
||||
void
|
||||
printf_filtered (va_alist)
|
||||
va_dcl
|
||||
{
|
||||
va_list args;
|
||||
char *format;
|
||||
|
||||
va_start (args);
|
||||
format = va_arg (args, char *);
|
||||
|
||||
vfprintf (stdout, format, args);
|
||||
va_end (args);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user