From e1f6b279f23644b3c8b49d8eb711faf04f3495fb Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Wed, 29 May 2024 01:09:46 +0200 Subject: [PATCH] Add basic support for ENUM types Signed-off-by: Juraj Oravec --- main.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 70b9469..cff3dfb 100644 --- a/main.py +++ b/main.py @@ -22,6 +22,7 @@ def eprint(*args, **kwargs): if configuration['print_debug_info']: print(*args, file=sys.stderr, **kwargs) + def epprint(*args, **kwargs): if configuration['print_debug_info']: pprint(*args, stream=sys.stderr, **kwargs) @@ -236,6 +237,8 @@ class Bear(): child_entries.append(child_entry) entry['children'] = child_entries + elif die_type.tag == 'DW_TAG_enumeration_type': + entry['type'] = safe_DIE_name(die_type, 'ENUM') else: eprint("Unsupported type:", die_type.tag) @@ -291,7 +294,7 @@ class Bear(): for entry in self.flat_list: address = '' if 'address' in entry: - address=entry['address'] + address = entry['address'] if not address and entry['name'] == '?': continue