From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-x336.google.com (mail-ot1-x336.google.com [IPv6:2607:f8b0:4864:20::336]) by sourceware.org (Postfix) with ESMTPS id 12A04382E82E for ; Fri, 14 May 2021 00:08:10 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 12A04382E82E Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=digitalartificer.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=russell.mull@gmail.com Received: by mail-ot1-x336.google.com with SMTP id n32-20020a9d1ea30000b02902a53d6ad4bdso25110297otn.3 for ; Thu, 13 May 2021 17:08:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=digitalartificer-com.20150623.gappssmtp.com; s=20150623; h=mime-version:from:date:message-id:subject:to; bh=35Eg2D046P1MpRrlwSoctnmDGFfP0S5pXFAG3KuZiTY=; b=yER1gSwbEMLjMv7XqaL/ixH4PX4SXuoyySu7fA7o5lIej0479DxfEl18pT6FNa+7aq Eu9DZSBcr/spqo7bh2Y86bXuFSwjnoMoH3q3CdH7z6sQAV8PVVN6scRVhUEQycf+wVPP 0mOggNr4+W5QCz1uTl47C1gOgmxVrgFFoxko/efggnwuJZyf0wS3C2a173uGIMb5xOI2 UKL70fVnyk1YM2ccKIgoWbjapxfNjzLUKna80nI00omdMyyrp5dX4Rk9bWnE7mSTwA1K YvK79N32p0KFq2+01iX96MnNbBGFRw2V3f6aOLK2lkHjAK0DSyXkwDppIlqkNwGddA05 z83g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=35Eg2D046P1MpRrlwSoctnmDGFfP0S5pXFAG3KuZiTY=; b=Kyqzdszi4zAkHJLvvWAHX8DLzkDXjj2xWSibaWxJnE023QYx5UQwxzIsYdpojzOtc2 9Fujv5RA8vcG+Cu/ajlS8LlAfNIEipMSBj7m+021E88UTregdz8JGUF5QG6/xajZyV9X txkTtmVossnZr/ZhaZL3nEm/BiqMgYEXgcrQiC7Wb+expprS/9jlcNL4Duj5HMQX3HBc a0LmTIYiw7/LQiklJsf5FhmnUJip8WH3roLgcV+6aua35QO6hGSzrYnAGI6HqIjnxHIu BBIhDYLFH+QaBmSV3G3YfdlmcW+ICuj2LWEVM4SA+qRjZ7T8Udz06nBx2oS+vDFnI+W5 mouQ== X-Gm-Message-State: AOAM532bAqfxh8a+TElEqPrIgpZiyHBSHaVGbOcC4s3yzNnLq+srEihs tAYZOXl+2/oC7jbI7ILoSLi24AFmcRE2+56bbF8Z4lB4Ps/gpw== X-Google-Smtp-Source: ABdhPJxSlvd2J27shmrIYdyJL/7hXqvrSWaGVeuL0uK6GhXGZp71TWFrhoMyhoCs+tKH3ncnXEx1UJBXEvCT15h5z4Q= X-Received: by 2002:a9d:3424:: with SMTP id v33mr36742242otb.137.1620950889163; Thu, 13 May 2021 17:08:09 -0700 (PDT) MIME-Version: 1.0 From: Russell Mull Date: Thu, 13 May 2021 17:07:58 -0700 Message-ID: Subject: Regression or undocumented behavior change in Rust value printing in gdb 10.1 To: gdb@sourceware.org X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, HTML_MESSAGE, KAM_NUMSUBJECT, RCVD_IN_DNSWL_NONE, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=no autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 X-BeenThere: gdb@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2021 00:08:11 -0000 Hello, I've been trying to track down an issue with Rust's pretty printing extensions for gdb. They take effect when printing a value of one of the supported special types directly, but they are not used if the value is a member of a struct. For example, if I print a value of type "Vec", then the pretty printers are used. However, if I print a value of type "struct TrivialNewtype(Vec)", then they are not. This behavior changed in gdb 10.1; in version 9.2 and earlier, the extended pretty printer was invoked for struct members as expected. I've bisected the commit history and found that the change occurred at commit 5f56f7cbd22219e84df3caece06f469c5063e5fb ("Convert Rust printing to value-based API"). I can't easily piece together how this code is intended to work in combination with python-based pretty printers like those provided with Rust, so I thought I'd ask about it here. Is this a bug, or possibly the new intended behavior? If it's the latter, is there something that can be done on the python extension side to get the old behavior back? I'm tracking this on the Rust side at https://github.com/rust-lang/rust/issues/85267, and have a small repro available at https://github.com/mullr/gdb-pretty-test. Thanks, Russell Mull