]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit - gdb/ChangeLog
gdb: Re-enable stdin for all UIs from start_event_loop
authorAndrew Burgess <andrew.burgess@embecosm.com>
Tue, 19 Nov 2019 18:09:43 +0000 (18:09 +0000)
committerAndrew Burgess <andrew.burgess@embecosm.com>
Fri, 24 Jan 2020 00:11:52 +0000 (00:11 +0000)
commitf3364a6d0fefe44fc26a1d5025b3af55ecec5cad
tree98a9b7a3b11bec69543e3a6f1a5a8f18ce1cb682
parent733d0a679536628eb1be4b4b8aa6384de24ff1f1
gdb: Re-enable stdin for all UIs from start_event_loop

If we catch an exception in start_event_loop's call to
gdb_do_one_event, then it is possible that the current_ui has changed
since we called async_disable_stdin.  If that's the case then calling
async_enable_stdin will be called on the wrong UI.

To solve this problem we wrap the call to async_enable_stdin with
SWITCH_THRU_ALL_UIS, this causes us to try and re-enable stdin for all
UIs, which will catch any for which we called async_disable_stdin.

gdb/ChangeLog:

* event-loop.c (start_event_loop): Wrap async_enable_stdin with
SWITCH_THRU_ALL_UIS.

gdb/testsuite/ChangeLog:

* gdb.server/multi-ui-errors.c: New file.
* gdb.server/multi-ui-errors.exp: New file.

Change-Id: I1e18deff2e6f4e17f7a13adce3553eb001cad93b
gdb/ChangeLog
gdb/event-loop.c
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.server/multi-ui-errors.c [new file with mode: 0644]
gdb/testsuite/gdb.server/multi-ui-errors.exp [new file with mode: 0644]