From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15775 invoked by alias); 1 Dec 2016 20:05:40 -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 15761 invoked by uid 89); 1 Dec 2016 20:05:39 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.8 required=5.0 tests=BAYES_00,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=packet, Hx-languages-length:1563, omit 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 ESMTP; Thu, 01 Dec 2016 20:05:29 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id F2BE6EC2CD; Thu, 1 Dec 2016 20:05:27 +0000 (UTC) Received: from blade.nx (ovpn-116-107.ams2.redhat.com [10.36.116.107]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id uB1K5Qhr020668; Thu, 1 Dec 2016 15:05:27 -0500 Received: by blade.nx (Postfix, from userid 1000) id 9C200816CD43; Thu, 1 Dec 2016 20:05:25 +0000 (GMT) Date: Thu, 01 Dec 2016 20:05:00 -0000 From: Gary Benson To: Luis Machado Cc: Yao Qi , gdb-patches@sourceware.org Subject: Re: [PATCH] Don't print too much if remote_debug is on Message-ID: <20161201200525.GA19063@blade.nx> References: <1480433898-19584-1-git-send-email-yao.qi@linaro.org> <20161130125433.GH22209@E107787-LIN> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-IsSubscribed: yes X-SW-Source: 2016-12/txt/msg00054.txt.bz2 Luis Machado wrote: > On 11/30/2016 06:54 AM, Yao Qi wrote: > > The binary and plain data is mixed in the buffer in some packets, like > > "vFile:pwrite: fd, offset, data". If we want to print > > "Sending packet: $vFile:pwrite:5,e0d12,[16384 bytes]#c4" in the debug > > output, we need to move the debugging output from buffer level to > > packet level. I agree it is better than > > "Sending packet: [16384 bytes omitted]" which is what my patch does. > > > > We can omit the received packet if it is more than REMOTE_DEBUG_MAX_CHAR > > chars; if the sent packet is more than REMOTE_DEBUG_MAX_CHAR chars, only > > print the first 50 chars, and omit the rest of them, so the debug > > output is like, > > > > Sending packet: $vFile:pread:5,3fff,e0d12#c4...Packet received: [16384 bytes omitted] > > Sending packet: $vFile:pwrite:5,e0d12,xxxyyyzzz[384 bytes omitted] ... Packet received: 358 > > > > What do you think? > > I think it is an improvement nonetheless. Personally i still find > particular lengthy replies useful, like the XML descriptions. But > all the binary data is too distracting, hence why i was suggesting > only binary streams being restricted. > > I'm fine with your version. I haven't checked, but it might be trivial to spot and not strip XML by looking for "