Compatible with older python

master
Harry Cheng 5 years ago
parent 902b07d2e5
commit 871374360e

@ -13,7 +13,7 @@ for line in lines:
match = re.search('#([0-9]+) PC: (0x[0-9A-F]+) FP: (0x[0-9A-F]+)', line) match = re.search('#([0-9]+) PC: (0x[0-9A-F]+) FP: (0x[0-9A-F]+)', line)
if match: if match:
addr = match.group(2) 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') 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))) print('#{0} PC: {1} FP: {3} {2}'.format(match.group(1), match.group(2), res.strip(), match.group(3)))
else: else:

Loading…
Cancel
Save