From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id yaykBAyhiGrHiDQAWB0awg (envelope-from ) for ; Fri, 21 Aug 2026 15:03:40 -0400 Authentication-Results: simark.ca; dkim=fail reason="signature verification failed" (768-bit key; unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HobtB1kZ; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 0D0211E033; Fri, 21 Aug 2026 15:03:40 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-3.8 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIM_INVALID,DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_BL_SPAMCOP_NET, RCVD_IN_DNSWL_MED autolearn=unavailable autolearn_force=no version=4.0.1 Received: from vm01.sourceware.org (vm01.sourceware.org [38.145.34.32]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange x25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by simark.ca (Postfix) with ESMTPS id 6F1EC1E033 for ; Fri, 21 Aug 2026 15:03:39 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id A62D74BB24CE for ; Fri, 21 Aug 2026 19:03:38 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A62D74BB24CE Authentication-Results: sourceware.org; dkim=fail reason="signature verification failed" (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HobtB1kZ Received: from omta38.uswest2.a.cloudfilter.net (omta38.uswest2.a.cloudfilter.net [35.89.44.37]) by sourceware.org (Postfix) with ESMTPS id DE1904BA7993 for ; Fri, 21 Aug 2026 19:03:12 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org DE1904BA7993 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=tromey.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=tromey.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org DE1904BA7993 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=35.89.44.37 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787338993; cv=none; b=s42olBJgPmTtLspw5srIx0vwXjR1G7pYS0bzXLgy9rrGQ926YYVR8cpdvfc/GBuchS4cZCgggSGb731XSGFYlz+HaRh4QJ4oCOWpKdcK+UuGDPgOy32YhPXN/vIquAAkgVR7ezrJFwP46npF2iilZE7a+K5kIc4QBeGeHAjX250= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1787338993; c=relaxed/simple; bh=guqvuai/Fn7priqP/O2nJ+OOWIWHuuUl/YlHKzT7O3A=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=GIw6TJj7Zz4ZWTJzsstbUQroDSn41tDixMDQOb/S2aLlJ8EPkbcUy7YeLm0JeCNyiEODlyUN5S2GrXDjsYWrqr733zBR+t93lUMhVys77MKSJhtjAMJleO2jyy5J7EzHmM7AZH0JGnRSjioEjDFjxlYT3T+6NbqcTMSf7ULtHy4= ARC-Authentication-Results: i=1; sourceware.org; dkim=policy (768-bit key, unprotected) header.d=tromey.com header.i=@tromey.com header.a=rsa-sha256 header.s=default header.b=HobtB1kZ reason="signing key too small" DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DE1904BA7993 Received: from eig-obgw-5006b.ext.cloudfilter.net ([10.0.29.217]) by cmsmtp with ESMTPS id xUMewQVTsv0ndxUWFwbbWH; Fri, 21 Aug 2026 19:03:11 +0000 Received: from box5379.bluehost.com ([162.241.216.53]) by cmsmtp with ESMTPS id xUWDwKA5g4sRbxUWEwxAqA; Fri, 21 Aug 2026 19:03:10 +0000 X-Authority-Analysis: v=2.4 cv=Apvu3P9P c=1 sm=1 tr=0 ts=6a88a0ef a=ApxJNpeYhEAb1aAlGBBbmA==:117 a=ApxJNpeYhEAb1aAlGBBbmA==:17 a=Sv0fKeRqtYgA:10 a=ItBw4LHWJt0A:10 a=QyXUC8HyAAAA:8 a=Qr7ixharg0h6e9yY3aAA:9 a=DCx65vhANUyCzuf5D8fC:22 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tromey.com; s=default; h=Content-Type:MIME-Version:Message-ID:Date:References:In-Reply-To :Subject:Cc:To:From:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=zZqBYaYUlgFOqPAE1b62WzzYoiq0U76uRpxm4aNproA=; b=HobtB1kZzmerxrQ9bb9lETTShy eKNZcD98OhLha74bupqhdJcwZ2eKfp7J6DUNk6CanRNg/7Ib+ljbxCYpB2Q1T/CdltozHa0e7una3 EIgBgS90Ef6M9IOIKc7WhbwLF; Received: from 97-122-117-2.hlrn.qwest.net ([97.122.117.2]:47828 helo=bapiya) by box5379.bluehost.com with esmtpsa (TLS1.3) tls TLS_AES_256_GCM_SHA384 (Exim 4.99.5) (envelope-from ) id 1wxUWD-00000003GBI-1hcd; Fri, 21 Aug 2026 13:03:09 -0600 From: Tom Tromey To: Stephan Rohr Cc: gdb-patches@sourceware.org, simark@simark.ca Subject: Re: [PATCH v2 1/1] gdb: Introduce new setting to filter out shadowed variables. In-Reply-To: <20260818081452.17464-2-stephan.rohr@intel.com> (Stephan Rohr's message of "Tue, 18 Aug 2026 08:14:52 +0000") References: <20260818081452.17464-1-stephan.rohr@intel.com> <20260818081452.17464-2-stephan.rohr@intel.com> X-Attribution: Tom Date: Fri, 21 Aug 2026 13:03:08 -0600 Message-ID: <877bljpa8j.fsf@tromey.com> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - box5379.bluehost.com X-AntiAbuse: Original Domain - sourceware.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tromey.com X-BWhitelist: no X-Source-IP: 97.122.117.2 X-Source-L: No X-Exim-ID: 1wxUWD-00000003GBI-1hcd X-Source: X-Source-Args: X-Source-Dir: X-Source-Sender: 97-122-117-2.hlrn.qwest.net (bapiya) [97.122.117.2]:47828 X-Source-Auth: tom+tromey.com X-Email-Count: 2 X-Org: HG=bhshared;ORG=bluehost; X-Source-Cap: ZWx5bnJvYmk7ZWx5bnJvYmk7Ym94NTM3OS5ibHVlaG9zdC5jb20= X-Local-Domain: yes X-CMAE-Envelope: MS4xfGgo59QChf/vYx3rGKeUUx2BSaTvbwFxozDp4N6b8D0fLFoGQf+gA6QInhl0t2WnZCDzCiMks/8pc38JEkO1cVp3tET8nGP/nNmgDSSAaWLJgpoIv6O+ lWuMoLTUSSG0kdO1DUtTaFUOosU/ztP1zC4COTUUOwGtrogYhgcc2A4/d+vZFkAzdCL8/p2gSp3XXqbW7YyfGbwE0pHUOc4iBEY= X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: gdb-patches-bounces~public-inbox=simark.ca@sourceware.org >>>>> "Stephan" == Stephan Rohr writes: Stephan> +* New commands Stephan> + Stephan> +set print shadowed on|off Stephan> +show print shadowed Stephan> +This controls the output of the "info locals" command. If the option is 'off' Stephan> +shadowed variables will be omitted in output. The default is to print Stephan> +shadowed variables. Needs a doc review but I think the explanation lines should be indented. Stephan> +/* Option for printing shadowed variables. */ Stephan> + Stephan> +struct shadowed_print_options Stephan> +{ Stephan> + bool print_shadowed = true; I don't really follow why this type is needed. Stephan> print_variable_and_value (print_name, sym, frame, stream, num_tabs, Stephan> - shadow_status); Stephan> + print_shadowed ? shadow_status Stephan> + : var_shadowing::NONE); Lining things up like this isn't really the gdb style; you could break before the "?" instead. Stephan> + if (cb_data.printed_shadowed_variables) Stephan> + gdb_printf (stream, Stephan> + _("Use 'set print shadowed off' " Stephan> + "to hide shadowed variables.\n")); Stephan> + else if (cb_data.omitted_shadowed_variables) Stephan> + gdb_printf (stream, Stephan> + _("Some shadowed variables were omitted, use " Stephan> + "'set print shadowed on' to include them.\n")); I'm slowly trying to transition gdb to using double quotes rather than the current mishmash of quoting styles. Also command names should be styled using command_style. thanks, Tom