summaryrefslogtreecommitdiff
path: root/gdb/cp-support.c
diff options
context:
space:
mode:
authorPedro Alves <palves@redhat.com>2016-04-12 16:49:31 +0100
committerPedro Alves <palves@redhat.com>2016-04-12 16:58:14 +0100
commitc509f1e1e8187e0abd2321aadc37878402c87332 (patch)
treee6f5cee2a7eaa9c98cf6c0b0973912f6562b4b1e /gdb/cp-support.c
parent99bbb428d4412b79e59df321f9e83c13342e4612 (diff)
Use target_terminal_ours_for_output in cp-support.c
We're only doing output here, so leave raw/cooked mode alone, as well as the SIGINT handler. Restore terminal settings after output, while at it. gdb/ChangeLog: 2016-04-12 Pedro Alves <palves@redhat.com> * cp-support.c (gdb_demangle): Use target_terminal_ours_for_output instead of target_terminal_ours, and restore target terminal with a cleanup.
Diffstat (limited to 'gdb/cp-support.c')
-rw-r--r--gdb/cp-support.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index a71c6ad722..c7f507435f 100644
--- a/gdb/cp-support.c
+++ b/gdb/cp-support.c
@@ -1601,7 +1601,9 @@ gdb_demangle (const char *name, int options)
"demangler-warning", short_msg);
make_cleanup (xfree, long_msg);
- target_terminal_ours ();
+ make_cleanup_restore_target_terminal ();
+ target_terminal_ours_for_output ();
+
begin_line ();
if (core_dump_allowed)
fprintf_unfiltered (gdb_stderr,