aboutsummaryrefslogtreecommitdiff
path: root/gdb/tui
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2022-08-12 13:50:35 -0600
committerTom Tromey <tromey@adacore.com>2022-08-31 11:03:40 -0600
commit1e28eebbbc34ebec69ea4913f7e8d19352e35630 (patch)
tree5811eb61a8138bed3592b8498dd60b34a9a77d06 /gdb/tui
parent610f8c63394782fa73b12ff67f6cd2b76180ad2c (diff)
downloadgdb-1e28eebbbc34ebec69ea4913f7e8d19352e35630.zip
gdb-1e28eebbbc34ebec69ea4913f7e8d19352e35630.tar.gz
gdb-1e28eebbbc34ebec69ea4913f7e8d19352e35630.tar.bz2
Fix "source" with interpreter-exec
PR mi/15811 points out that "source"ing a file that uses interpreter-exec will put gdb in a weird state, where the CLI stops working. The bug is that tui_interp::suspend does not unregister the event file descriptor. The test case is from Andrew Burgess. Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=15811
Diffstat (limited to 'gdb/tui')
-rw-r--r--gdb/tui/tui-interp.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/gdb/tui/tui-interp.c b/gdb/tui/tui-interp.c
index 1c4ffbb..e0846fe 100644
--- a/gdb/tui/tui-interp.c
+++ b/gdb/tui/tui-interp.c
@@ -135,6 +135,7 @@ tui_interp::resume ()
void
tui_interp::suspend ()
{
+ gdb_disable_readline ();
tui_start_enabled = tui_active;
tui_disable ();
}