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

View File

@ -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):