2011-05-19 Hui Zhu <teawater@gmail.com>
authorHui Zhu <teawater@gmail.com>
Thu, 19 May 2011 14:06:44 +0000 (14:06 +0000)
committerHui Zhu <teawater@gmail.com>
Thu, 19 May 2011 14:06:44 +0000 (14:06 +0000)
* tracepoint.c (tfile_trace_find): Return directly when num is -1.

gdb/ChangeLog
gdb/tracepoint.c

index 7bfe272..3ba989a 100644 (file)
@@ -1,5 +1,9 @@
 2011-05-19  Hui Zhu  <teawater@gmail.com>
 
+       * tracepoint.c (tfile_trace_find): Return directly when num is -1.
+
+2011-05-19  Hui Zhu  <teawater@gmail.com>
+
        * xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved.
 
 2011-05-18  Tom Tromey  <tromey@redhat.com>
index ab39015..4dae251 100644 (file)
@@ -3815,6 +3815,12 @@ tfile_trace_find (enum trace_find_type type, int num,
      first.  */
   if (type != tfind_number)
     set_tfile_traceframe ();
+  else if (num == -1)
+    {
+      if (tpp)
+        *tpp = -1;
+      return -1;
+    }
 
   lseek (trace_fd, trace_frames_offset, SEEK_SET);
   offset = trace_frames_offset;