From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 65486 invoked by alias); 5 Jul 2015 21:04:17 -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 65416 invoked by uid 89); 5 Jul 2015 21:04:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.6 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-qk0-f181.google.com Received: from mail-qk0-f181.google.com (HELO mail-qk0-f181.google.com) (209.85.220.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Sun, 05 Jul 2015 21:04:16 +0000 Received: by qkhu186 with SMTP id u186so105936420qkh.0 for ; Sun, 05 Jul 2015 14:04:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=MxjOEWDI2E3LrE3BXDEKWbhiRNqUOn9+hu+MUB9fE4I=; b=YpL7H69pGfaVbRIoWPv22eBwhdwDuq9O/Gp8EpP8qH6zynvu0kJisAZk6T85/kkGqu trtwjgc8Z6U/ZX1lBXGYAXrry6SZjs3O/tLUM3YdlyGGbWeDVHPwuH0M0E7hMBTUosI9 9oJB9mFnMiZ8GCJ40Y3bY8FI5CupjQJ5ixB88jAS6e4YbIKUXP90C3qVINm0tIQDSb40 Qh6Aj/GwsvAp2XiLQlFYbulDxDIX0bg3vHTdYjg/1QnSJVLPdVbPon04cKEZ6G5TYhtf xliY74z3OU69t2SP5BTgLEcqqBGqWKT4Ber+7uhrwEt3BNfrJhzXTouqGuIlKsV2Fu5W YrVQ== X-Gm-Message-State: ALoCoQkTKF16056agYP2uSX/CithxgiS3GoeCB/8y/+VZu8RZU/QO7DvWIepEzy/dxMOVP/7VqL8 X-Received: by 10.140.129.151 with SMTP id 145mr22124134qhb.83.1436130253649; Sun, 05 Jul 2015 14:04:13 -0700 (PDT) Received: from localhost.localdomain (ool-4353acd8.dyn.optonline.net. [67.83.172.216]) by mx.google.com with ESMTPSA id 131sm8181073qhf.14.2015.07.05.14.04.12 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 05 Jul 2015 14:04:12 -0700 (PDT) From: Patrick Palka To: gdb-patches@sourceware.org Cc: Patrick Palka Subject: [PATCH 2/5] tui: use tui_putc to output newline entered by the user Date: Sun, 05 Jul 2015 21:04:00 -0000 Message-Id: <1436130241-21443-2-git-send-email-patrick@parcs.ath.cx> In-Reply-To: <1436130241-21443-1-git-send-email-patrick@parcs.ath.cx> References: <1436130177-21362-1-git-send-email-patrick@parcs.ath.cx> <1436130241-21443-1-git-send-email-patrick@parcs.ath.cx> X-SW-Source: 2015-07/txt/msg00109.txt.bz2 This is necessary to make sure that start_line and cur_line are set properly right after a command has been entered. We usually get away with not doing so because most commands output text, and when they do they do it through tui_putc/tui_puts which makes start_line and cur_line get updated. However if a command does not output text, then start_line will not get updated in time. This fixes the following bug in the TUI: (gdb) break foo No symbol table is loaded. Use the "file" command. Make breakpoint pending on future shared library load? (y or [n]) n After typing n followed by pressing Enter, the last line starting with "Make breakpoint pending ..." (i.e. the subprompt) will get overwritten by the next prompt. With this patch, the last line does not get overwritten. (That the subprompt gets overwritten when no text is entered at all is mostly a separate issue.) gdb/ChangeLog: * tui/tui-io.c (tui_getc): Use tui_putc instead of waddch to emit the newline. --- gdb/tui/tui-io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gdb/tui/tui-io.c b/gdb/tui/tui-io.c index 97906ce..ba42c18 100644 --- a/gdb/tui/tui-io.c +++ b/gdb/tui/tui-io.c @@ -620,7 +620,7 @@ tui_getc (FILE *fp) py += px / TUI_CMD_WIN->generic.width; px %= TUI_CMD_WIN->generic.width; wmove (w, py, px); - waddch (w, ch); + tui_putc ('\n'); } } -- 2.5.0.rc0.5.g91e10c5.dirty