From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5580 invoked by alias); 5 Aug 2014 09:56:47 -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 5568 invoked by uid 89); 5 Aug 2014 09:56:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 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; Tue, 05 Aug 2014 09:56:36 +0000 Received: from int-mx14.intmail.prod.int.phx2.redhat.com (int-mx14.intmail.prod.int.phx2.redhat.com [10.5.11.27]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id s759uYuG007084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Tue, 5 Aug 2014 05:56:34 -0400 Received: from blade.nx (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by int-mx14.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id s759uXaf018827 for ; Tue, 5 Aug 2014 05:56:34 -0400 Received: from blade.nx (localhost [127.0.0.1]) by blade.nx (Postfix) with ESMTP id 2FF132640D3 for ; Tue, 5 Aug 2014 10:56:31 +0100 (BST) From: Gary Benson To: gdb-patches@sourceware.org Subject: [PATCH] Ensure internal_vproblem always prints the message Date: Tue, 05 Aug 2014 09:56:00 -0000 Message-Id: <1407232590-23899-1-git-send-email-gbenson@redhat.com> X-IsSubscribed: yes X-SW-Source: 2014-08/txt/msg00047.txt.bz2 Hi all, While working on internal_vproblem I noticed that the error/warning message is suppressed if problem->should_quit is internal_problem_yes or internal_problem_no. This behaviour seems wrong. This commit modifies internal_vproblem to emit the message regardless of the user's settings. Built and regtested on RHEL6.5 x86_64. Is this ok to commit? Thanks, Gary -- gdb/ 2014-08-05 Gary Benson * utils.c (internal_vproblem): Always print the message. --- gdb/ChangeLog | 4 ++++ gdb/utils.c | 11 +++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/gdb/utils.c b/gdb/utils.c index a4b5937..15b4abe 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -736,18 +736,17 @@ internal_vproblem (struct internal_problem *problem, make_cleanup (xfree, reason); } + /* Emit the message unless query will emit it below. */ + if (problem->should_quit != internal_problem_ask || !confirm) + fprintf_unfiltered (gdb_stderr, "%s\n", reason); + if (problem->should_quit == internal_problem_ask) { /* Default (yes/batch case) is to quit GDB. When in batch mode this lessens the likelihood of GDB going into an infinite loop. */ if (!confirm) - { - /* Emit the message and quit. */ - fputs_unfiltered (reason, gdb_stderr); - fputs_unfiltered ("\n", gdb_stderr); - quit_p = 1; - } + quit_p = 1; else quit_p = query (_("%s\nQuit this debugging session? "), reason); } -- 1.7.1