summaryrefslogtreecommitdiffstats
path: root/gdb/tracepoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r--gdb/tracepoint.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index f82e05e8c0..14fcbc58fe 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -1576,6 +1576,13 @@ trace_start_command (char *args, int from_tty)
{
dont_repeat (); /* Like "run", dangerous to repeat accidentally. */
+ if (current_trace_status ()->running)
+ {
+ if (from_tty
+ && !query (_("A trace is running already. Start a new run? ")))
+ error (_("New trace run not started."));
+ }
+
start_tracing ();
}
@@ -1583,6 +1590,9 @@ trace_start_command (char *args, int from_tty)
static void
trace_stop_command (char *args, int from_tty)
{
+ if (!current_trace_status ()->running)
+ error (_("Trace is not running."));
+
stop_tracing ();
}
OpenPOWER on IntegriCloud