aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Shebs <shebs@codesourcery.com>2009-12-31 17:39:53 +0000
committerStan Shebs <shebs@codesourcery.com>2009-12-31 17:39:53 +0000
commit383e5f855398acb5ff53f32cde88bdfa675d7931 (patch)
treef4ca352d9fea486435ebeba83bcb27e1f8f71172
parenta6da20b52c17c80c5123758341d23d92b80e2fb1 (diff)
downloadgdb-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.
-rw-r--r--gdb/ChangeLog9
-rw-r--r--gdb/tracepoint.c18
2 files changed, 27 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 0fce7b9..4f538ac 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,12 @@
+2009-12-31 Stan Shebs <stan@codesourcery.com>
+
+ * 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.
+
2009-12-31 Joel Brobecker <brobecker@adacore.com>
Internal error while loading core on alpha-tru64.
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");