Skip to content

Commit d555d18

Browse files
committed
fixup! [LibOS] Allow run_gdb optionally exposing tty to debug scripts
Signed-off-by: g2flyer <[email protected]>
1 parent d21c789 commit d555d18

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

tools/gramine.in

+6-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ if [ "$GDB" == "1" ]; then
2727
PREFIX+=("-x" "$HOST_PAL_PATH/gdb_integration/gramine_linux_gdb.py")
2828
fi
2929
if [ "$GDB_SCRIPT" != "" ]; then
30-
# Run a script in batch mode, and without TTY (so that it can be piped, redirected etc.)
31-
PREFIX+=("-x" "$GDB_SCRIPT" "-batch" "-tty=/dev/null")
30+
# Run a script in batch mode, and ...
31+
PREFIX+=("-x" "$GDB_SCRIPT")
32+
# ... optionally without TTY (so that it can be piped, redirected etc.)
33+
if [ -z ${GDB_TTY+x} ]; then
34+
PREFIX+=("-batch" "-tty=/dev/null")
35+
fi
3236
fi
3337
PREFIX+=("--args")
3438
fi

0 commit comments

Comments
 (0)