+ cmd += ["--addresses", addr]
+
+ status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True)
+
+ addr2line_output = status.stdout.decode("utf-8").splitlines()
+ # addr2line's output is made of 3-tuples:
+ # - address
+ # - function name
+ # - source location
+ if len(addr2line_output) % 3 != 0:
+ raise Exception(
+ "Unexpected addr2line output:\n\t{}".format("\n\t".join(addr2line_output))
+ )