diff options
author | Stan Shebs <shebs@codesourcery.com> | 2010-04-01 20:30:56 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2010-04-01 20:30:56 +0000 |
commit | 615bcdefbf764206a8e234ba81181c2ccc6c2484 (patch) | |
tree | 9dccf1c4c9bf2a9aadb69b4ad9bd92bce161e835 /gdb | |
parent | fe01d6681b7451f8ae035fc4d0e69e75fb14fdf7 (diff) | |
download | gdb-615bcdefbf764206a8e234ba81181c2ccc6c2484.zip gdb-615bcdefbf764206a8e234ba81181c2ccc6c2484.tar.gz gdb-615bcdefbf764206a8e234ba81181c2ccc6c2484.tar.bz2 |
2010-04-01 Stan Shebs <stan@codesourcery.com>
* tracepoint.c (trace_start_command): Confirm if trace is running.
(trace_stop_command): Error if trace not running.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/tracepoint.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 814a336..81ec47a 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,8 @@ +2010-04-01 Stan Shebs <stan@codesourcery.com> + + * tracepoint.c (trace_start_command): Confirm if trace is running. + (trace_stop_command): Error if trace not running. + 2010-04-01 H.J. Lu <hongjiu.lu@intel.com> * amd64-tdep.c (amd64_byte_names): Add "ah", "bh", "ch", "dh". diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index f82e05e..14fcbc5 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 (); } |