From fb80a3c562f75676ff2eadcaedd77f09960bd674 Mon Sep 17 00:00:00 2001 From: Hui Zhu Date: Thu, 19 May 2011 14:06:44 +0000 Subject: [PATCH] 2011-05-19 Hui Zhu * tracepoint.c (tfile_trace_find): Return directly when num is -1. --- gdb/ChangeLog | 4 ++++ gdb/tracepoint.c | 6 ++++++ 2 files changed, 10 insertions(+) diff --git a/gdb/ChangeLog b/gdb/ChangeLog index 7bfe2725d8a..3ba989a482f 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2011-05-19 Hui Zhu + + * tracepoint.c (tfile_trace_find): Return directly when num is -1. + 2011-05-19 Hui Zhu * xcoffread.c (read_xcoff_symtab): Initialize fcn_aux_saved. diff --git a/gdb/tracepoint.c b/gdb/tracepoint.c index ab390152e8a..4dae2516efb 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; -- 2.30.2