mirror of
https://github.com/cirosantilli/linux-kernel-module-cheat.git
synced 2026-01-26 11:41:35 +01:00
give up on trac2line full porting, just call sh script for now
This commit is contained in:
13
common.py
13
common.py
@@ -200,7 +200,15 @@ def resolve_args(defaults, args, extra_args):
|
||||
argcopy.__dict__ = dict(list(defaults.items()) + list(argcopy.__dict__.items()) + list(extra_args.items()))
|
||||
return argcopy
|
||||
|
||||
def run_cmd(cmd, cmd_file=None, out_file=None, show_stdout=True, extra_env=None, **kwargs):
|
||||
def run_cmd(
|
||||
cmd,
|
||||
cmd_file=None,
|
||||
out_file=None,
|
||||
show_stdout=True,
|
||||
show_cmd=True,
|
||||
extra_env=None,
|
||||
**kwargs
|
||||
):
|
||||
'''
|
||||
Run a command. Write the command to stdout before running it.
|
||||
|
||||
@@ -235,7 +243,8 @@ def run_cmd(cmd, cmd_file=None, out_file=None, show_stdout=True, extra_env=None,
|
||||
extra_env = {}
|
||||
env = os.environ.copy()
|
||||
env.update(extra_env)
|
||||
print_cmd(cmd, cmd_file, extra_env=extra_env)
|
||||
if show_cmd:
|
||||
print_cmd(cmd, cmd_file, extra_env=extra_env)
|
||||
# Otherwise Ctrl + C gives:
|
||||
# - ugly Python stack trace for gem5 (QEMU takes over terminal and is fine).
|
||||
# - kills Python, and that then kills GDB: https://stackoverflow.com/questions/19807134/does-python-always-raise-an-exception-if-you-do-ctrlc-when-a-subprocess-is-exec
|
||||
|
||||
Reference in New Issue
Block a user