Bug 914293 - ensure check_debug_ranges.py can cope with a nonexistant DW_AT_ranges; r=glandium
authorNathan Froyd <froydnj@mozilla.com>
Tue, 10 Sep 2013 11:53:21 -0400
changeset 146568 5f4d6a6d849f9ec86f5442693f6d0a5bf4a16673
parent 146567 b713e1beae2273dc02863adc9f44787ba156bd67
child 146569 bc729c5726bb7f07071e38be62dd8135dbfd4f3d
push id25266
push userryanvm@gmail.com
push dateThu, 12 Sep 2013 00:24:40 +0000
treeherdermozilla-central@162f05aec17a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersglandium
bugs914293
milestone26.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 914293 - ensure check_debug_ranges.py can cope with a nonexistant DW_AT_ranges; r=glandium
build/autoconf/check_debug_ranges.py
js/src/build/autoconf/check_debug_ranges.py
--- a/build/autoconf/check_debug_ranges.py
+++ b/build/autoconf/check_debug_ranges.py
@@ -14,17 +14,17 @@ def get_range_for(compilation_unit, debu
     '''Returns the range offset for a given compilation unit
        in a given debug_info.'''
     name = ranges = ''
     search_cu = False
     for nfo in debug_info.splitlines():
         if 'DW_TAG_compile_unit' in nfo:
             search_cu = True
         elif 'DW_TAG_' in nfo or not nfo.strip():
-            if name == compilation_unit:
+            if name == compilation_unit and ranges != '':
                 return int(ranges, 16)
             name = ranges = ''
             search_cu = False
         if search_cu:
             if 'DW_AT_name' in nfo:
                 name = nfo.rsplit(None, 1)[1]
             elif 'DW_AT_ranges' in nfo:
                 ranges = nfo.rsplit(None, 1)[1]
--- a/js/src/build/autoconf/check_debug_ranges.py
+++ b/js/src/build/autoconf/check_debug_ranges.py
@@ -14,17 +14,17 @@ def get_range_for(compilation_unit, debu
     '''Returns the range offset for a given compilation unit
        in a given debug_info.'''
     name = ranges = ''
     search_cu = False
     for nfo in debug_info.splitlines():
         if 'DW_TAG_compile_unit' in nfo:
             search_cu = True
         elif 'DW_TAG_' in nfo or not nfo.strip():
-            if name == compilation_unit:
+            if name == compilation_unit and ranges != '':
                 return int(ranges, 16)
             name = ranges = ''
             search_cu = False
         if search_cu:
             if 'DW_AT_name' in nfo:
                 name = nfo.rsplit(None, 1)[1]
             elif 'DW_AT_ranges' in nfo:
                 ranges = nfo.rsplit(None, 1)[1]