Skip to content

Commit

Permalink
fixup! [LibOS] Allow run_gdb optionally exposing tty to debug scripts
Browse files Browse the repository at this point in the history
Signed-off-by: g2flyer <[email protected]>
  • Loading branch information
g2flyer committed Jun 14, 2024
1 parent d21c789 commit d555d18
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tools/gramine.in
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,12 @@ if [ "$GDB" == "1" ]; then
PREFIX+=("-x" "$HOST_PAL_PATH/gdb_integration/gramine_linux_gdb.py")
fi
if [ "$GDB_SCRIPT" != "" ]; then
# Run a script in batch mode, and without TTY (so that it can be piped, redirected etc.)
PREFIX+=("-x" "$GDB_SCRIPT" "-batch" "-tty=/dev/null")
# Run a script in batch mode, and ...
PREFIX+=("-x" "$GDB_SCRIPT")
# ... optionally without TTY (so that it can be piped, redirected etc.)
if [ -z ${GDB_TTY+x} ]; then
PREFIX+=("-batch" "-tty=/dev/null")
fi
fi
PREFIX+=("--args")
fi
Expand Down

0 comments on commit d555d18

Please sign in to comment.