From 34a5445802f140ada8023c50f95db5cbd8eb22ab 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):