forked from M-Labs/artiq
1
0
Fork 0

compiler: don't die if addr2line cannot extract line from backtrace.

Fixes #885.
This commit is contained in:
whitequark 2018-01-08 21:53:04 +00:00
parent 3a3f44af53
commit 34a5445802
1 changed files with 5 additions and 1 deletions

View File

@ -216,8 +216,12 @@ class Target:
filename, line = location.rsplit(":", 1)
if filename == "??" or filename == "<synthesized>":
continue
if line == "?":
line = -1
else:
line = int(line)
# can't get column out of addr2line D:
backtrace.append((filename, int(line), -1, function, address))
backtrace.append((filename, line, -1, function, address))
return backtrace
def demangle(self, names):