aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Zhu <teawater@gmail.com>2011-05-19 14:06:44 +0000
committerHui Zhu <teawater@gmail.com>2011-05-19 14:06:44 +0000
commitfb80a3c562f75676ff2eadcaedd77f09960bd674 (patch)
tree251842c82df9fc58a8b418e95457eb620ed324a3
parentfda544a25cc0bc04691f5f97dc27d66eb5bb5212 (diff)
downloadgdb-fb80a3c562f75676ff2eadcaedd77f09960bd674.zip
gdb-fb80a3c562f75676ff2eadcaedd77f09960bd674.tar.gz
gdb-fb80a3c562f75676ff2eadcaedd77f09960bd674.tar.bz2
2011-05-19 Hui Zhu <teawater@gmail.com>
* tracepoint.c (tfile_trace_find): Return directly when num is -1.
-rw-r--r--gdb/ChangeLog4
-rw-r--r--gdb/tracepoint.c6
2 files changed, 10 insertions, 0 deletions
diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index 7bfe272..3ba989a 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -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>
diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c
index ab39015..4dae251 100644
--- a/gdb/tracepoint.c
+++ b/gdb/tracepoint.c
@@ -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;