From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id KBnYC+iFe2r/OB8AWB0awg (envelope-from ) for ; Tue, 11 Aug 2026 16:28:24 -0400 Authentication-Results: simark.ca; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=H0jrXv4F; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id 1EC991E09B; Tue, 11 Aug 2026 16:28:24 -0400 (EDT) X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-25) on simark.ca X-Spam-Level: X-Spam-Status: No, score=-6.4 required=5.0 tests=ARC_SIGNED,ARC_VALID,BAYES_00, DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham 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 DA4D21E09B for ; Tue, 11 Aug 2026 16:28:21 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 3F30A4B9DB5A for ; Tue, 11 Aug 2026 20:28:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 3F30A4B9DB5A Authentication-Results: sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=H0jrXv4F Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by sourceware.org (Postfix) with ESMTPS id C10544BA799F for ; Tue, 11 Aug 2026 20:27:53 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C10544BA799F Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=intel.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=intel.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C10544BA799F Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.16 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786480074; cv=none; b=SG+1VlTuWrPwJIZTpOovHGYPChLlcsusb+B17tppFuLCifS1thGPbAFfw8FlZJIi6RAPQ/SjlyH5vfcDXc37qw6rq0aJ0Cpo2kiSlHrHTQGZRucGzBnb1VdALzWqopK0t0loG6MsTFKa1AvYqyIanrSAkXMaEeNrbHFnD4MJbco= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1786480074; c=relaxed/simple; bh=iD0tyxQUQLUjrIK9G6o6Dn35w1xF7QeLvLrNkMS8C6o=; h=DKIM-Signature:From:To:Subject:Date:Message-ID:MIME-Version; b=Ye66A/9WC3+GHOs5edzC8RjOrAd5GFpAknbew0a5Lk/Let66qWwbx6Pw6WHmquzLs7LgYwS3/U4M2vF3NxkZOTMuO0D4YTRg6x1ZBPFW4jS6QmxX64m5REvT8HEDJU28kI2I4RbwWPYupv7aP2NPMZtcphJpWOpKymebOPMJEBk= ARC-Authentication-Results: i=1; sourceware.org; dkim=pass (2048-bit key, unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256 header.s=Intel header.b=H0jrXv4F DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C10544BA799F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1786480074; x=1818016074; h=from:to:subject:date:message-id:mime-version: content-transfer-encoding; bh=iD0tyxQUQLUjrIK9G6o6Dn35w1xF7QeLvLrNkMS8C6o=; b=H0jrXv4FOpejMH2GrtWkrkYsEVf42qvESWqnynEwWrTWwQoFFh6gcxzD /KzYKpSXxhYxxf7XOxE/qBsoVfspf9pFv9rEG7VM24dIguBFvBdGM10WB h7aXiIVdFHgTGgzzuqptdC/3G4qOgFA8VCQrjI09S8LdtVxt+9E4swWmz wF7x62bkY7oaZY7i6Y79eJRY2eYI+NQGLQc/av6IzNNQQ7NHo88qoZfWQ VGKCTciQlR9/1BnvdYPYJinnUuDJOBC6Ix/m1DJFDGKgyQdg6BRV0cnwu cT0R6/oMutU8t0hW0BSUlijof4P7RTJLLWB+e2Txqxka7Yhr+Q6QSRoJ0 w==; X-CSE-ConnectionGUID: XPhv0dLXRTiAn2jdD/qTIw== X-CSE-MsgGUID: njadsXZCT3GBMlBGN0q2LA== X-IronPort-AV: E=McAfee;i="6800,10657,11872"; a="74560219" X-IronPort-AV: E=Sophos;i="6.25,218,1779174000"; d="scan'208";a="74560219" Received: from orviesa007.jf.intel.com ([10.64.159.147]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2026 13:27:52 -0700 X-CSE-ConnectionGUID: zlGHgk/PRLyahkYNQHEQnw== X-CSE-MsgGUID: u0aAB51ARI+kZYW/pAZzPw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,218,1779174000"; d="scan'208";a="263474377" Received: from live-gta-imageloader.igk.intel.com (HELO localhost) ([10.211.177.228]) by orviesa007-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Aug 2026 13:27:51 -0700 From: Stephan Rohr To: gdb-patches@sourceware.org Subject: [PATCH 0/1] gdb: add 'set print shadowed' to hide shadowed variables Date: Tue, 11 Aug 2026 20:27:45 +0000 Message-ID: <20260811202746.21652-1-stephan.rohr@intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 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 From: "Rohr, Stephan" Hello all, this patch adds a new setting 'set print shadowed on|off' to control whether shadowed variables are printed by 'info locals'. The default is 'on', matching current behaviour. The patch was originally written by Eduard Sargsyan; I rebased to the current master. It is a follow-up to the original RFC: https://sourceware.org/pipermail/gdb-patches/2023-November/203961.html and Kevin's response: https://sourceware.org/pipermail/gdb-patches/2023-November/203973.html It depends on Abdul's preliminary series, which was merged recently: https://sourceware.org/pipermail/gdb-patches/2026-July/228668.html Regression tested on x86_64 Ubuntu 22 with the native, native gdbserver and extended gdbserver targets; no regressions. I appreciate your feedback. Thanks Stephan Sargsyan, Eduard (1): gdb: Introduce new setting to filter out shadowed variables. gdb/NEWS | 8 ++++++++ gdb/doc/gdb.texinfo | 15 +++++++++++++- gdb/printcmd.c | 8 +++++++- gdb/stack.c | 25 +++++++++++++++++++++++- gdb/testsuite/gdb.ada/var_shadowing.exp | 1 + gdb/testsuite/gdb.base/options.exp | 1 + gdb/testsuite/gdb.base/var-shadowing.exp | 15 ++++++++++++++ gdb/valprint.c | 20 +++++++++++++++++++ gdb/valprint.h | 3 +++ 9 files changed, 93 insertions(+), 3 deletions(-) -- 2.43.0 ________________________________________ Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 (89) 99143-0 www.intel.de Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman Chairperson of the Supervisory Board: Sonja Pierer Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.