From: Josh Stone Date: Thu, 14 Jan 2010 19:22:23 +0000 (-0800) Subject: PR10467 cont'd: be tolerant of bad line numbers X-Git-Tag: release-1.1~11 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8aaef2fb30152bdc752b135bbeb1fb114b551694;p=systemtap.git PR10467 cont'd: be tolerant of bad line numbers If a line number is invalid for a source file, that should not be a fatal error, as it may still be valid for some other matching source file. * dwflpp.cxx (dwflpp::iterate_over_srcfile_lines): Don't assert that the line must be found, just break out quietly. --- diff --git a/dwflpp.cxx b/dwflpp.cxx index 0d41dab83..7dd31d06c 100644 --- a/dwflpp.cxx +++ b/dwflpp.cxx @@ -1027,16 +1027,13 @@ dwflpp::iterate_over_srcfile_lines (char const * srcfile, ret = dwarf_getsrc_file (module_dwarf, srcfile, l, 0, &srcsp, &nsrcs); - if (line_type != WILDCARD && line_type != RANGE) - dwarf_assert ("dwarf_getsrc_file", ret); + if (ret != 0) /* tolerate invalid line number */ + break; if (line_type == WILDCARD || line_type == RANGE) { Dwarf_Addr line_addr; - if (ret != 0) /* tolerate invalid line number */ - break; - dwarf_lineno (srcsp [0], &lineno); /* Maybe lineno will exceed the input end */ if (line_type == RANGE && lineno > lines[1])