From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-x334.google.com (mail-wm1-x334.google.com [IPv6:2a00:1450:4864:20::334]) by sourceware.org (Postfix) with ESMTPS id 017D9385B534 for ; Fri, 10 Feb 2023 14:17:54 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 017D9385B534 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-wm1-x334.google.com with SMTP id n13so3917544wmr.4 for ; Fri, 10 Feb 2023 06:17:53 -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=x1+dCaOi7jZiSSFvfcEzLpaS4Vz69wuF5xmF341NOMg=; b=REuY3YOE74cFhfvSPN1v9k17vMoYU0oIQFao2sacl2OgPdyB3hwtWpl9NS0sGzjLqM 1atk/WNPPIWIsq4QDCuEp+3PzlogyJAlYr4vM24DIBsaMXhd/G9crZG63A8xEX5y9lvB YT7WF394ZNK1sNbo29lo2JRLrzVaVfh/ff5FW4pw4sNCmlOrmfzWOy7rvXAfAjhKw/Fs 1tcdktBG+8naN2in6JnpnQxKfBEcpqThcxBAzdqjFhz47baEST2a3glfBGlcWmY3tfMW 3rsb8ZGfjoZp4KhgDlPCCznA9Q9zJWrslQPfHLFSUs7toLIlHx/OA4uiP5QmKm/JtJfi fLvg== 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=x1+dCaOi7jZiSSFvfcEzLpaS4Vz69wuF5xmF341NOMg=; b=fZKoFLiRtHU8eOyTIAT6ISIKQVuZgTXJUyn8TKs2BCMdUmZewWLF4JXBQipb5pp/gg ANj66rdqtcyTDJYVz5E5gFE+PXDZuCv95KdFVY681IZSdjIYQ4FM+K6H/fjRDtPr6PSP 0Lkm2CnRrddcmwRMuE42MoTshFqLL9aJPBHdRDQAWb9VWN1MQhj8lcFbJpqnl8u4rPOa q+CzLec63/QxcyABl/sdAnqvCsHVMQ36yo/rTVUTo/2Nxov8Y/Up04mGF0jc4xKh1orN krXrzKjw3beUbpX5aZhKg+fCixF9aqGA/UnDtPoU4uapbWyookNKKj6lwcPT4Jpjs4iR GtTQ== X-Gm-Message-State: AO0yUKVgD65CvjbqXpbglQ1M+q+cqb5kcH4WLH1scXIO9i68B/pOZLay M2B2tva4KrD9UtA1ix9dHwnpQg== X-Google-Smtp-Source: AK7set+ToUUaQUSXuxjTgx81iRIE74Tqa9swz4wbj5rRXHE5B2x3KcRAhjgEc1vzDb4yBAk5IwD/Lw== X-Received: by 2002:a05:600c:1f12:b0:3e1:541:2b56 with SMTP id bd18-20020a05600c1f1200b003e105412b56mr8699186wmb.30.1676038672728; Fri, 10 Feb 2023 06:17:52 -0800 (PST) Received: from tpp.orcam.me.uk (tpp.orcam.me.uk. [2001:8b0:154:0:ea6a:64ff:fe24:f2fc]) by smtp.gmail.com with ESMTPSA id i20-20020a1c5414000000b003dc53217e07sm5405103wmb.16.2023.02.10.06.17.50 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 10 Feb 2023 06:17:51 -0800 (PST) Date: Fri, 10 Feb 2023 14:17:42 +0000 (GMT) From: "Maciej W. Rozycki" To: Tom Tromey cc: gdb-patches@sourceware.org, Andrew Burgess , Richard Bunt Subject: Re: [PATCH v3 1/5] GDB: Ignore `max-value-size' setting with value history accesses In-Reply-To: <87o7qelh5s.fsf@tromey.com> Message-ID: References: <87o7qelh5s.fsf@tromey.com> 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.6 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 Tue, 31 Jan 2023, Tom Tromey wrote: > Maciej> We have an inconsistency in value history accesses where array element > Maciej> accesses cause an error for entries exceeding the currently selected > Maciej> `max-value-size' setting even where such accesses successfully complete > Maciej> for elements located in the inferior, e.g.: > > Thank you for the patch. > > gdb has other inconsistencies when using the value history as well. If > you print a struct holding a char*, the printers will generally fetch it > and print the string. Then if you 'print $3' at some later point, the > string will be re-fetched and the new value displayed. Occasionally > confusing; it seems to me it would be better for the value history and > the printing mechanism to conspire to keep track of all memory read > during the printing. I'd say it's at least ambiguous what one might expect here, the character string pointed to is not a part of the structure after all. > Maciej> Moreover a > Maciej> statement in documentation says, concerning this setting, that: "Setting > Maciej> this variable does not effect values that have already been allocated > Maciej> within GDB, only future allocations." While in the implementer-speak > Maciej> the sentence may be unambiguous I think the outside user may well infer > Maciej> that the setting only applies to values that need to be retrieved from > Maciej> the debuggee. > > Perhaps this could be reworded to mention "values previously computed" > or "printed" to tie it better to user actions rather than internal > state. I'll make it: "[...] I think the outside user may well infer that the setting does not apply to values previously printed." then (and fix a mistake Paul has pointed out off-list too). Please shout if you think it needs yet different wording. Maciej