From patchwork Thu Feb 18 17:40:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pedro Alves X-Patchwork-Id: 10902 Received: (qmail 31648 invoked by alias); 18 Feb 2016 17:46:29 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 31636 invoked by uid 89); 18 Feb 2016 17:46:28 -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=controlc, control-c, ctrl-c, ctrlc 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; Thu, 18 Feb 2016 17:46:28 +0000 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id E334AC00DE14 for ; Thu, 18 Feb 2016 17:40:41 +0000 (UTC) Received: from brno.lan (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1IHea7B012351 for ; Thu, 18 Feb 2016 12:40:41 -0500 From: Pedro Alves To: gdb-patches@sourceware.org Subject: [PATCH 05/10] Update prompt_for_continue comments Date: Thu, 18 Feb 2016 17:40:31 +0000 Message-Id: <1455817236-13642-6-git-send-email-palves@redhat.com> In-Reply-To: <1455817236-13642-1-git-send-email-palves@redhat.com> References: <1455817236-13642-1-git-send-email-palves@redhat.com> These comments are out of date -- we no longer call gdb_readline. And I think that mentioning the event loop is more useful here than whatever GO32 issue had with gdb_readline, which may even no longer be an issue. gdb/ChangeLog: 2016-02-18 Pedro Alves * utils.c (prompt_for_continue): Update comments. --- gdb/utils.c | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/gdb/utils.c b/gdb/utils.c index e34c12e..a4aa8f5 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1808,7 +1808,9 @@ set_screen_width_and_height (int width, int height) } /* Wait, so the user can read what's on the screen. Prompt the user - to continue by pressing RETURN. */ + to continue by pressing RETURN. 'q' is also provided because + telling users what to do in the prompt is more user-friendly than + expecting them to think of Ctrl-C/SIGINT. */ static void prompt_for_continue (void) @@ -1829,9 +1831,9 @@ prompt_for_continue (void) if (annotation_level > 1) strcat (cont_prompt, "\n\032\032prompt-for-continue\n"); - /* We must do this *before* we call gdb_readline, else it will eventually - call us -- thinking that we're trying to print beyond the end of the - screen. */ + /* We must do this *before* we call gdb_readline_wrapper, else it + will eventually call us -- thinking that we're trying to print + beyond the end of the screen. */ reinitialize_more_filter (); immediate_quit++; @@ -1840,16 +1842,8 @@ prompt_for_continue (void) /* We'll need to handle input. */ target_terminal_ours (); - /* On a real operating system, the user can quit with SIGINT. - But not on GO32. - - 'q' is provided on all systems so users don't have to change habits - from system to system, and because telling them what to do in - the prompt is more user-friendly than expecting them to think of - SIGINT. */ - /* Call readline, not gdb_readline, because GO32 readline handles control-C - whereas control-C to gdb_readline will cause the user to get dumped - out to DOS. */ + /* Call gdb_readline_wrapper, not readline, in order to keep an + event loop running. */ ignore = gdb_readline_wrapper (cont_prompt); /* Add time spend in this routine to prompt_for_continue_wait_time. */