diff options
author | Stan Shebs <shebs@codesourcery.com> | 2009-12-31 17:39:53 +0000 |
---|---|---|
committer | Stan Shebs <shebs@codesourcery.com> | 2009-12-31 17:39:53 +0000 |
commit | 383e5f855398acb5ff53f32cde88bdfa675d7931 (patch) | |
tree | f4ca352d9fea486435ebeba83bcb27e1f8f71172 /gdb/tracepoint.c | |
parent | a6da20b52c17c80c5123758341d23d92b80e2fb1 (diff) | |
download | gdb-383e5f855398acb5ff53f32cde88bdfa675d7931.zip gdb-383e5f855398acb5ff53f32cde88bdfa675d7931.tar.gz gdb-383e5f855398acb5ff53f32cde88bdfa675d7931.tar.bz2 |
* tracepoint.c (trace_find_command): Error out if trace running.
(trace_find_pc_command): Ditto.
(trace_find_tracepoint_command): Ditto.
(trace_find_line_command): Ditto.
(trace_find_range_command): Ditto.
(trace_find_outside_command): Ditto.
Diffstat (limited to 'gdb/tracepoint.c')
-rw-r--r-- | gdb/tracepoint.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index 201c859..26a836d 100644 --- a/gdb/tracepoint.c +++ b/gdb/tracepoint.c @@ -1875,6 +1875,9 @@ trace_find_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (deprecated_trace_find_hook) deprecated_trace_find_hook (args, from_tty); @@ -1937,6 +1940,9 @@ trace_find_pc_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) pc = regcache_read_pc (get_current_regcache ()); else @@ -1958,6 +1964,9 @@ trace_find_tracepoint_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { if (tracepoint_number == -1) @@ -1994,6 +2003,9 @@ trace_find_line_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { sal = find_pc_line (get_frame_pc (get_current_frame ()), 0); @@ -2089,6 +2101,9 @@ trace_find_range_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ printf_filtered ("Usage: tfind range <startaddr>,<endaddr>\n"); @@ -2128,6 +2143,9 @@ trace_find_outside_command (char *args, int from_tty) if (target_is_remote ()) { + if (trace_running_p) + error ("May not look at trace frames while trace is running."); + if (args == 0 || *args == 0) { /* XXX FIXME: what should default behavior be? */ printf_filtered ("Usage: tfind outside <startaddr>,<endaddr>\n"); |