From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 98085 invoked by alias); 21 Nov 2019 16:31:25 -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 98073 invoked by uid 89); 21 Nov 2019 16:31:25 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.1 spammy=sk:packet, sk:packet- X-HELO: mx1.osci.io Received: from polly.osci.io (HELO mx1.osci.io) (8.43.85.229) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 21 Nov 2019 16:31:24 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id BDBEB2039A; Thu, 21 Nov 2019 11:31:22 -0500 (EST) Received: from gnutoolchain-gerrit.osci.io (gnutoolchain-gerrit.osci.io [IPv6:2620:52:3:1:5054:ff:fe06:16ca]) by mx1.osci.io (Postfix) with ESMTP id 780A82030C; Thu, 21 Nov 2019 11:31:21 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 5790A2816F; Thu, 21 Nov 2019 11:31:21 -0500 (EST) X-Gerrit-PatchSet: 3 Date: Thu, 21 Nov 2019 16:31:00 -0000 From: "Pedro Alves (Code Review)" To: Luis Machado , gdb-patches@sourceware.org Cc: Tom Tromey Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v3] [Debugging output] Make remote packet truncation length adjustable X-Gerrit-Change-Id: I2e871b37bfcaa6376537c3fe3db8f016dd806a7c X-Gerrit-Change-Number: 691 X-Gerrit-ChangeURL: X-Gerrit-Commit: 5981dbd6aebd4d89e43f24876b382c56339c63fd In-Reply-To: References: X-Gerrit-Comment-Date: Thu, 21 Nov 2019 11:31:20 -0500 Reply-To: gnutoolchain-gerrit@osci.io MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/3.0.3-79-g83ff7f88f1 Content-Type: text/plain; charset=UTF-8 Message-Id: <20191121163121.5790A2816F@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-11/txt/msg00658.txt.bz2 Pedro Alves has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/691 ...................................................................... Patch Set 3: > > > I'm not too sure packet-length-limit is good. Suggestions are welcome. I agree "set remote packet-length-limit" isn't good, since I'd expect a setting by that name to control the actual max size of gdb's packet buffer. > > > > I tend to think something in the "set debug" namespace would be better, > > since it's a setting related to "set debug remote". > > I contemplated that, but upon looking at what sorts of options were available via "set debug", they were related to producing debugging output only, not adjusting how the debugging output was produced. So i went for more locality by putting it into "set remote". > > To be honest, i don't think it fits in any of those two. But i'm okay with going for "set debug remote-log-length" based on feedback. > > > > > How about "set debug remote-log-length"? > > > > This patch also needs a documentation change and a NEWS entry. > > I'll put something together. I'm not thrilled with "remote-log-length" because "length" alone doesn't convey "max", or "limit". Your original "packet-length-limit" did, but it was under the wrong namespace. Including "log" in the setting name seems redundant, since "set debug" settings all control logging in some form. "packet-length-limit" wasn't 100% correct, since it's not really the size of the packet that counts, it's how much you'd display, including escaping, but that seems like a minor issue. Let's look at how the option is described: "Sets the number of characters to display for each remote packet" Note that it doesn't talk about "log" and doesn't say "length". If you start from that description, then the obvious setting name would be around: set debug remote-max-chars set debug remote-packet-max-characters set debug remote-packet-max-chars set debug remote-max-packet-chars I think my preferred one would be "remote-packet-max-chars", since the limit only applies to packet logging. Which is not unlike the existing macro name: /* The max number of chars in debug output. The rest of chars are omitted. */ #define REMOTE_DEBUG_MAX_CHAR 512 -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I2e871b37bfcaa6376537c3fe3db8f016dd806a7c Gerrit-Change-Number: 691 Gerrit-PatchSet: 3 Gerrit-Owner: Luis Machado Gerrit-Reviewer: Luis Machado Gerrit-Reviewer: Tom Tromey Gerrit-CC: Pedro Alves Gerrit-Comment-Date: Thu, 21 Nov 2019 16:31:20 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment