From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from simark.ca by simark.ca with LMTP id gSBoLqkuVmpOwgcAWB0awg (envelope-from ) for ; Tue, 14 Jul 2026 08:42:17 -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=graxItyC; dkim-atps=neutral Received: by simark.ca (Postfix, from userid 112) id B979F1E09E; Tue, 14 Jul 2026 08:42:17 -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 3DCAA1E033 for ; Tue, 14 Jul 2026 08:42:16 -0400 (EDT) Received: from vm01.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id C6C2F4BA2E23 for ; Tue, 14 Jul 2026 12:42:15 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C6C2F4BA2E23 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=graxItyC Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.8]) by sourceware.org (Postfix) with ESMTPS id 425504BA2E15 for ; Tue, 14 Jul 2026 12:40:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 425504BA2E15 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 425504BA2E15 Authentication-Results: sourceware.org; arc=none smtp.remote-ip=192.198.163.8 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784032848; cv=none; b=vDZSeSWqCZpznf5yklFYk1wGgzPUgVsB3rFnwhJTGaFq9Axif3BnrFGH1/5qaIQTHKGZAOM5nOpRIskZSu0EMn3p3KMVKbfyjb/fEm+AG/qcY9V2iMwPdr7Z9IraOC1maTLpBJahGcuGyfdUWj7WNMC+lmMn0UEJ6V2MPuElcvQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1784032848; c=relaxed/simple; bh=shKag4EY5/eUV8iRSnw0fvjqwbJxb0ZbqVzZ31SZ9Ss=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=X7MMwoJ/NA1NyLX+mi61vYbRQVnLvVXY5rXi8o8EgsS9DwUMb6nW0sTY0FYmz97PQMpE7S0sI7er2YGgtvWGDwun29npCkztvHN/rC6C/5Wfi33H4prBHvWpIQ/2jkjkAe7udsqM0f6yyYhymeREhFjPQhBiSXzzfwS+uC+ce9I= 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=graxItyC DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 425504BA2E15 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1784032848; x=1815568848; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=shKag4EY5/eUV8iRSnw0fvjqwbJxb0ZbqVzZ31SZ9Ss=; b=graxItyC2WO6A1qYU1ApxAv7jQ58PjTKODXt6K3r0yWEBe68LsXq4qaw 9mM2Oa2M+dcINPydtWFnZ3pf6+Q7k9wgFeyMPafhMazeqCXsVymPZ31xJ ZOP4ikI9z6exVAKf+Xxl18FHKMe8EJdc2jEzuuSCoII3hiWTJOtAazq/2 a7Wg5YFFP21oMNOBZ+aNv7/YxBAono4dJIATsrVXyzgEgAsaDJoFkx30d BlnM9oNv0T50XBguNX/wLEFW68648seof68NgKBVIxDbC1Dx6wxyM7v5N 4qtqAQ/4gVqfIJ0mLCl87ydXR4o2KFyHMquIA8uTt0rS8EjENFpUS+xSc w==; X-CSE-ConnectionGUID: 3EDHNJypQeWYgHnjLqTT+A== X-CSE-MsgGUID: xLoU6XaaSI+vLikYdrNgEg== X-IronPort-AV: E=McAfee;i="6800,10657,11846"; a="102205899" X-IronPort-AV: E=Sophos;i="6.25,163,1779174000"; d="scan'208";a="102205899" Received: from orviesa009.jf.intel.com ([10.64.159.149]) by fmvoesa102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2026 05:40:46 -0700 X-CSE-ConnectionGUID: 2yBthEgfRo+50TzpaWewXQ== X-CSE-MsgGUID: DAUHKjuQR42oQaex3DpbVQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,163,1779174000"; d="scan'208";a="256493069" Received: from unknown (HELO localhost) ([10.245.115.165]) by orviesa009-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Jul 2026 05:40:43 -0700 From: Abdul Basit Ijaz To: gdb-patches@sourceware.org Cc: pedro@palves.net, philippe.waroquiers@skynet.be, aburgess@redhat.com, christina.schimpe@intel.com, lsix@lancelotsix.com, eliz@gnu.org, abdul.b.ijaz@intel.com, guinevere@redhat.com Subject: [PATCH v14 0/2] add annotation in 'info locals' command for variables shadowing case Date: Tue, 14 Jul 2026 14:40:34 +0200 Message-Id: <20260714124036.79545-1-abdul.b.ijaz@intel.com> X-Mailer: git-send-email 2.34.1 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 Hi All, For the variable shadowing case, these patches add the annotation "shadowed" and location information to the shadowed variables so that it is easier for the end user to identify which variable was shadowed. Patch #1 updates "info locals" command Path #2 is for the mi commands '-stack-list-locals' and '-stack-list-variables'. Last V13 Series: https://sourceware.org/pipermail/gdb-patches/2026-July/228523.html V12 Series: https://sourceware.org/pipermail/gdb-patches/2025-December/223219.html V11 Series: https://sourceware.org/pipermail/gdb-patches/2025-November/223002.html V10 Series: https://sourceware.org/pipermail/gdb-patches/2025-April/217019.html V9 Series: https://sourceware.org/pipermail/gdb-patches/2025-March/216590.html V8 Series: https://sourceware.org/pipermail/gdb-patches/2024-December/214263.html Documentation in V7 Series was already approved by Eli: https://sourceware.org/pipermail/gdb-patches/2024-October/212228.html https://sourceware.org/pipermail/gdb-patches/2024-October/212229.html Patch#1 V6 was Reviewed-by Larsen: https://sourceware.org/pipermail/gdb-patches/2024-January/205923.html Patch#2 V2 was Tested-by Larsen: https://sourceware.org/pipermail/gdb-patches/2024-January/205922.html Changes since V13: * Fixes following Andrew feedback on V13 patch series: Patch#1: https://sourceware.org/pipermail/gdb-patches/2026-July/228604.html Patch#2: https://sourceware.org/pipermail/gdb-patches/2026-July/228627.html Testing is done for unix/m32/native-gdbserver configurations and no issue is seen. Thanks & Best Regards Abdul Basit Ijaz Ijaz, Abdul B (2): gdb: add annotation in 'info locals' command for variables shadowing case gdb: add shadowed field in '-stack-list-locals/variables' mi commands gdb/NEWS | 9 ++ gdb/c-typeprint.c | 3 +- gdb/doc/gdb.texinfo | 48 ++++++ gdb/language.c | 20 +++ gdb/language.h | 18 +++ gdb/mi/mi-cmd-stack.c | 144 +++++++++++++----- gdb/printcmd.c | 44 +++++- gdb/stack.c | 115 +++++++++++++- gdb/stack.h | 22 +++ gdb/testsuite/gdb.ada/var_shadowing.exp | 39 +++++ .../gdb.ada/var_shadowing/var_shadowing.adb | 30 ++++ gdb/testsuite/gdb.base/var-shadowing.c | 51 +++++++ gdb/testsuite/gdb.base/var-shadowing.exp | 92 +++++++++++ gdb/testsuite/gdb.base/var-shadowing2.c | 16 ++ gdb/testsuite/gdb.mi/mi-var-shadowing.c | 50 ++++++ gdb/testsuite/gdb.mi/mi-var-shadowing.exp | 141 +++++++++++++++++ gdb/testsuite/gdb.opt/inline-locals.exp | 21 ++- gdb/testsuite/gdb.rust/var_reuse.exp | 36 +++++ gdb/testsuite/gdb.rust/var_reuse.rs | 20 +++ gdb/value.h | 26 +++- 20 files changed, 885 insertions(+), 60 deletions(-) create mode 100644 gdb/testsuite/gdb.ada/var_shadowing.exp create mode 100644 gdb/testsuite/gdb.ada/var_shadowing/var_shadowing.adb create mode 100755 gdb/testsuite/gdb.base/var-shadowing.c create mode 100755 gdb/testsuite/gdb.base/var-shadowing.exp create mode 100644 gdb/testsuite/gdb.base/var-shadowing2.c create mode 100644 gdb/testsuite/gdb.mi/mi-var-shadowing.c create mode 100644 gdb/testsuite/gdb.mi/mi-var-shadowing.exp create mode 100755 gdb/testsuite/gdb.rust/var_reuse.exp create mode 100755 gdb/testsuite/gdb.rust/var_reuse.rs -- 2.34.1 Intel Deutschland GmbH Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany Tel: +49 89 991 430, www.intel.de Managing Directors: Harry Demas, Jeffrey Schneiderman, Yin Chong Sorrell Chairperson of the Supervisory Board: Nicole Lau Registered Seat: Munich Commercial Register: Amtsgericht Muenchen HRB 186928