* symfile.c (separate_debug_file_exists): Update.
[deliverable/binutils-gdb.git] / gdb / remote-sim.c
index 2c228321dcb010853be86e7e9e822a6f3c7bb207..f5927f2d9668a48c53b7251a2f62371b36a03e3f 100644 (file)
@@ -217,7 +217,7 @@ get_sim_inferior_data (struct inferior *inf, int sim_instance_needed)
       /* Initialize the other instance variables.  */
       sim_data->program_loaded = 0;
       sim_data->gdbsim_desc = sim_desc;
-      sim_data->resume_siggnal = TARGET_SIGNAL_0;
+      sim_data->resume_siggnal = GDB_SIGNAL_0;
       sim_data->resume_step = 0;
     }
   else if (sim_desc)
@@ -1028,11 +1028,11 @@ gdbsim_wait (struct target_ops *ops,
     case sim_stopped:
       switch (sigrc)
        {
-       case TARGET_SIGNAL_ABRT:
+       case GDB_SIGNAL_ABRT:
          quit ();
          break;
-       case TARGET_SIGNAL_INT:
-       case TARGET_SIGNAL_TRAP:
+       case GDB_SIGNAL_INT:
+       case GDB_SIGNAL_TRAP:
        default:
          status->kind = TARGET_WAITKIND_STOPPED;
          status->value.sig = sigrc;
@@ -1198,16 +1198,28 @@ simulator_command (char *args, int from_tty)
   registers_changed ();
 }
 
-static char **
+static VEC (char_ptr) *
 sim_command_completer (struct cmd_list_element *ignore, char *text, char *word)
 {
   struct sim_inferior_data *sim_data;
+  char **tmp;
+  int i;
+  VEC (char_ptr) *result = NULL;
 
   sim_data = inferior_data (current_inferior (), sim_inferior_data_key);
   if (sim_data == NULL || sim_data->gdbsim_desc == NULL)
     return NULL;
 
-  return sim_complete_command (sim_data->gdbsim_desc, text, word);
+  tmp = sim_complete_command (sim_data->gdbsim_desc, text, word);
+  if (tmp == NULL)
+    return NULL;
+
+  /* Transform the array into a VEC, and then free the array.  */
+  for (i = 0; tmp[i] != NULL; i++)
+    VEC_safe_push (char_ptr, result, tmp[i]);
+  xfree (tmp);
+
+  return result;
 }
 
 /* Check to see if a thread is still alive.  */
This page took 0.024996 seconds and 4 git commands to generate.