From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13594 invoked by alias); 8 Jan 2015 14:25:52 -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 13580 invoked by uid 89); 8 Jan 2015 14:25:51 -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-f49.google.com Received: from mail-pa0-f49.google.com (HELO mail-pa0-f49.google.com) (209.85.220.49) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Thu, 08 Jan 2015 14:25:50 +0000 Received: by mail-pa0-f49.google.com with SMTP id eu11so12024153pac.8 for ; Thu, 08 Jan 2015 06:25:48 -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=0cyz6QBWPO8HBXgEN+tG99gwT7WlX4YX2DIcgdRsBzc=; b=MHIEMv5nqkZJTQ30O9mTR7ovOiVromnncXWTeupDkj34t6mnqWd6BaOEVlhCWEyazz ZoeFE3oxQgR2KHnB1LqdzIxbb11l/kTBipzFmVo4AuxeagVZj7ZQxTYf+Xsc8rML2CoW er8hx7XI/4r1JJY42I1GIKwCrqQeVGPCq/s0m5vlwFdhxDZlKGlD2+A+l5Ksvlb45kaZ xMSViF7DqNbMrwvUOgf0CbF3TvEt3rFr7YDqGJQ87k2EWoZc/JAJnLTQxa3+KZSgfN/I 2eDNYJWTAcr9gurIUKU4+A6urrQU9duHqbB+wMJEXxSTJhCrF1APAjC3gL1ME8VUJW3g wnPQ== X-Gm-Message-State: ALoCoQm/pWEPeGgd5Ks58nI2Sc83VhtkvUAq5DuabwI5wGkFJArOT89VHuNyUcrBy9+FHkN/Nt/B X-Received: by 10.70.39.65 with SMTP id n1mr15153040pdk.83.1420727148441; Thu, 08 Jan 2015 06:25:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.70.22.145 with HTTP; Thu, 8 Jan 2015 06:25:28 -0800 (PST) In-Reply-To: References: <1420689048-23538-1-git-send-email-patrick@parcs.ath.cx> <54AE640B.3000701@redhat.com> <54AE8BDB.3050100@redhat.com> From: Patrick Palka Date: Thu, 08 Jan 2015 14:25: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/msg00193.txt.bz2 On Thu, Jan 8, 2015 at 9:10 AM, Patrick Palka wrote: > On Thu, Jan 8, 2015 at 8:53 AM, Pedro Alves wrote: >> On 01/08/2015 12:40 PM, Patrick Palka wrote: >> >>> 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. >> >> Can't we just cat the annotations bits into the query string >> itself? IOW, make them part of the secondary prompt. > > I'm not sure because the annotations contain newlines, so (with > annotations enabled) the prompt passed to readline would have > newlines. I do not know if readline supports multi-line prompts. Actually readline does support multi-line prompts because what you mentioned is exactly what prompt_for_continue() does. It concatenates the annotations to the prompt string and passes the multi-line prompt to gdb_readline_wrapper(). So it will be easy to consolidate these two query hooks. I will try to do so. > > But IMO a consolidation of the custom TUI query hook and the default > query hook is a quite separate endeavor. I think it should be left as > future work. > >> >> Thanks, >> Pedro Alves >>