* Makefile.in (autoconf-install): New target.
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index 930e4948670e94071a00b06ddff67f91e1eae26d..465565867c9baae31fffc621cdde3daf90190b8a 100644 (file)
@@ -55,9 +55,9 @@ static void gdb_os_flush_stderr PARAMS ((host_callback *));
 /* printf_filtered is depreciated */
 static void gdb_os_printf_filtered PARAMS ((host_callback *, const char *, ...));
 
-static void gdb_os_vprintf_filtered PARAMS ((host_callback *, const char *, void *));
+static void gdb_os_vprintf_filtered PARAMS ((host_callback *, const char *, va_list));
 
-static void gdb_os_evprintf_filtered PARAMS ((host_callback *, const char *, void *));
+static void gdb_os_evprintf_filtered PARAMS ((host_callback *, const char *, va_list));
 
 static void gdb_os_error PARAMS ((host_callback *, const char *, ...));
 
@@ -268,15 +268,15 @@ gdb_os_printf_filtered (p, va_alist)
 /* VARARGS */
 static void
 #ifdef ANSI_PROTOTYPES
-gdb_os_vprintf_filtered (host_callback *p, const char *format, void *ap)
+gdb_os_vprintf_filtered (host_callback *p, const char *format, va_list ap)
 #else
 gdb_os_vprintf_filtered (p, format, ap)
      host_callback *p;
      char *format;
-     void *ap;
+     va_list ap;
 #endif
 {
-  vfprintf_filtered (gdb_stdout, format, (va_list)ap);
+  vfprintf_filtered (gdb_stdout, format, ap);
 }
 
 /* GDB version of error evprintf_filtered.  */
@@ -284,15 +284,15 @@ gdb_os_vprintf_filtered (p, format, ap)
 /* VARARGS */
 static void
 #ifdef ANSI_PROTOTYPES
-gdb_os_evprintf_filtered (host_callback *p, const char *format, void *ap)
+gdb_os_evprintf_filtered (host_callback *p, const char *format, va_list ap)
 #else
 gdb_os_evprintf_filtered (p, format, ap)
      host_callback *p;
      char *format;
-     void *ap;
+     va_list ap;
 #endif
 {
-  vfprintf_filtered (gdb_stderr, format, (va_list)ap);
+  vfprintf_filtered (gdb_stderr, format, ap);
 }
 
 /* GDB version of error callback.  */
@@ -503,9 +503,9 @@ gdbsim_open (args, from_tty)
     error ("Insufficient memory available to allocate simulator arg list.");
   make_cleanup (freeargv, (char *) argv);
 
-  /* FIXME: sim_open may call `error' if it fails, but perhaps it should
-     just return an error indicator and let us call `error'.  */
-  gdbsim_desc = sim_open (argv);
+  gdbsim_desc = sim_open (SIM_OPEN_DEBUG, argv);
+  if (gdbsim_desc == 0)
+    error ("unable to create simulator instance");
 
   push_target (&gdbsim_ops);
   target_fetch_registers (-1);
@@ -709,7 +709,8 @@ simulator_command (args, from_tty)
   /* Note that if the simulator hasn't been opened, gdbsim_desc == NULL
      which is correct (??? assuming of course one wishes to continue to
      allow commands to be sent to unopened simulators, which isn't entirely
-     unreasonable).  */
+     unreasonable).  Simulators should be prepared to deal with any
+     combination of NULL or empty args. */
   sim_do_command (gdbsim_desc, args);
 }
 
This page took 0.024779 seconds and 4 git commands to generate.