run_cmd: factor out logging of run and rungdb

This commit is contained in:
Ciro Santilli
2018-08-30 10:09:37 +01:00
parent 12d5794547
commit 2cd1224db6
4 changed files with 46 additions and 36 deletions

11
rungdb
View File

@@ -79,13 +79,4 @@ if not args.no_continue:
# which gets put on the kernel build root when python debugging scripts are enabled.
cmd.extend(['-ex', 'continue'] + lx_symbols)
cmd.extend(after)
common.print_cmd(cmd)
# TODO eeval
# "${common.root_dir}/eeval" "$cmd $after" "${common.run_dir}/rungdb.sh"
# Required, otherwise Ctrl + C kills Python and that kills GDB.
# https://stackoverflow.com/questions/19807134/does-python-always-raise-an-exception-if-you-do-ctrlc-when-a-subprocess-is-exec
signal.signal(signal.SIGINT, lambda *args: None)
sys.exit(subprocess.Popen(cmd, cwd=common.linux_variant_dir).wait())
sys.exit(common.run_cmd(cmd, cmd_file=os.path.join(common.run_dir, 'rungdb.sh'), cwd=common.linux_variant_dir))