forked from M-Labs/artiq
1
0
Fork 0

Fix symbolizer invocation with no addresses.

This commit is contained in:
whitequark 2016-01-10 18:04:10 +00:00
parent d436093317
commit ee1ef551bc
1 changed files with 3 additions and 0 deletions

View File

@ -148,6 +148,9 @@ class Target:
return results["output"].read() return results["output"].read()
def symbolize(self, library, addresses): def symbolize(self, library, addresses):
if addresses == []:
return []
# Addresses point one instruction past the jump; offset them back by 1. # Addresses point one instruction past the jump; offset them back by 1.
offset_addresses = [hex(addr - 1) for addr in addresses] offset_addresses = [hex(addr - 1) for addr in addresses]
with RunTool([self.triple + "-addr2line", "--functions", "--inlines", with RunTool([self.triple + "-addr2line", "--functions", "--inlines",