forked from M-Labs/artiq
compiler: don't die if addr2line cannot extract line from backtrace.
Fixes #885.
This commit is contained in:
parent
3a3f44af53
commit
34a5445802
|
@ -216,8 +216,12 @@ class Target:
|
||||||
filename, line = location.rsplit(":", 1)
|
filename, line = location.rsplit(":", 1)
|
||||||
if filename == "??" or filename == "<synthesized>":
|
if filename == "??" or filename == "<synthesized>":
|
||||||
continue
|
continue
|
||||||
|
if line == "?":
|
||||||
|
line = -1
|
||||||
|
else:
|
||||||
|
line = int(line)
|
||||||
# can't get column out of addr2line D:
|
# 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
|
return backtrace
|
||||||
|
|
||||||
def demangle(self, names):
|
def demangle(self, names):
|
||||||
|
|
Loading…
Reference in New Issue