Index: ChangeLog =================================================================== RCS file: /cvs/src/src/gdb/ChangeLog,v retrieving revision 1.11212 diff -u -p -r1.11212 ChangeLog --- ChangeLog 8 Jan 2010 13:54:40 -0000 1.11212 +++ ChangeLog 8 Jan 2010 16:53:31 -0000 @@ -1,3 +1,9 @@ +2010-01-08 Vladimir Prus + + Fix multiexec race. + * infrun.c (handle_inferior_event): Use get_thread_regcache + with events ptid, not get_current_regcache. + 2009-01-08 Joel Brobecker GDB crash with empty executable name (MinGW). Index: infrun.c =================================================================== RCS file: /cvs/src/src/gdb/infrun.c,v retrieving revision 1.423 diff -u -p -r1.423 infrun.c --- infrun.c 5 Jan 2010 20:55:18 -0000 1.423 +++ infrun.c 8 Jan 2010 16:53:31 -0000 @@ -3232,7 +3232,8 @@ targets should add new threads to the th if (ecs->event_thread->stop_signal == TARGET_SIGNAL_TRAP) { int thread_hop_needed = 0; - struct address_space *aspace = get_regcache_aspace (get_current_regcache ()); + struct address_space *aspace = + get_regcache_aspace (get_thread_regcache (ecs->ptid)); /* Check if a regular breakpoint has been hit before checking for a potential single step breakpoint. Otherwise, GDB will