From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 58768 invoked by alias); 22 Feb 2018 15:47:13 -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 58758 invoked by uid 89); 22 Feb 2018 15:47:13 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=talk X-HELO: eggs.gnu.org Received: from eggs.gnu.org (HELO eggs.gnu.org) (208.118.235.92) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 22 Feb 2018 15:47:11 +0000 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eot5O-0000oH-2u for gdb-patches@sourceware.org; Thu, 22 Feb 2018 10:47:10 -0500 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:40877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eot5N-0000oB-Uj; Thu, 22 Feb 2018 10:47:06 -0500 Received: from [176.228.60.248] (port=2101 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1eot5N-0000iT-Be; Thu, 22 Feb 2018 10:47:05 -0500 Date: Thu, 22 Feb 2018 15:47:00 -0000 Message-Id: <83efld58mu.fsf@gnu.org> From: Eli Zaretskii To: Joel Brobecker CC: gdb-patches@sourceware.org In-reply-to: <1519312873-6307-1-git-send-email-brobecker@adacore.com> (message from Joel Brobecker on Thu, 22 Feb 2018 10:21:13 -0500) Subject: Re: [RFA/doco] set varsize-limit: New GDB setting for maximum dynamic object size Reply-to: Eli Zaretskii References: <1519312873-6307-1-git-send-email-brobecker@adacore.com> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-IsSubscribed: yes X-SW-Source: 2018-02/txt/msg00317.txt.bz2 > From: Joel Brobecker > Cc: Eli Zaretskii > Date: Thu, 22 Feb 2018 10:21:13 -0500 > > +* New commands > + > +set|show varsize-limit > + This new setting allows the user to control the maximum size of Ada > + objects being printing when those objects have a dynamic type, ^^^^^^^^ "printed", I guess? > + add_setshow_uinteger_cmd ("varsize-limit", class_support, > + &varsize_limit, _("\ > +Set the maximum number of bytes allowed in a dynamic-sized object."), _("\ > +Show the maximum number of bytes allowed in a dynamic-sized object."), _("\ > +Attempts to access an object whose size is not a compile-time constant\n\ > +and exceeds this limit will cause an error."), This is okay, but I wonder if "varsize" is a good name. The explanatory text you've written doesn't talk of any "variables". > +@item set varsize-limit @var{size} > +Limit the size of the types of objects to @var{size} bytes when those > +sizes are computed from run-time quantities. Is this only for printing, or is this more general? in any case, "limit the size of types of objects" is ambiguous (the "types" part confuses things), and doesn't really tell what does this limit. If it's only about printing, then let's say "don't print objects whose size exceeds ...". If it isn't limited to printing, how about "don't attempt to evaluate objects ...". > When this limit is set > +to @code{unlimited}, there is no limit. I'd rephrase Setting @var{size} to @code{unlimited} removes the size limitations. > +The purpose of having such a limit is to prevent @value{GDBN} from > +trying to grab enormous chunks of virtual memory when asked to evaluate > +a quantity whose bounds have been corrupted or have not yet been fully > +initialized. The limit applies to the results of some subexpressions > +as well as to complete expressions. For example, an expression denoting > +a simple integer component, such as @code{x.y.z}, may fail if the size of > +@var{x.y} is dynamic and exceeds @var{size}. On the other hand, > +@value{GDBN} is sometimes clever; the expression @code{A(i)}, where > +@var{A} is an array variable with non-constant size, will generally > +succeed regardless of the bounds on @var{A}, as long as the component > +size is less than @var{size}. All of the symbols except "size" should have the @code markup here, not @var. The documentation parts are okay with these nits fixed. Thanks.