From 1a80261170635e5b9e2f211fe7a2e39c5e95da33 Mon Sep 17 00:00:00 2001 From: Juraj Oravec Date: Sat, 11 May 2024 15:40:36 +0200 Subject: [PATCH] Fix printing entry when address and symbol are bad Signed-off-by: Juraj Oravec --- main.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index 8b8e953..8cb9d7e 100644 --- a/main.py +++ b/main.py @@ -265,7 +265,14 @@ class Bear(): def pretty_print(self): for entry in self.flat_list: - print('{address}\t{variable_name}'.format(address=entry['address'], + address = '' + if 'address' in entry: + address=entry['address'] + + if not address and entry['name'] == '?': + continue + + print('{address}\t{variable_name}'.format(address=address, variable_name=entry['name'])) def parse_location(self, die, attr):