From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ej1-x633.google.com (mail-ej1-x633.google.com [IPv6:2a00:1450:4864:20::633]) by sourceware.org (Postfix) with ESMTPS id 4C008385840C for ; Thu, 6 Apr 2023 17:19:07 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 4C008385840C Authentication-Results: sourceware.org; dmarc=pass (p=quarantine dis=none) header.from=undo.io Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=undo.io Received: by mail-ej1-x633.google.com with SMTP id g18so3096070ejx.7 for ; Thu, 06 Apr 2023 10:19:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=undo.io; s=google2; t=1680801546; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=vWJrN66c4GLtxRPBaA3J61Bk638cVv4ezqrltSXnaP8=; b=PQCfyKi4MGKhWPbzj9DjWRX+3+nbTuEFHAw0bsLoMrK0DnkhR1Nnrv4vxaiaeMlZy0 PYQDlOMcnJK9kcRBRPKw85ebIcvd9TyO+U7laligLR5jOGXFbilhEllkF93w4xAOONPq zjXGFZiW6amFsOGb3+cUKa0QW36RN2JFwTQG/4oKul/4Hadoj6BAMuUH5f6v9z3bJw1o gwMSAy4/Gj77WFoWpXP8B8U3/URx0pxHI4Tb5GXoHQgZ1OgYVd5Y1fzZ0iUucMEJl7pC 0XL2ikslSKJkGP2RGU+oje9NUI8BXegj61rqhSwQFwuxlTHjSaHJX0Mzsd8nzSagjnp9 0kBg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680801546; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=vWJrN66c4GLtxRPBaA3J61Bk638cVv4ezqrltSXnaP8=; b=LiUHlzteIpJuM3Zd2qqaVhe4NIhQF2i1Z8+Srg3WWD/NXusv6EZzQ16b46Nfa51a8x iB0hcYQ9vW7yaN+B49g06vLJ3ZeOdS3bHQNjeYSKeBT3R5ZBMbryjYdrmqch8fVC3LXL TgjZKAmYY/u18K8fbqkL1MbEREIf6z1R6WiQyZPjnOlzykHLgUMupAom7noKYz2aTbD7 AbLQOn0E8qySYYCVTpDLtuaFr2JSvhE9qKyfuMcAmo6nPcez+OGPh/7c4Jhl0FjCRd5c VZY+5BQjJCYWbmDXvIw1fwj+5tvmsOTyqgq2Dg3qdOC5I+fV2jmSVki2Uisn6X7Mzowb +GFQ== X-Gm-Message-State: AAQBX9dyFGZsIhuZHTecFMLdRe50AGwESezjgeELFEn1RDd/vd6TM71w KABLhy8u8D761qT3itcv2BUzLOTMEn/bBiWCVkbbUYVH1K8Bcj5vNThi+w== X-Google-Smtp-Source: AKy350bCBr6WM3AWtuRn8jqj/97LFo0XjEw5GVJ0Db2cNId9y0o143BWSDwRMqORXmfwYTZZ3bF50PJvCYi3cZLBurA= X-Received: by 2002:a17:907:76f4:b0:87b:fa21:7953 with SMTP id kg20-20020a17090776f400b0087bfa217953mr3960523ejc.8.1680801545983; Thu, 06 Apr 2023 10:19:05 -0700 (PDT) MIME-Version: 1.0 References: <20221020174702.514681-1-grees@undo.io> <20230311114934.3632834-1-grees@undo.io> <87tty6clfz.fsf@tromey.com> In-Reply-To: <87tty6clfz.fsf@tromey.com> From: Gareth Rees Date: Thu, 6 Apr 2023 18:18:55 +0100 Message-ID: Subject: Re: [PATCH v6] [gdb/mi] Don't treat references to compound values as "simple". To: Tom Tromey Cc: Gareth Rees via Gdb-patches Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-3.9 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: Tom Tromey wrote: > > >>>>> "Gareth" == Gareth Rees via Gdb-patches writes: > > Gareth> The '--simple-values' argument to '-stack-list-arguments' and similar > Gareth> GDB/MI commands does not take reference types into account, so that > Gareth> references to arbitrarily large structures are considered "simple" and > Gareth> printed. This means that the '--simple-values' argument cannot be used > Gareth> by IDEs when tracing the stack due to the time taken to print large > Gareth> structures passed by reference. > > This looks good to me. I haven't been following the progress of this > patch -- have the documentation changes been reviewed? If so, please > check it in. Following up again. I don't have commit rights, so I can't check it in myself. Could you check it in for me? But before you do, I just want to check that you're happy with the solution I've picked here. There are two ways to fix the problem of '--simple-values' printing references to compound values: First, if it's acceptable to modify the behaviour of the '--simple-values' option, then we can suppress the printing of references to compound types, as in this patch. This solution was preferred by Andrew Burgess [1] [2] [3] out of concern about the maintenance cost of accumulating backwards-compatible but arguably broken features. I added an argument that the original behaviour was a bug, and that it remains hard to use correctly [4]. Second, if we have to preserve the behaviour of the '--simple-values' option, then we need to add a new option. This solution was preferred by Eli Zaretskii [5] [6] out of concern about backwards compatibility. I've proposed a patch that applies the first solution, but I could work with either. So I need someone to break the tie between Andrew and Eli. Take a look at the cited messages and let me know if you're happy, and if you are, then commit the patch. [1] https://sourceware.org/pipermail/gdb-patches/2022-September/191747.html [2] https://sourceware.org/pipermail/gdb-patches/2023-March/197736.html [3] https://sourceware.org/pipermail/gdb-patches/2023-March/197894.html [4] https://sourceware.org/pipermail/gdb-patches/2023-March/197799.html [5] https://sourceware.org/pipermail/gdb-patches/2022-September/191754.html [6] https://sourceware.org/pipermail/gdb-patches/2023-March/197798.html