Fix printing entry when address and symbol are bad

Signed-off-by: Juraj Oravec <jurajoravec@mailo.com>
This commit is contained in:
Juraj Oravec 2024-05-11 15:40:36 +02:00
parent b1256f9072
commit 1a80261170
Signed by: SGOrava
GPG Key ID: 13660A3F1D9F093B

View File

@ -265,7 +265,14 @@ class Bear():
def pretty_print(self): def pretty_print(self):
for entry in self.flat_list: 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'])) variable_name=entry['name']))
def parse_location(self, die, attr): def parse_location(self, die, attr):