Commit 9ca0d5e1 authored by Wentong Wu's avatar Wentong Wu Committed by Anas Nashif
Browse files

scripts: elf_helper.py: add analyze for DW_TAG_typedef



add analyze for DW_TAG_typedef in order to catch all the
kernel objects.

Fixes: #16760.

Signed-off-by: default avatarWentong Wu <wentong.wu@intel.com>
parent c18ff87c
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -336,6 +336,15 @@ def analyze_die_array(die):
    type_env[die.offset] = ArrayType(die.offset, elements, type_offset)


def analyze_typedef(die):
    type_offset = die_get_type_offset(die)

    if type_offset not in type_env.keys():
        return

    type_env[die.offset] = type_env[type_offset]


def addr_deref(elf, addr):
    for section in elf.iter_sections():
        start = section['sh_addr']
@@ -404,6 +413,8 @@ class ElfHelper:
                    analyze_die_const(die)
                elif die.tag == "DW_TAG_array_type":
                    analyze_die_array(die)
                elif die.tag == "DW_TAG_typedef":
                    analyze_typedef(die)
                elif die.tag == "DW_TAG_variable":
                    variables.append(die)