From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 82377 invoked by alias); 18 Mar 2016 19:18:57 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 82330 invoked by uid 89); 18 Mar 2016 19:18:56 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=cooked X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 18 Mar 2016 19:18:54 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 4EA2AC0006F1 for ; Fri, 18 Mar 2016 19:18:52 +0000 (UTC) Received: from cascais.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u2IJIYkI028091 for ; Fri, 18 Mar 2016 15:18:51 -0400 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 20/30] Use target_terminal_ours_for_output in cp-support.c Date: Fri, 18 Mar 2016 19:19:00 -0000 Message-Id: <1458328714-4938-21-git-send-email-palves@redhat.com> In-Reply-To: <1458328714-4938-1-git-send-email-palves@redhat.com> References: <1458328714-4938-1-git-send-email-palves@redhat.com> X-SW-Source: 2016-03/txt/msg00349.txt.bz2 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 * 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