]> sourceware.org Git - systemtap.git/commitdiff
PR10467 cont'd: be tolerant of bad line numbers
authorJosh Stone <jistone@redhat.com>
Thu, 14 Jan 2010 19:22:23 +0000 (11:22 -0800)
committerJosh Stone <jistone@redhat.com>
Thu, 14 Jan 2010 19:22:23 +0000 (11:22 -0800)
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

index 0d41dab83b1154d2b9dd7f125fa66f8d2a7fd5d7..7dd31d06cbca0c7a8efc0e18805f36346c6b5dd2 100644 (file)
@@ -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])
This page took 0.035563 seconds and 5 git commands to generate.