Revert 'Remove unused struct serial::name field'
[deliverable/binutils-gdb.git] / sim / ppc / sim_calls.c
index a4ceb3fbe19b1b566e76518b2dbb9d43595aa86b..eb5d1a792b26d21a6807f63215e36dd6377ac410 100644 (file)
@@ -63,7 +63,7 @@ SIM_DESC
 sim_open (SIM_OPEN_KIND kind,
          host_callback *callback,
          struct bfd *abfd,
-         char **argv)
+         char * const *argv)
 {
   callbacks = callback;
 
@@ -77,7 +77,8 @@ sim_open (SIM_OPEN_KIND kind,
   root_device = psim_tree();
   simulator = NULL;
 
-  psim_options(root_device, argv + 1);
+  if (psim_options (root_device, argv + 1, kind) == NULL)
+    return NULL;
 
   if (ppc_trace[trace_opts])
     print_options ();
@@ -97,7 +98,7 @@ sim_close (SIM_DESC sd, int quitting)
 
 
 SIM_RC
-sim_load (SIM_DESC sd, char *prog, bfd *abfd, int from_tty)
+sim_load (SIM_DESC sd, const char *prog, bfd *abfd, int from_tty)
 {
   TRACE(trace_gdb, ("sim_load(prog=%s, from_tty=%d) called\n",
                    prog, from_tty));
@@ -164,8 +165,8 @@ sim_info (SIM_DESC sd, int verbose)
 SIM_RC
 sim_create_inferior (SIM_DESC sd,
                     struct bfd *abfd,
-                    char **argv,
-                    char **envp)
+                    char * const *argv,
+                    char * const *envp)
 {
   unsigned_word entry_point;
   TRACE(trace_gdb, ("sim_create_inferior(start_address=0x%x, ...)\n",
@@ -247,7 +248,7 @@ sim_resume (SIM_DESC sd, int step, int siggnal)
 }
 
 void
-sim_do_command (SIM_DESC sd, char *cmd)
+sim_do_command (SIM_DESC sd, const char *cmd)
 {
   TRACE(trace_gdb, ("sim_do_commands(cmd=%s) called\n",
                    cmd ? cmd : "(null)"));
@@ -259,7 +260,7 @@ sim_do_command (SIM_DESC sd, char *cmd)
 }
 
 char **
-sim_complete_command (SIM_DESC sd, char *text, char *word)
+sim_complete_command (SIM_DESC sd, const char *text, const char *word)
 {
   return NULL;
 }
@@ -385,6 +386,16 @@ sim_io_error (SIM_DESC sd, const char *fmt, ...)
 
 /****/
 
+void NORETURN
+error (const char *msg, ...)
+{
+  va_list ap;
+  va_start(ap, msg);
+  callbacks->evprintf_filtered (callbacks, msg, ap);
+  va_end(ap);
+  callbacks->error (callbacks, "");
+}
+
 void *
 zalloc(long size)
 {
This page took 0.028447 seconds and 4 git commands to generate.