diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | tapsets.cxx | 5 |
2 files changed, 8 insertions, 1 deletions
@@ -1,3 +1,7 @@ +2008-06-25 Stan Cox <scox@redhat.com> + + * tapsets.cxx (iterate_over_srcfile_lines): Only probe a line once. + 2008-06-24 Tim Moore <timoore@redhat.com> * 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<int> lines_probed; + pair<set<int>::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) |