From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 70748 invoked by alias); 3 Dec 2019 00:00:02 -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 70693 invoked by uid 89); 3 Dec 2019 00:00:01 -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= 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; Mon, 02 Dec 2019 23:59:59 +0000 Received: by mx1.osci.io (Postfix, from userid 994) id 697E3203C1; Mon, 2 Dec 2019 18:59:58 -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 3281A20334; Mon, 2 Dec 2019 18:59:56 -0500 (EST) Received: from localhost (localhost [127.0.0.1]) by gnutoolchain-gerrit.osci.io (Postfix) with ESMTP id 0896C2816F; Mon, 2 Dec 2019 18:59:56 -0500 (EST) X-Gerrit-PatchSet: 10 Date: Tue, 03 Dec 2019 00:00:00 -0000 From: "Andrew Burgess (Code Review)" To: gdb-patches@sourceware.org Cc: Simon Marchi , Joel Brobecker Auto-Submitted: auto-generated X-Gerrit-MessageType: comment Subject: [review v10] gdb/mi: Add -max-results parameter to some -symbol-info-* commands X-Gerrit-Change-Id: I90a28feb55b388fb46461a096c5db08b6b0bd427 X-Gerrit-Change-Number: 269 X-Gerrit-ChangeURL: X-Gerrit-Commit: 0cde19a61a91bd7e57cf32e88ec02e5987e0901a In-Reply-To: References: X-Gerrit-Comment-Date: Mon, 2 Dec 2019 18:59:55 -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: <20191202235956.0896C2816F@gnutoolchain-gerrit.osci.io> X-SW-Source: 2019-12/txt/msg00070.txt.bz2 Andrew Burgess has posted comments on this change. Change URL: https://gnutoolchain-gerrit.osci.io/r/c/binutils-gdb/+/269 ...................................................................... Patch Set 10: > Patch Set 9: > > > Patch Set 9: > > > > All points raised are, I think, addressed in the new restructuring patch. I changed the max matches to 'unsigned int' instead of 'size_t' - is there a benefit for size_t that I'm missing? And use UINT_MAX as the default value. The consequence of this is that there's no truely "unlimited" matching mode any more, but I think with a limit of UINT_MAX this probably isn't a problem. > > Only that "size_t" is guaranteed to be able to hold the largest size an object can have on the machine, so we know it is guaranteed to be large enough to hold the number of results we can possibly return before running out of memory. In practice, unsigned int is probably large enough too, but there's no such guarantee. > > In any case there is no truly "unlimited" matching mode. In both cases (using -1 to denote unlimited or using SIZE_MAX as a maximum), the memory of the machine is the limit. Converted to size_t in latest version. -- Gerrit-Project: binutils-gdb Gerrit-Branch: master Gerrit-Change-Id: I90a28feb55b388fb46461a096c5db08b6b0bd427 Gerrit-Change-Number: 269 Gerrit-PatchSet: 10 Gerrit-Owner: Andrew Burgess Gerrit-Reviewer: Andrew Burgess Gerrit-CC: Joel Brobecker Gerrit-CC: Simon Marchi Gerrit-Comment-Date: Mon, 02 Dec 2019 23:59:55 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: No Gerrit-MessageType: comment