Message ID | 20231121095516.22987-1-abdul.b.ijaz@intel.com |
---|---|
Headers |
Return-Path: <gdb-patches-bounces+patchwork=sourceware.org@sourceware.org> X-Original-To: patchwork@sourceware.org Delivered-To: patchwork@sourceware.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D5FC53858C3A for <patchwork@sourceware.org>; Tue, 21 Nov 2023 09:55:47 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [134.134.136.126]) by sourceware.org (Postfix) with ESMTPS id 0488D3858D33 for <gdb-patches@sourceware.org>; Tue, 21 Nov 2023 09:55:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0488D3858D33 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 0488D3858D33 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=134.134.136.126 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700560533; cv=none; b=Lw0JARJ/dH6/Hr50Ye3STnU8PN76vY1Gcc6kP+wR6i5/XftEUs/G5IqZexKfb7DuwdylzaABFqpbH4E+VAGgF8c1r59KVTGB8YUMxF61OXPBls8Sscd98S+GrJGQZdM6Qb6CA/ITZIFBLvGiNCkur3Lr3dwriMOHoRvlPnra8yg= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1700560533; c=relaxed/simple; bh=aFY3iVLeRc+/omq3/A8DDFX3SWEvDKfm7YT7j3jZeuM=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=g34i71iQP5sOPU4sbcxthRlA/zSXgnp/l/DQHnwMVJAcxEiOgBqDTBStXKDhdfGG6WrYzGpJvw6tkmpzm1AYlgK0f0B6yZVloGDihqV6YEyvSt0q15Vl4qhZ/BKJj3c/2sTPne30oEHudNhQItQSPAIEcUR/ZN+rvJ3X1wrQ59g= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1700560531; x=1732096531; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=aFY3iVLeRc+/omq3/A8DDFX3SWEvDKfm7YT7j3jZeuM=; b=dQmfJa0m8ak+/WG3AshaUHvAz+6U9gIvCQSif56+OQ8b8Xw2NI9eM/Cc dVEAS0T0vB7VnoTY7+8wkjU1/yGp6MItYMimPI1xaqZagf+fHsIvC0/5v oKP/HFVoZ+TiUDekECis3nEQYYqiQ2BMy38pSavkt7+gZsQV/lZTWIKIO GQ8vQ/Pgn8FHdWMw13lo+1cOk2jdFn8BWXc82n3HmM+RA9vVKi1vPWCzE ZmhGmPZMa8+wOAcJReB3fuKgo3NSo9t06M3ojwqLnfXcltp3VXs8CjApH ITwYybav+InIO2sbVw4KrXDTTc77LWuMZB/9YrUlEJWZ78rqMLtcn1pZQ w==; X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="376841143" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="376841143" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 01:55:29 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10900"; a="766586452" X-IronPort-AV: E=Sophos;i="6.04,215,1695711600"; d="scan'208";a="766586452" Received: from abijaz-mobl2.ger.corp.intel.com (HELO localhost) ([10.251.220.195]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Nov 2023 01:55:27 -0800 From: Abdul Basit Ijaz <abdul.b.ijaz@intel.com> To: gdb-patches@sourceware.org Cc: blarsen@redhat.com, pedro@palves.net, philippe.waroquiers@skynet.be, aburgess@redhat.com, tankut.baris.aktemur@intel.com, christina.schimpe@intel.com, lsix@lancelotsix.com, "Ijaz, Abdul B" <abdul.b.ijaz@intel.com> Subject: [PATCH v5 0/2] add annotation in 'info locals' command for variables shadowing case Date: Tue, 21 Nov 2023 10:55:14 +0100 Message-Id: <20231121095516.22987-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-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Gdb-patches mailing list <gdb-patches.sourceware.org> List-Unsubscribe: <https://sourceware.org/mailman/options/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=unsubscribe> List-Archive: <https://sourceware.org/pipermail/gdb-patches/> List-Post: <mailto:gdb-patches@sourceware.org> List-Help: <mailto:gdb-patches-request@sourceware.org?subject=help> List-Subscribe: <https://sourceware.org/mailman/listinfo/gdb-patches>, <mailto:gdb-patches-request@sourceware.org?subject=subscribe> Errors-To: gdb-patches-bounces+patchwork=sourceware.org@sourceware.org |
Series |
add annotation in 'info locals' command for variables shadowing case
|
|
Message
Abdul Basit Ijaz
Nov. 21, 2023, 9:55 a.m. UTC
From: "Ijaz, Abdul B" <abdul.b.ijaz@intel.com>
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.
V4 series:
https://sourceware.org/pipermail/gdb-patches/2023-September/202637.html
V3 series:
https://sourceware.org/pipermail/gdb-patches/2023-September/202574.html
V2 series:
https://sourceware.org/pipermail/gdb-patches/2021-December/184675.html
Feedback for V2 series:
https://sourceware.org/pipermail/gdb-patches/2022-January/184822.html
https://sourceware.org/pipermail/gdb-patches/2022-January/184819.html
V1 series:
https://sourceware.org/pipermail/gdb-patches/2021-July/181174.html
Patch#1 updates "info locals" command and Path #2 is for the mi commands
'-stack-list-locals' and '-stack-list-variables'.
Changes since V3:
* Rebase the patch series to latest master for verifying failure
reported by Larsen in newly added RUSTC test.
* Added XFAIL for newly added RUSTC test as it fails on OS having
RUSTC version >= 1.73 e.g. Fedora 37. Breakpoints are not hitting
as expected so could be code is optimizing out but created a GDB bugzilla
(https://sourceware.org/pipermail/gdb-patches/2023-September/202637.html)
for the issue.
GDB Testsuite is executed on Ubuntu22 and have not seen any regression
while affected test was executed on Fedora 37 to confirm the XFAIL is
handled properly.
Thanks & Best Regards,
Abdul Basit
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/doc/gdb.texinfo | 26 ++++
gdb/mi/mi-cmd-stack.c | 66 +++++++-
gdb/printcmd.c | 11 +-
gdb/stack.c | 64 +++++++-
gdb/stack.h | 3 +-
gdb/testsuite/gdb.ada/var_shadowing.exp | 38 +++++
.../gdb.ada/var_shadowing/var_shadowing.adb | 30 ++++
gdb/testsuite/gdb.base/var-shadowing.c | 49 ++++++
gdb/testsuite/gdb.base/var-shadowing.exp | 90 +++++++++++
gdb/testsuite/gdb.base/var-shadowing2.c | 16 ++
gdb/testsuite/gdb.mi/mi-var-shadowing.c | 48 ++++++
gdb/testsuite/gdb.mi/mi-var-shadowing.exp | 141 ++++++++++++++++++
gdb/testsuite/gdb.rust/var_reuse.exp | 34 +++++
gdb/testsuite/gdb.rust/var_reuse.rs | 20 +++
gdb/tracepoint.c | 3 +-
gdb/value.h | 4 +-
16 files changed, 628 insertions(+), 15 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