old-cross-binutils/gdb/mi
Simon Marchi 1abf3a1437 Restore terminal state in mi_thread_exit (PR gdb/17627)
When a thread exits, the terminal is left in mode "terminal_is_ours"
while the target executes.  This patch fixes that.

We need to manually restore the terminal setting in this particular
observer.  In the case of the other MI observers that call
target_terminal_ours, gdb will end up resuming the inferior later in the
execution and call target_terminal_inferior.  In the case of the thread
exit event, we still need to call target_terminal_ours to be able to
print something, but there is nothing that gdb will need to resume after
that. We therefore need to call target_terminal_inferior ourselves.

gdb/ChangeLog:

	PR gdb/17627
	* target.c (cleanup_restore_target_terminal): New function.
	(make_cleanup_restore_target_terminal): New function.
	* target.h (make_cleanup_restore_target_terminal): New
	declaration.
	* mi/mi-interp.c (mi_thread_exit): Use the new cleanup.

Signed-off-by: Simon Marchi <simon.marchi@ericsson.com>
2014-12-10 13:03:47 -05:00
..
ChangeLog-1999-2003
mi-cmd-break.c Remove spurious exceptions.h inclusions 2014-10-08 09:33:22 +01:00
mi-cmd-break.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-cmd-catch.c Move libiberty.h to common-defs.h 2014-08-07 09:06:41 +01:00
mi-cmd-disas.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-cmd-env.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-cmd-file.c Split struct symtab into two: struct symtab and compunit_symtab. 2014-11-20 07:47:44 -08:00
mi-cmd-info.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-cmd-stack.c Remove spurious exceptions.h inclusions 2014-10-08 09:33:22 +01:00
mi-cmd-target.c Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-cmd-var.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-cmds.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-cmds.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-common.c Include gdb_assert.h in common-defs.h 2014-08-07 09:06:45 +01:00
mi-common.h PR gdb/13860 - Make MI sync vs async output (closer to) the same. 2014-05-29 13:09:45 +01:00
mi-console.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-console.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-getopt.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-getopt.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-interp.c Restore terminal state in mi_thread_exit (PR gdb/17627) 2014-12-10 13:03:47 -05:00
mi-main.c Remove spurious exceptions.h inclusions 2014-10-08 09:33:22 +01:00
mi-main.h enable target async by default; separate MI and target notions of async 2014-05-29 14:38:02 +01:00
mi-out.c constify ui_out_impl 2014-02-28 08:51:15 -07:00
mi-out.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-parse.c Include string.h in common-defs.h 2014-08-07 09:06:47 +01:00
mi-parse.h Update Copyright year range in all files maintained by GDB. 2014-01-01 07:54:24 +04:00
mi-symbol-cmds.c symtab.h (SYMTAB_LINETABLE): Renamed from LINETABLE. All uses updated. 2014-11-18 09:32:10 -08:00