This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Make sure terminal settings are restored before exiting


*** TEST RESULTS FOR COMMIT 18206ca3f9367f1488cdfc1475f8da072e7e9636 ***

Author: Patrick Palka <patrick@parcs.ath.cx>
Branch: master
Commit: 18206ca3f9367f1488cdfc1475f8da072e7e9636

Make sure terminal settings are restored before exiting
When exiting GDB -- whether it's via the "quit" command, via a SIGTERM,
or otherwise -- we should leave the terminal in the state we acquired
it.  To that end, we have to undo any modifications that may have been
made by the TUI (ncurses) or by the CLI (readline).

Tested on x86_64 Debian Stretch.

gdb/ChangeLog:

	* top.c: Include "tui/tui.h".
	(undo_terminal_modifications_before_exit): New static function.
	(quit_force): Use it.

gdb/testsuite/ChangeLog:

	* gdb.base/batch-preserve-term-settings.exp
	(test_terminal_settings_preserved_after_cli_exit): New test.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]