From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 45479 invoked by alias); 28 Dec 2018 18:47:18 -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 45165 invoked by uid 89); 28 Dec 2018 18:47:17 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=styles, hole, Small, flushed X-HELO: gateway36.websitewelcome.com Received: from gateway36.websitewelcome.com (HELO gateway36.websitewelcome.com) (50.116.125.2) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 28 Dec 2018 18:47:16 +0000 Received: from cm16.websitewelcome.com (cm16.websitewelcome.com [100.42.49.19]) by gateway36.websitewelcome.com (Postfix) with ESMTP id 92FED400C94AC for ; Fri, 28 Dec 2018 11:58:37 -0600 (CST) Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with SMTP id cxAAggmw74FKpcxAAgARpu; Fri, 28 Dec 2018 12:47:14 -0600 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:In-Reply-To:Date: References:Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=9xhz2W1JQKrcKVx68qObP4VG7MdxsEdgrHU15xVuY7Q=; b=lRcFVK4/GNW9gL0BA4Q7wpg5nW FU4cBEVqB3+4/H5XRJAHTNR21AipjcNIKbxKON/wiQl7n7WV/GHIUfCCV19d68Mzotsw9Gj5r+Eul 1Ey6Bsj5/iRvEpoDF1ipQ3Hs/; Received: from 75-166-72-210.hlrn.qwest.net ([75.166.72.210]:34066 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91) (envelope-from ) id 1gcxAA-000o2R-DW; Fri, 28 Dec 2018 12:47:14 -0600 From: Tom Tromey To: Joel Brobecker Cc: Tom Tromey , gdb-patches@sourceware.org Subject: Re: [PATCH 01/16] Change wrap buffering to use a std::string References: <20181128001435.12703-1-tom@tromey.com> <20181128001435.12703-2-tom@tromey.com> <20181223152558.GE5246@adacore.com> Date: Fri, 28 Dec 2018 18:47:00 -0000 In-Reply-To: <20181223152558.GE5246@adacore.com> (Joel Brobecker's message of "Sun, 23 Dec 2018 19:25:58 +0400") Message-ID: <87h8exo5e6.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1.90 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2018-12/txt/msg00390.txt.bz2 >>>>> "Joel" == Joel Brobecker writes: Joel> The question your patch Joel> raised as a side-effect is whether we still need the boolean indicating Joel> whether the wrap buffer has been initialized or not (filter_initalized). Joel> I tried to explore that question, hence the unexpected entertainment, Joel> and the answer is still not clear to me, but I *think* that we should Joel> be able to. It really depends what the semantics of Joel> filtered_printing_initialized is, and it looks like it might be used for Joel> two purposes, rather than one. Eg: one meaning is the wrap_buffer is Joel> indeed iniatilized and therefore can be used; but it looks like the Joel> other use is to determine whether buffering is done at all. This is a good point. I've put a note in my to-do list to remind me to see if it can be removed. Joel> Small typo in the name of that static global "filter_initalized" -> Joel> "filter_initialized" :-) Thanks, I fixed this. >> @@ -1669,6 +1666,7 @@ fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream, >> || top_level_interpreter () == NULL >> || top_level_interpreter ()->interp_ui_out ()->is_mi_like_p ()) >> { >> + flush_wrap_buffer (stream); >> fputs_unfiltered (linebuffer, stream); >> return; >> } Joel> I understand why this is needed today; but I can't determine Joel> whether this is needed as a consequence of your patch, or if this Joel> was a hole in the previous code. Can you explain what made you Joel> make this change? It's probably not needed in this particular patch, but eventually style changes are just written to the buffer; so to get styles to apply properly when filtering is not in use, the buffer has to be flushed here. Tom