]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
* infrun.c (proceed): Move switching out and in of tfind mode from
authorPedro Alves <palves@redhat.com>
Fri, 11 Feb 2011 15:04:48 +0000 (15:04 +0000)
committerPedro Alves <palves@redhat.com>
Fri, 11 Feb 2011 15:04:48 +0000 (15:04 +0000)
here ...
(fetch_inferior_event): ... to here.

gdb/ChangeLog
gdb/infrun.c

index 41c076bc06cf6493cb972432add9143705f515c4..9f935d31355602e30df1720006d76149144600aa 100644 (file)
@@ -1,3 +1,9 @@
+2011-02-11  Pedro Alves  <pedro@codesourcery.com>
+
+       * infrun.c (proceed): Move switching out and in of tfind mode from
+       here ...
+       (fetch_inferior_event): ... to here.
+
 2011-01-18  Joel Brobecker  <brobecker@adacore.com>
 
        * ada-valprint.c (ada_print_scalar): Remove unsigned char downcast.
index 3ac82f6afed6a0dae254f26e61bcaef6a83e9b65..20ce924d6a93ee7ec078c1773704409887ec092c 100644 (file)
@@ -1954,16 +1954,6 @@ proceed (CORE_ADDR addr, enum target_signal siggnal, int step)
                        "infrun: proceed (addr=%s, signal=%d, step=%d)\n",
                        paddress (gdbarch, addr), siggnal, step);
 
-  /* We're handling a live event, so make sure we're doing live
-     debugging.  If we're looking at traceframes while the target is
-     running, we're going to need to get back to that mode after
-     handling the event.  */
-  if (non_stop)
-    {
-      make_cleanup_restore_current_traceframe ();
-      set_traceframe_number (-1);
-    }
-
   if (non_stop)
     /* In non-stop, each thread is handled individually.  The context
        must already be set to the right thread here.  */
@@ -2607,6 +2597,16 @@ fetch_inferior_event (void *client_data)
   /* We'll update this if & when we switch to a new thread.  */
   previous_inferior_ptid = inferior_ptid;
 
+  /* We're handling a live event, so make sure we're doing live
+     debugging.  If we're looking at traceframes while the target is
+     running, we're going to need to get back to that mode after
+     handling the event.  */
+  if (non_stop)
+    {
+      make_cleanup_restore_current_traceframe ();
+      set_traceframe_number (-1);
+    }
+
   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