From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25390 invoked by alias); 8 Jan 2015 12:40: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 25295 invoked by uid 89); 8 Jan 2015 12:40:46 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-HELO: mail-pa0-f46.google.com Received: from mail-pa0-f46.google.com (HELO mail-pa0-f46.google.com) (209.85.220.46) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 12:40:44 +0000 Received: by mail-pa0-f46.google.com with SMTP id lf10so11580068pab.5 for ; Thu, 08 Jan 2015 04:40:42 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=IIh/6TtcGCvWsJ/aOWB2hHxSH+CfSZW3Vd902m+DL7U=; b=WD9tmprSnXzOwvrU3OlUBLFwHuj+7CnFs60fn1aKPozL7VsZuldQlQVHNnrJ6Fp6C4 3O1/em9bUofUGj2sPNLqXlyn8sTi8y32BrVinmIyIAS8W1p28e5RAAkRJqwPtpT65onT mqAkKtIww8UEXP0yJeG/lmndbkYRTWOuOuaVrs+9Nfde+PeEbHFcTx/9tvKBadn0Wjh0 tabQWcoPErTnMi47tGbxurP79fJKepiR9/WS2u0HFHdu1Y5ZPBwHVBibECiuI/qdiZI/ 3WcEadm7l2/2WlbXXM6KAXjoKWDzEz+qHZaNOuwGDHp8rQDL171O8qXfMl2mauOzCLON x2uw== X-Gm-Message-State: ALoCoQnes/sP/ldqADd8W9uiDftuDsTEtSy2pECB0zwIbHtzrC0QfIHNFBGcS5ptsH+KpvywbJny X-Received: by 10.70.92.100 with SMTP id cl4mr14456149pdb.151.1420720842114; Thu, 08 Jan 2015 04:40:42 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 04:40:21 -0800 (PST) In-Reply-To: <54AE640B.3000701@redhat.com> References: <1420689048-23538-1-git-send-email-patrick@parcs.ath.cx> <54AE640B.3000701@redhat.com> From: Patrick Palka Date: Thu, 08 Jan 2015 12:40:00 -0000 Message-ID: Subject: Re: [PATCH] TUI: rewrite tui_query_hook() To: Pedro Alves Cc: gdb-patches@sourceware.org Content-Type: text/plain; charset=UTF-8 X-SW-Source: 2015-01/txt/msg00175.txt.bz2 On Thu, Jan 8, 2015 at 6:03 AM, Pedro Alves wrote: > On 01/08/2015 03:50 AM, Patrick Palka wrote: >> This patch rewrites tui_query_hook() to print things via tui_puts() and >> to read in a line of input via wgetnstr(). The main motivation for this >> rewrite is to get the backspace key to work correctly during a quit >> prompt so that the user can revise their answer before pressing enter. >> The backspace key now works correctly because we now use getstr() >> instead of successive calls to getch(). > > Pagination, done in prompt_for_continue, gets away without this hook, as > it's written in terms of readline. If we did the same to defaulted_query, > I think the default code would just work for the TUI too. Did you > consider that? This is complicated by the fact that the default query code inserts annotations before and after the query. If we use gdb_readline_wrapper to print the query and wait for input then the 2nd annotation will not be printed in a timely manner because gdb_readline_wrapper blocks until a response is given by the user. > > Thanks, > Pedro Alves >