This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 20/30] Use target_terminal_ours_for_output in cp-support.c
- From: Pedro Alves <palves at redhat dot com>
- To: gdb-patches at sourceware dot org
- Date: Fri, 18 Mar 2016 19:18:24 +0000
- Subject: [PATCH 20/30] Use target_terminal_ours_for_output in cp-support.c
- Authentication-results: sourceware.org; auth=none
- References: <1458328714-4938-1-git-send-email-palves at redhat dot com>
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:
yyyy-mm-dd 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.
---
gdb/cp-support.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/gdb/cp-support.c b/gdb/cp-support.c
index a71c6ad..c7f5074 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,
--
2.5.0