Message ID | 20241009084207.1286-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 8DD7338650E4 for <patchwork@sourceware.org>; Wed, 9 Oct 2024 08:43:31 +0000 (GMT) X-Original-To: gdb-patches@sourceware.org Delivered-To: gdb-patches@sourceware.org Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by sourceware.org (Postfix) with ESMTPS id AB287385020F for <gdb-patches@sourceware.org>; Wed, 9 Oct 2024 08:42:58 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org AB287385020F 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 AB287385020F Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=192.198.163.7 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728463380; cv=none; b=BnZdkucb1m5tBkNvtYOwMF52+lOItzFfCAQQlZjPm+EkWwTdehLaGg/j7K5aQo2m4SV+vA89WzKKXuyKtSirUDa8ixsT8T9PvfB6lwFQvnOms00PrOHHeXUXRNKewsifMe8+YNrNv57GMDZ5BhZ7npPmO0QN6ygMqpAGjI259Bk= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1728463380; c=relaxed/simple; bh=ywZjzK5TyLlrtMtrU0H4cwfrUIb0A4rpL9gu+45sKy4=; h=DKIM-Signature:From:To:Subject:Date:Message-Id:MIME-Version; b=gcbRUSrnt9AeFMkLPddb18QjSnBoWRADAoXtrVeHXY1EI4E5YRy0FobQ1dBlzGhjXHwGhd6apOue//zRc6iGQvkT33NiwSlbOgKBH1746KY2TZlq3JF2HVFAtIM3Ko6wu2ALcNzG0SIRUpEby4wseDFELe1sp9bU9eNhokFPMMM= 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=1728463378; x=1759999378; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=ywZjzK5TyLlrtMtrU0H4cwfrUIb0A4rpL9gu+45sKy4=; b=BhIHEuw7WiBBQ8vHgpWdmZCoZlfEaOJV6bm8Y3wwr0EYGNYV46AMb09K JTcB9dHw6AS1xJtiihCKQxFtp7he1qVU5FhWo6osY1bAmgEvjJZlyi7TZ DfbxGBB1lu1dPAi8m+3btZeHJoIFMXjvzvSA8aTA962v3zNXBrxaBwGx5 HnIYEoioUImfGt7RzyObF+tDoMZr9+5WYb9NfcBNmmGmV6O/Rw4yTWfdv YpsW9847VqrZqb6xiSe3UcUkt2BeAZC+wotE/2zOwpi8kS7F7jxjXtLTZ 3uLDebtG8ebi7zL0xuDEypToSq9WnUw6d/vwqTVDYzEQfKxsP1EYow7Oo w==; X-CSE-ConnectionGUID: PfDXcmVOQTeQ6HqRXbhL7A== X-CSE-MsgGUID: TFqVVS9SS+Sg7dG+cSbWyw== X-IronPort-AV: E=McAfee;i="6700,10204,11219"; a="53152232" X-IronPort-AV: E=Sophos;i="6.11,189,1725346800"; d="scan'208";a="53152232" Received: from orviesa005.jf.intel.com ([10.64.159.145]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2024 01:42:57 -0700 X-CSE-ConnectionGUID: 3urWM8hbRp+2b7OzHpFnhw== X-CSE-MsgGUID: h+rU0FPxS3WnBRiXyBtacA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,189,1725346800"; d="scan'208";a="80978639" Received: from abijaz-mobl2.ger.corp.intel.com (HELO localhost) ([10.245.148.90]) by orviesa005-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Oct 2024 01:42:54 -0700 From: Abdul Basit Ijaz <abdul.b.ijaz@intel.com> To: gdb-patches@sourceware.org Cc: pedro@palves.net, philippe.waroquiers@skynet.be, aburgess@redhat.com, tankut.baris.aktemur@intel.com, christina.schimpe@intel.com, lsix@lancelotsix.com, eliz@gnu.org, abdul.b.ijaz@intel.com Subject: [PATCH v7 0/2] add annotation in 'info locals' command for variables shadowing case Date: Wed, 9 Oct 2024 10:42:05 +0200 Message-Id: <20241009084207.1286-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.8 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 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
Oct. 9, 2024, 8:42 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.
Patch#1 updates "info locals" command and Path #2 is for the mi commands
'-stack-list-locals' and '-stack-list-variables'.
Last V6 Series:
https://sourceware.org/pipermail/gdb-patches/2023-December/205513.html
Documentation in V6 Series was already approved by Eli:
https://sourceware.org/pipermail/gdb-patches/2023-November/204421.html
https://sourceware.org/pipermail/gdb-patches/2023-November/204422.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 V6:
* This V7 series fixes the following feedback from Baris on V6:
https://sourceware.org/pipermail/gdb-patches/2024-September/211862.html
https://sourceware.org/pipermail/gdb-patches/2024-September/211864.html
* @Eli - Since the last approval in documentation Patch V6 only an example
is updated in both patches as per the latest feedback.
* Update regex for the gdb.opt/inline-locals.exp test. Because for the
KFAIL scenario which trigger only on SLES15, shadowed variables are
handled and also mentioned in the commit message of patch#1.
Testing is done for unix/m32/native-gdbserver configurations and no
issue is seen.
Thanks & Best Rergards
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 | 31 ++++
gdb/mi/mi-cmd-stack.c | 63 +++++++-
gdb/printcmd.c | 13 +-
gdb/stack.c | 64 +++++++-
gdb/stack.h | 3 +-
gdb/testsuite/gdb.ada/var_shadowing.exp | 39 +++++
.../gdb.ada/var_shadowing/var_shadowing.adb | 30 ++++
gdb/testsuite/gdb.base/var-shadowing.c | 49 ++++++
gdb/testsuite/gdb.base/var-shadowing.exp | 92 ++++++++++++
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.opt/inline-locals.exp | 21 ++-
gdb/testsuite/gdb.rust/var_reuse.exp | 34 +++++
gdb/testsuite/gdb.rust/var_reuse.rs | 20 +++
gdb/tracepoint.c | 3 +-
gdb/value.h | 4 +-
17 files changed, 648 insertions(+), 23 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