summaryrefslogtreecommitdiffstats
path: root/dwflpp.cxx
diff options
context:
space:
mode:
authorJosh Stone <jistone@redhat.com>2010-01-14 11:22:23 -0800
committerJosh Stone <jistone@redhat.com>2010-01-14 11:22:23 -0800
commit8aaef2fb30152bdc752b135bbeb1fb114b551694 (patch)
treea619ab7b5c17e1c047f1b6fa218fcf9417a8cb7c /dwflpp.cxx
parent025e49b203f4f4dc83e02e6440878c64ee616257 (diff)
downloadsystemtap-steved-8aaef2fb30152bdc752b135bbeb1fb114b551694.tar.gz
systemtap-steved-8aaef2fb30152bdc752b135bbeb1fb114b551694.tar.xz
systemtap-steved-8aaef2fb30152bdc752b135bbeb1fb114b551694.zip
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.
Diffstat (limited to 'dwflpp.cxx')
-rw-r--r--dwflpp.cxx7
1 files changed, 2 insertions, 5 deletions
diff --git a/dwflpp.cxx b/dwflpp.cxx
index 0d41dab8..7dd31d06 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])