diff --git a/scripts/gen_kobject_list.py b/scripts/gen_kobject_list.py index 7900507d0a8f..dd859db36579 100755 --- a/scripts/gen_kobject_list.py +++ b/scripts/gen_kobject_list.py @@ -131,14 +131,6 @@ def error(text): sys.exit("%s ERROR: %s" % (scr, text)) def debug_die(die, text): - if 'DW_AT_decl_file' not in die.attributes: - abs_orig_val = die.attributes["DW_AT_abstract_origin"].value - offset = abs_orig_val + die.cu.cu_offset - for var in variables: - if var.offset == offset: - die = var - break - lp_header = die.dwarfinfo.line_program_for_CU(die.cu).header files = lp_header["file_entry"] includes = lp_header["include_directory"] @@ -167,7 +159,6 @@ def debug_die(die, text): # Global type environment. Populated by pass 1. type_env = {} extern_env = {} -variables = [] class KobjectInstance: def __init__(self, type_obj, addr): @@ -514,6 +505,8 @@ def find_kobjects(elf, syms): di = elf.get_dwarf_info() + variables = [] + # Step 1: collect all type information. for CU in di.iter_CUs(): for die in CU.iter_DIEs():