Fix "source" with interpreter-exec
authorTom Tromey <tromey@adacore.com>
Fri, 12 Aug 2022 19:50:35 +0000 (13:50 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 31 Aug 2022 17:03:40 +0000 (11:03 -0600)
commit1e28eebbbc34ebec69ea4913f7e8d19352e35630
tree5811eb61a8138bed3592b8498dd60b34a9a77d06
parent610f8c63394782fa73b12ff67f6cd2b76180ad2c
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
gdb/testsuite/gdb.base/interpreter-exec.gdb [new file with mode: 0644]
gdb/testsuite/gdb.base/source.exp
gdb/tui/tui-interp.c