From 871374360e60a3b4f8a721eacbbae71ffb2b66d0 Mon Sep 17 00:00:00 2001 From: Harry Cheng Date: Wed, 31 Jul 2019 20:44:43 +0800 Subject: [PATCH] Compatible with older python --- tools/addr2line.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/addr2line.py b/tools/addr2line.py index f02b415..675962c 100755 --- a/tools/addr2line.py +++ b/tools/addr2line.py @@ -13,7 +13,7 @@ for line in lines: match = re.search('#([0-9]+) PC: (0x[0-9A-F]+) FP: (0x[0-9A-F]+)', line) if match: addr = match.group(2) - process = subprocess.run([addrline, '-e', 'target/{0}/{1}/rcore'.format(arch, mode), '-f', '-C', addr], capture_output=True) + process = subprocess.run([addrline, '-e', 'target/{0}/{1}/rcore'.format(arch, mode), '-f', '-C', addr], stdout=subprocess.PIPE, stderr=subprocess.PIPE) res = process.stdout.decode('utf-8') print('#{0} PC: {1} FP: {3} {2}'.format(match.group(1), match.group(2), res.strip(), match.group(3))) else: