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 8b07e47785084eedccb7b12f5bde1c967c0bb130..e6867c62eec345ca2bad91bc1ff5830e5a714f8d 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 14e989cd7a2e14ae7267c37f405ff4da682987f5..adc77e7bc1b61add47929804a6314c327d14f190 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."));