From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by sourceware.org (Postfix) with ESMTPS id BCAF8399E022 for ; Wed, 28 Jul 2021 17:44:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org BCAF8399E022 X-IronPort-AV: E=McAfee;i="6200,9189,10059"; a="199896560" X-IronPort-AV: E=Sophos;i="5.84,276,1620716400"; d="scan'208";a="199896560" Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jul 2021 10:44:36 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.84,276,1620716400"; d="scan'208";a="517725378" Received: from irvmail001.ir.intel.com ([10.43.11.63]) by fmsmga002.fm.intel.com with ESMTP; 28 Jul 2021 10:44:34 -0700 Received: from labpc2030.iul.intel.com (labpc2030.iul.intel.com [172.28.48.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with SMTP id 16SHiWgN014166; Wed, 28 Jul 2021 18:44:33 +0100 Received: by labpc2030.iul.intel.com (sSMTP sendmail emulation); Wed, 28 Jul 2021 19:44:32 +0200 From: "abdul.b.ijaz" To: gdb-patches@sourceware.org Cc: abdul.b.ijaz@intel.com, jonah@kichwacoders.com, Tankut.Baris.Aktemur@intel.com Subject: [PATCH 0/2] add annotation in 'info locals' command for variables shadowing case Date: Wed, 28 Jul 2021 19:43:06 +0200 Message-Id: <20210728174308.22357-1-abdul.b.ijaz@intel.com> X-Mailer: git-send-email 2.31.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, KAM_LAZY_DOMAIN_SECURITY, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jul 2021 17:44:39 -0000 Hi All, For variable shadowing case these patches add annotation "shadowed" to the shadowed variables so that it is easier for end user to identify which variable was shadowed. @jonah can you please provide your feedback for this change since second patch will change the response of '-stack-list-locals' and '-stack-list-variables' command. GDB Testsuite is executed on Ubuntu18.04 OS and there is no regression seen with this change. Best Regards, Abdul Basit Abdul Basit Ijaz (2): gdb: add annotation in 'info locals' command for variables shadowing case gdb: add shadowed field in '-stack-list-locals/variables' mi commands gdb/mi/mi-cmd-stack.c | 33 ++++- gdb/printcmd.c | 8 +- gdb/stack.c | 40 +++++- gdb/stack.h | 3 +- gdb/testsuite/gdb.base/var-shadowing.c | 52 +++++++ gdb/testsuite/gdb.base/var-shadowing.exp | 79 +++++++++++ gdb/testsuite/gdb.mi/mi-var-shadowing.c | 48 +++++++ gdb/testsuite/gdb.mi/mi-var-shadowing.exp | 132 ++++++++++++++++++ .../gdb.mi/mi2-amd64-entry-value.exp | 18 +-- gdb/testsuite/gdb.opt/inline-locals.exp | 6 +- gdb/testsuite/gdb.rust/var_reuse.exp | 33 +++++ gdb/testsuite/gdb.rust/var_reuse.rs | 20 +++ gdb/testsuite/gdb.trace/entry-values.exp | 2 +- gdb/tracepoint.c | 3 +- gdb/value.h | 3 +- 15 files changed, 454 insertions(+), 26 deletions(-) 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.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.31.1