2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
authorHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 3 May 2013 15:43:58 +0000 (15:43 +0000)
committerHafiz Abid Qadeer <abidh@codesourcery.com>
Fri, 3 May 2013 15:43:58 +0000 (15:43 +0000)
* tracepoint.c (cmd_qtinit): Call 'stop_tracing'.

2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>

* status-stop.exp (test_tstart_tstart): Check for error
returned by the second 'tstart' command.

gdb/gdbserver/ChangeLog
gdb/gdbserver/tracepoint.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/status-stop.exp

index e34d03fa4e2b6854beb7766bb468ecb428fafdee..16a2e798893b968facf97b73b8f95209fe33e43f 100644 (file)
@@ -1,3 +1,7 @@
+2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
+
+       * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
+
 2013-04-25  Hui Zhu  <hui@codesourcery.com>
 
        PR gdb/15186
index 419765bd73151f43ce632908345e199da5f64aa5..1ff61143465dc4bb5f1740c3bb663651ddfbde7f 100644 (file)
@@ -2354,6 +2354,8 @@ cmd_qtinit (char *packet)
   /* Make sure we don't try to read from a trace frame.  */
   current_traceframe = -1;
 
+  stop_tracing ();
+
   trace_debug ("Initializing the trace");
 
   clear_installed_tracepoints ();
index bfd7b68cf06b62f40ddad7067e224f10706f0bcd..ca1e0fb01077c1fe909745c8b24331e45b7ed2a1 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
+
+       * status-stop.exp (test_tstart_tstart): Check for error
+       returned by the second 'tstart' command.
+
 2013-03-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
 
        * gdb.xml/maint_print_struct.exp: New file.
index bca03d2a58d1ca3bf63c6e2e6d123dec54709d92..10e2f4e74fdd5f4c7d341f653429f92e20f70660 100644 (file)
@@ -79,9 +79,13 @@ proc test_tstart_tstart { } {
        gdb_test "trace func1" "Tracepoint \[0-9\] at $hex: file.*"
        gdb_test_no_output "tstart"
 
-       gdb_test "tstart" "" "tstart again" \
-           "A trace is running already.  Start a new run\\? \\(y or n\\) " \
-           "y"
+       set test "tstart again"
+       gdb_test_multiple "tstart" $test {
+           -re "A trace is running already.  Start a new run.*y or n.*" {
+               # Send 'y' and make sure that we don't get any error.
+               gdb_test_no_output "y" $test
+           }
+       }
     }
 }
 
This page took 0.042495 seconds and 4 git commands to generate.