+2008-08-22 Pedro Alves <pedro@codesourcery.com>
+
+ * infrun.c (proceed): Move back setting previous_inferior_ptid
+ from here ...
+ (wait_for_inferior): ... to here.
+ (fetch_inferior_event): ... and here.
+
2008-08-21 Ulrich Weigand <uweigand@de.ibm.com>
* gdbarch.sh: Include "regcache.h" into gdbarch.c.
/* Fill in with reasonable starting values. */
init_thread_stepping_state (tss);
- /* We'll update this if & when we switch to a new thread. */
- previous_inferior_ptid = inferior_ptid;
-
/* Reset to normal state. */
init_infwait_state ();
overlay_cache_invalid = 1;
+ /* We'll update this if & when we switch to a new thread. */
+ previous_inferior_ptid = inferior_ptid;
+
/* We have to invalidate the registers BEFORE calling target_wait
because they can be loaded from the target while in target_wait.
This makes remote debugging a bit more efficient for those
overlay_cache_invalid = 1;
+ /* We can only rely on wait_for_more being correct before handling
+ the event in all-stop, but previous_inferior_ptid isn't used in
+ non-stop. */
+ if (!ecs->wait_some_more)
+ /* We'll update this if & when we switch to a new thread. */
+ previous_inferior_ptid = inferior_ptid;
+
if (non_stop)
/* In non-stop mode, the user/frontend should not notice a thread
switch due to internal events. Make sure we reverse to the