http://sourceware.org/ml/gdb-patches/2012-10/msg00032.html
authorAndrew Burgess <aburgess@broadcom.com>
Thu, 11 Oct 2012 21:25:18 +0000 (21:25 +0000)
committerAndrew Burgess <aburgess@broadcom.com>
Thu, 11 Oct 2012 21:25:18 +0000 (21:25 +0000)
gdb/ChangeLog

        * remote-sim.c (gdbsim_create_inferior): Call init_thread_list to
        reset thread numbering back to 1.

gdb/ChangeLog
gdb/remote-sim.c

index 8b07e47..e6867c6 100644 (file)
@@ -1,3 +1,8 @@
+2012-10-11  Andrew Burgess  <aburgess@broadcom.com>
+
+       * remote-sim.c (gdbsim_create_inferior): Call init_thread_list to
+       reset thread numbering back to 1.
+
 2012-10-11  Doug Evans  <dje@google.com>
 
        PR breakpoints/14643.
index 14e989c..adc77e7 100644 (file)
@@ -640,6 +640,9 @@ gdbsim_create_inferior (struct target_ops *target, char *exec_file, char *args,
   else
     argv = NULL;
 
+  if (!have_inferiors ())
+    init_thread_list ();
+
   if (sim_create_inferior (sim_data->gdbsim_desc, exec_bfd, argv, env)
       != SIM_RC_OK)
     error (_("Unable to create sim inferior."));