* tracepoint.c (trace_find_command): Error out if trace running.
authorStan Shebs <shebs@codesourcery.com>
Thu, 31 Dec 2009 17:39:53 +0000 (17:39 +0000)
committerStan Shebs <shebs@codesourcery.com>
Thu, 31 Dec 2009 17:39:53 +0000 (17:39 +0000)
(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.

gdb/ChangeLog
gdb/tracepoint.c

index 0fce7b9..4f538ac 100644 (file)
@@ -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.
index 201c859..26a836d 100644 (file)
@@ -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");