2010-03-26 Stan Shebs <stan@codesourcery.com>
authorStan Shebs <shebs@codesourcery.com>
Sat, 27 Mar 2010 00:12:34 +0000 (00:12 +0000)
committerStan Shebs <shebs@codesourcery.com>
Sat, 27 Mar 2010 00:12:34 +0000 (00:12 +0000)
* tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.

gdb/ChangeLog
gdb/tracepoint.c

index d539e8f..6f7ef22 100644 (file)
@@ -1,3 +1,7 @@
+2010-03-26  Stan Shebs  <stan@codesourcery.com>
+
+       * tracepoint.c (disconnect_or_stop_tracing): Get out of tfind mode.
+
 2010-03-26  Tom Tromey  <tromey@redhat.com>
 
        * breakpoint.c (commands_command_1): Duplicate 'arg'.
index 42210d4..daa2161 100644 (file)
@@ -1745,6 +1745,13 @@ disconnect_or_stop_tracing (int from_tty)
       if (!cont)
        stop_tracing ();
     }
+
+  /* Also we want to be out of tfind mode, otherwise things can get
+     confusing upon reconnection.  Just use these calls instead of
+     full tfind_1 behavior because we're in the middle of detaching,
+     and there's no point to updating current stack frame etc.  */
+  set_traceframe_number (-1);
+  set_traceframe_context (NULL);
 }
 
 /* Worker function for the various flavors of the tfind command.  */