From 1ebff1fdfdbf851157c55915a6a87ba3b3902823 Mon Sep 17 00:00:00 2001 From: Hafiz Abid Qadeer Date: Fri, 3 May 2013 15:43:58 +0000 Subject: [PATCH] 2013-05-03 Hafiz Abid Qadeer * tracepoint.c (cmd_qtinit): Call 'stop_tracing'. 2013-05-03 Hafiz Abid Qadeer * status-stop.exp (test_tstart_tstart): Check for error returned by the second 'tstart' command. --- gdb/gdbserver/ChangeLog | 4 ++++ gdb/gdbserver/tracepoint.c | 2 ++ gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/gdb.trace/status-stop.exp | 10 +++++++--- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/gdb/gdbserver/ChangeLog b/gdb/gdbserver/ChangeLog index e34d03fa4e2..16a2e798893 100644 --- a/gdb/gdbserver/ChangeLog +++ b/gdb/gdbserver/ChangeLog @@ -1,3 +1,7 @@ +2013-05-03 Hafiz Abid Qadeer + + * tracepoint.c (cmd_qtinit): Call 'stop_tracing'. + 2013-04-25 Hui Zhu PR gdb/15186 diff --git a/gdb/gdbserver/tracepoint.c b/gdb/gdbserver/tracepoint.c index 419765bd731..1ff61143465 100644 --- a/gdb/gdbserver/tracepoint.c +++ b/gdb/gdbserver/tracepoint.c @@ -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 (); diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index bfd7b68cf06..ca1e0fb0107 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2013-05-03 Hafiz Abid Qadeer + + * status-stop.exp (test_tstart_tstart): Check for error + returned by the second 'tstart' command. + 2013-03-27 Walfred Tedeschi * gdb.xml/maint_print_struct.exp: New file. diff --git a/gdb/testsuite/gdb.trace/status-stop.exp b/gdb/testsuite/gdb.trace/status-stop.exp index bca03d2a58d..10e2f4e74fd 100644 --- a/gdb/testsuite/gdb.trace/status-stop.exp +++ b/gdb/testsuite/gdb.trace/status-stop.exp @@ -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 + } + } } } -- 2.30.2