(compilation_unit, debug_info)
return None
Returns the range offset for a given compilation unit
       in a given debug_info.
Returns the range offset for a given compilation unit
       in a given debug_info.
Returns the range offset for a given compilation unit in a given debug_info .
def get_range_for(compilation_unit, debug_info):
    '''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 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]
    return None
def get_range_for ( compilation_unit , 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 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 ] return None