Files
linux-kernel-module-cheat/qemu-trace2txt
Ciro Santilli 六四事件 法轮功 a5ec63dc28 CliFunction
2019-01-22 00:00:00 +00:00

28 lines
735 B
Python
Executable File

#!/usr/bin/env python3
import os
import subprocess
import sys
import common
from shell_helpers import LF
def main():
return self.sh.run_cmd(
[
os.path.join(kwargs['qemu_src_dir'], 'scripts/simpletrace.py'), LF,
os.path.join(kwargs['qemu_build_dir'], 'trace-events-all'), LF,
os.path.join(kwargs['qemu_trace_file']), LF,
],
cmd_file=os.path.join(kwargs['run_dir'], 'qemu-trace2txt'),
out_file=kwargs['qemu_trace_txt_file'],
show_stdout=False,
)
if __name__ == '__main__':
parser = self.get_argparse(argparse_args={
'description': 'Convert a QEMU `-trace exec_tb` to text form.'
})
args = self.setup(parser)
sys.exit(main())