X-Git-Url: https://git.lttng.org/?a=blobdiff_plain;f=tests%2Futils%2Fparse-callstack.py;h=c3f0e2e9bc5a5d5278cb650cd09abbd5b9f8af38;hb=fd2b5c0de05df73c04b4281f2a27f558a17d1edb;hp=3bfddd9eff36631b5d179f6495c672d7e28c9965;hpb=9d16b343fb9e781fc8d8fa3c448a3f382306dd33;p=lttng-tools.git diff --git a/tests/utils/parse-callstack.py b/tests/utils/parse-callstack.py index 3bfddd9ef..c3f0e2e9b 100755 --- a/tests/utils/parse-callstack.py +++ b/tests/utils/parse-callstack.py @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 # # Copyright (C) 2017 Francis Deslauriers # @@ -24,7 +24,9 @@ def addr2line(executable, addr): # Expand inlined functions cmd += ['--addresses', addr] - addr2line_output = subprocess.getoutput(' '.join(cmd)) + status = subprocess.run(cmd, stdout=subprocess.PIPE, check=True) + + addr2line_output = status.stdout.decode("utf-8") # Omit the last 2 lines as the caller of main can not be determine fcts = [addr2line_output.split()[-2]]