From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by sourceware.org (Postfix) with ESMTPS id 7B9913858D35 for ; Thu, 12 Jan 2023 10:59:03 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 7B9913858D35 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=embecosm.com Received: by mail-lf1-x129.google.com with SMTP id bf43so27879177lfb.6 for ; Thu, 12 Jan 2023 02:59:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=A+YDW5Yg1bErpIV+llEll1vQRhYeumMkhYGsBtRW5nQ=; b=NdrEgiHSW8C0TZpOD6uugZibuKZatn4d/0tr0rkk1+XaHL+yJf3KkCRMkVkweigTd/ r72SlLsPRD4NojBAgxKM0zBuWXWQlY+BQcAW7B4HGCRM8SslZrdzRIOX3U5e2tfE7RBT oKNZYFol6EL/RDPbLVdx8OWHu54PaAqrc5tuHZ3EE7yKC6xXU1l+EE8ZISxAwVexVjeG wmLLuw2BHRpqmcg11uguiNZ/UaBoFhM58NuQBJrfyElLqNNpwa7yLHJh1KxpuR00JEcK /QHl5GGWzeZ/Yp3lLRcc8MWfIJnGS4XCvucF4JRtlSKgU7Ou3wXFE6XdPuaL8A4qEzhX 9UoA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:references:message-id:in-reply-to:subject :cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=A+YDW5Yg1bErpIV+llEll1vQRhYeumMkhYGsBtRW5nQ=; b=Ippyw2Do327i07qMnraHwdZzFJL5euCw2vJrE40qtL9CSR7hvpAGYX40E/go31WkIu SlwFnMt77kzQVuHSN0nLiVxlK/dhJZjlKDUg8+6M9EMtsUaNiu2yTr0GiXHG2gNy+/Ms FOaxx5inJu/xFtyC2ywJjQPPraUgQhv4LK/NC7YZHbF1fdiAMDK2nMqbKzuSdH/GEv/m aAg1tKTlWbgddYdqrLZIDztIW7umGqVppogOp7jH5LYp0yHffCilMsRd6Ki4ajTb+hin HuvJoeSqssnwG8/AXe0Wy5RxxvEgAQyaOgHWUV/W+pSlNcCTx39L0sgFeLSXiSXP5PK3 OM3A== X-Gm-Message-State: AFqh2krd97QtrdyNCC8QPEFqclT2+eH/DVyW+ouC9CmCslO3i6E6aWs7 xc/RTEtotgZ4IW7VEufWvJSUWw== X-Google-Smtp-Source: AMrXdXv7kXNlccL2rp5wYxUjArbB+oO+NWvvNSE6nbSL2hu1K0xieSiNBS4FN4spJERYRpMlumqEXw== X-Received: by 2002:ac2:528e:0:b0:4ca:fb55:860 with SMTP id q14-20020ac2528e000000b004cafb550860mr17833194lfm.44.1673521142129; Thu, 12 Jan 2023 02:59:02 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id bp22-20020a056512159600b004cc800b1f2csm2453025lfb.238.2023.01.12.02.59.00 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2023 02:59:01 -0800 (PST) Date: Thu, 12 Jan 2023 10:58:59 +0000 (GMT) From: "Maciej W. Rozycki" To: Eli Zaretskii cc: gdb-patches@sourceware.org, Andrew Burgess , Tom Tromey , Richard Bunt Subject: Re: [PATCH v2 5/5] GDB: Introduce limited array lengths while printing values In-Reply-To: <835ydckr0x.fsf@gnu.org> Message-ID: References: <835ydckr0x.fsf@gnu.org> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Thu, 12 Jan 2023, Eli Zaretskii wrote: > > --- src.orig/gdb/NEWS > > +++ src/gdb/NEWS > > @@ -354,6 +354,12 @@ GDB now supports floating-point on Loong > > Disabling this can cause a performance penalty when there are a lot of > > symbols to load, but is useful for debugging purposes. > > > > +* The 'set print elements' setting now helps when printing large arrays. > > + If an array would otherwise exceed max-value-size, but 'print elements' > > + is set such that the number of elements to print is less than or equal > > + to 'max-value-size', GDB will now still print the array, however only > > + 'max-value-size' worth of data will be added into the value history. > > The wording here needs to be changed, because max-value-size is not > about the number of elements, it's about the amount of memory needed > for those elements. So this part: > > but 'print elements' > is set such that the number of elements to print is less than or equal > to 'max-value-size' > > should be reworded. Thank you for your review, and thanks for catching this subtlety. I'll replace "number" with "size" above just as in the manual, whether in the final version committed or in the next iteration (as appropriate). Maciej