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 7bfe2725d8a48757c71fdbec9265e6305a10fbba..3ba989a482f5e3529c96ea6330c7b33cbb3a1884 100644 (file)
@@ -1,3 +1,7 @@
+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.
index ab390152e8a84394b7db221c860021504085f490..4dae2516efbb9e84f01491fcae0a3030598bf2cd 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;