Skip to content

Commit 170daed

Browse files
davidwelch158David Welch
andauthored
Disable pagination on gdb startup (#373)
* Disable pagination as the gdb interface freezes while it waits for the user to press 'enter' to continue. Use '-iex' rather '-ex' for the gdb startup arguments so they execute before .gdbinit is executed, in case the .gdbinit generates any output requiring paging. Co-authored-by: David Welch <[email protected]>
1 parent 9a36de1 commit 170daed

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

gdbgui/server/sessionmanager.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,11 +89,12 @@ def add_new_debug_session(
8989
gdbgui_startup_cmds = [
9090
f"new-ui {mi_version} {pty_for_gdbgui.name}",
9191
f"set inferior-tty {pty_for_debugged_program.name}",
92+
"set pagination off",
9293
]
9394
# instead of writing to the pty after it starts, add startup
9495
# commands to gdb. This allows gdb to be run as sudo and prompt for a
9596
# password, for example.
96-
gdbgui_startup_cmds_str = " ".join([f"-ex='{c}'" for c in gdbgui_startup_cmds])
97+
gdbgui_startup_cmds_str = " ".join([f"-iex='{c}'" for c in gdbgui_startup_cmds])
9798
pty_for_gdb = Pty(cmd=f"{gdb_command} {gdbgui_startup_cmds_str}")
9899

99100
pid = pty_for_gdb.pid

0 commit comments

Comments
 (0)