Use DIE.tag if the DW_AT_name does not exist
Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
parent
bd7cbef0c0
commit
20c20d87e6
11
main.py
11
main.py
|
@ -58,7 +58,16 @@ def load_children(parent_die):
|
|||
|
||||
|
||||
def safe_DIE_name(die, default=''):
|
||||
return die.attributes['DW_AT_name'].value.decode('utf-8', errors='ignore') if 'DW_AT_name' in die.attributes else default
|
||||
name = ''
|
||||
|
||||
if 'DW_AT_name' in die.attributes:
|
||||
name = die.attributes['DW_AT_name'].value.decode('utf-8', errors='ignore')
|
||||
elif configuration['print_debug_info']:
|
||||
name = die.tag
|
||||
else:
|
||||
name = default
|
||||
|
||||
return name
|
||||
|
||||
|
||||
class Bear():
|
||||
|
|
Loading…
Reference in New Issue
Block a user