From patchwork Thu Jan 12 09:01:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Maciej W. Rozycki" X-Patchwork-Id: 55408 Return-Path: X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 9B38D38543B8 for ; Thu, 12 Jan 2023 09:01:52 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mail-lf1-x12a.google.com (mail-lf1-x12a.google.com [IPv6:2a00:1450:4864:20::12a]) by sourceware.org (Postfix) with ESMTPS id 419433858D35 for ; Thu, 12 Jan 2023 09:01:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 419433858D35 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-x12a.google.com with SMTP id bq39so27517167lfb.0 for ; Thu, 12 Jan 2023 01:01:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=mime-version:user-agent:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=rnkZ1U5xsIaErEt2li+V1Prj/xW2p+zjbTJL2zw/GGs=; b=R++VTPFYzxo8D8QmQzWhX24+Pn+drf+/hHCC0RDzdeH/YN3ldDaprIe7nRKpd60LiT 5FIoVfIDSKDlQg+TGHxBJ98XN0O8ScyHADo5ksVL9gCq0xkmN4AR6o1NpH9oZZgQo9TC fhO9ArqNNMq2raK7uU3Iov/hZkyCL0EsBgROx/yjSH7lxNc0m4hNPRHzXkUr0cnwSm87 tkUJl+rSqTsufRUT51B0fUVQUsoVBd+p8xsqlVZKo5CPA/nfGifXmTnqF6manQvEJaZM TRsEASGQ17EaNl0joaA3i+hRne44JopCNnKxWxj6rgJmNmeiGndo/YPkLj3u6qqNrqjI Hn/Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=mime-version:user-agent:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=rnkZ1U5xsIaErEt2li+V1Prj/xW2p+zjbTJL2zw/GGs=; b=cv5/Snkyn4E37EdJWH5VVBZy4+wmsCCYuE31pUdxT1czot+ZgHhY/sFQB6GIUdTw+8 v8cyFIwZxBVj52apFHUcTFF7KdRuv+RWtef1ACut8eoywAHVdJ05bvfhJnQ6yoIXkuLm tdNxeTe39SboO5VT5Q6QD8VkQnbDRJFIdQPEMthp4LUuHWT1vXyUxzb1dT4nChMyXmfk zuKegHiLhrfyE0dg5/BBV20E6pni/CbadtJW5DqvTTpqo7bO1JISfoOUwWYmERkW9FBo dXWL0br/fCg4j36V2TCj5NPQhpGMiFMR7O5w1TJSaj1cJuX7ZOeKDRwmq9KjjUylM4MK TU+w== X-Gm-Message-State: AFqh2krCV8ZFVpvNvhyavWdhfcU+4AZY+EgVeyzj1k6iCTYAg2seSHZB HQai7xhVFBD8gREX2uLO9rPNaku0aTS9GsDG X-Google-Smtp-Source: AMrXdXtsBfI1w8I81iN65yYDIn583QbLBLg8bqzkzVBEJfFe+sHmHLiXUpRI/gPoO7bO35NM3l1rbQ== X-Received: by 2002:a05:6512:b0c:b0:4b5:97cf:8f1a with SMTP id w12-20020a0565120b0c00b004b597cf8f1amr25177589lfu.40.1673514090906; Thu, 12 Jan 2023 01:01:30 -0800 (PST) Received: from [192.168.219.3] ([78.8.192.131]) by smtp.gmail.com with ESMTPSA id q11-20020a056512210b00b004cc9042c9cfsm1217703lfr.158.2023.01.12.01.01.29 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2023 01:01:30 -0800 (PST) Date: Thu, 12 Jan 2023 09:01:28 +0000 (GMT) From: "Maciej W. Rozycki" To: gdb-patches@sourceware.org cc: Andrew Burgess , Tom Tromey , Richard Bunt Subject: [PATCH v2 0/5] gdb: introduce limited array lengths while printing values Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 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 X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org Sender: "Gdb-patches" Hi, This is v2 of Andrew's RFC, originally posted here: . Following Tom's feedback I have updated the original change so that data up to `max-value-size' is retrieved and stored in the history regardless of how much less has been requested with the relevant `print' command. This has revealed issues with value history handling where entries were not retrieved due to `max-value-size' setting where accessing the original data object would work, and then where out of range accesses pretended to retrieve data or returned memory faults. I have updated the change to make the `output' command follow the same rules (except for storing the value retrieved in the value history of course). This in turn required a test framework update as it seems the only command that does not produce a new line character/sequence between data output and the following command prompt; this has also revealed this command had no testsuite coverage at all until now. Consequently this has now become a patch series addressing each of these issues individually. See individual change descriptions (and any extra discussion) for details. I have regression-tested it natively with a `x86_64-linux-gnu' system. OK to apply? Maciej