From 8aaef2fb30152bdc752b135bbeb1fb114b551694 Mon Sep 17 00:00:00 2001 From: Josh Stone Date: Thu, 14 Jan 2010 11:22:23 -0800 Subject: [PATCH] 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. --- dwflpp.cxx | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) 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]) -- 2.43.5