From 2ffc79584b10e3e8a9d88f9f86b4fde074a22076 Mon Sep 17 00:00:00 2001 From: Stan Cox Date: Wed, 25 Jun 2008 21:09:24 -0400 Subject: Only probe lines once for the :* wildcard line pattern. --- ChangeLog | 4 ++++ tapsets.cxx | 5 ++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index a741be15..fbebe7b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2008-06-25 Stan Cox + + * tapsets.cxx (iterate_over_srcfile_lines): Only probe a line once. + 2008-06-24 Tim Moore * auto_free.h: New file. diff --git a/tapsets.cxx b/tapsets.cxx index a2e75420..38b075d0 100644 --- a/tapsets.cxx +++ b/tapsets.cxx @@ -1204,6 +1204,8 @@ struct dwflpp for (int l = lineno; ; l = l + 1) { + set lines_probed; + pair::iterator,bool> line_probed; dwarf_assert ("dwarf_getsrc_file", dwarf_getsrc_file (module_dwarf, srcfile, l, 0, @@ -1213,7 +1215,8 @@ struct dwflpp { Dwarf_Addr line_addr; dwarf_lineno (srcsp [0], &lineno); - if (lineno != l) + line_probed = lines_probed.insert(lineno); + if (lineno != l || line_probed.second == false) continue; dwarf_lineaddr (srcsp [0], &line_addr); if (dwarf_haspc (function, line_addr) != 1) -- cgit