From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 102282 invoked by alias); 18 Dec 2015 19:31:07 -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 102239 invoked by uid 89); 18 Dec 2015 19:31:03 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=utils.c, UD:utils.c, utilsc, bypass X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 18 Dec 2015 19:31:02 +0000 Received: from svr-orw-fem-03.mgc.mentorg.com ([147.34.97.39]) by relay1.mentorg.com with esmtp id 1aA0k0-0004MB-1S from Sandra_Loosemore@mentor.com ; Fri, 18 Dec 2015 11:31:00 -0800 Received: from [IPv6:::1] (147.34.91.1) by svr-orw-fem-03.mgc.mentorg.com (147.34.97.39) with Microsoft SMTP Server id 14.3.224.2; Fri, 18 Dec 2015 11:30:59 -0800 Subject: [patch 1/3] make prompt_for_continue call throw_quit directly To: gdb-patches , Pedro Alves References: <56745D29.504@codesourcery.com> From: Sandra Loosemore Message-ID: <56745ED5.9020309@codesourcery.com> Date: Fri, 18 Dec 2015 19:31:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <56745D29.504@codesourcery.com> Content-Type: multipart/mixed; boundary="------------070708010202090504090404" X-SW-Source: 2015-12/txt/msg00384.txt.bz2 --------------070708010202090504090404 Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 7bit Content-length: 613 This is the patch previously suggested by Pedro here: https://sourceware.org/ml/gdb-patches/2015-09/msg00637.html to fix a problem I ran into when testing on a remote Windows host via SSH without a terminal or job control. As Pedro said, when typing 'q' in response to a pagination prompt, there's no possibility of a SIGINT so we can bypass the parts of quit() handling that are intended to intercept ^C instead. I confirmed that this fixes the bogus quit message I observed previously on Windows host, and did full regression testing on Linux host for nios2-linux-gnu target. OK to commit? -Sandra --------------070708010202090504090404 Content-Type: text/x-log; name="gdb-paginate-1.log" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-paginate-1.log" Content-length: 130 2015-12-18 Sandra Loosemore gdb/ * utils.c (prompt_for_continue): Call throw_quit directly on 'q'. --------------070708010202090504090404 Content-Type: text/x-patch; name="gdb-paginate-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="gdb-paginate-1.patch" Content-length: 309 diff --git a/gdb/utils.c b/gdb/utils.c index 284fbbb..862a802 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1868,7 +1868,7 @@ prompt_for_continue (void) while (*p == ' ' || *p == '\t') ++p; if (p[0] == 'q') - quit (); + throw_quit ("Quit"); xfree (ignore); } immediate_quit--; --------------070708010202090504090404--