Skip to content

Commit

Permalink
Revert "scripts: add DW_AT_abstract_origin check"
Browse files Browse the repository at this point in the history
This reverts commit 2593a91.

This commit wasn't the root cause of the found bug in dwarf analyze.

Signed-off-by: Wentong Wu <[email protected]>
  • Loading branch information
wentongwu authored and carlescufi committed May 25, 2020
1 parent c07f71e commit 0bf5113
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions scripts/gen_kobject_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down Expand Up @@ -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):
Expand Down Expand Up @@ -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():
Expand Down

0 comments on commit 0bf5113

Please sign in to comment.