From 24562d232e40ad8a0d66a74888d43c873389c590 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 8 Jan 2018 21:53:04 +0000 Subject: [PATCH] compiler: don't die if addr2line cannot extract line from backtrace. Fixes #885. --- artiq/compiler/targets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/artiq/compiler/targets.py b/artiq/compiler/targets.py index b3cfdec8d..db626da85 100644 --- a/artiq/compiler/targets.py +++ b/artiq/compiler/targets.py @@ -216,8 +216,12 @@ class Target: filename, line = location.rsplit(":", 1) if filename == "??" or filename == "": 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):