public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2 0/2] add annotation in 'info locals' command for variables shadowing case
@ 2021-12-29 11:14 abdul.b.ijaz
  2021-12-29 11:14 ` [PATCH v2 1/2] gdb: " abdul.b.ijaz
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: abdul.b.ijaz @ 2021-12-29 11:14 UTC (permalink / raw)
  To: gdb-patches
  Cc: abdul.b.ijaz, jonah, Tankut.Baris.Aktemur, philippe.waroquiers,
	cristian.sandu

Hi All,

For variable shadowing case this V2 patches add annotation "shadowed" with location information  to the shadowed variables so that it is easier for end user to identify which variable was shadowed and also rebase patches to current master.

V1 of this series can be found at:
https://sourceware.org/pipermail/gdb-patches/2021-July/181174.html

Changes since V1:
* Update shadowed annonation to print location in "info locals" and mi commands "-stack-list-locals/variables" as per Philippe feedback.
* Update tests according to the above change.
* Rebase patches to current master.

@Philippe can you please review if new patch set fulfills the location information for shadowed variables.

@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. mi2-amd64-entry-value, inline-locals and entry-values tests were affected with this change so they were updated accordingly.

Best Regards,
Abdul Basit

Abdul Basit Ijaz (2):
  gdb: add annotation in 'info locals' command for variables shadowing
    case
  gdb: add shadowed_loc field in '-stack-list-locals/variables' mi
    commands

 gdb/doc/gdb.texinfo                           |  24 +++
 gdb/mi/mi-cmd-stack.c                         |  38 ++++-
 gdb/printcmd.c                                |  15 +-
 gdb/stack.c                                   |  41 +++++-
 gdb/stack.h                                   |   3 +-
 gdb/testsuite/gdb.base/var-shadowing.c        |  52 +++++++
 gdb/testsuite/gdb.base/var-shadowing.exp      |  85 +++++++++++
 gdb/testsuite/gdb.mi/mi-var-shadowing.c       |  48 ++++++
 gdb/testsuite/gdb.mi/mi-var-shadowing.exp     | 138 ++++++++++++++++++
 gdb/testsuite/gdb.mi/mi2-amd64-entry-value.c  |   6 +-
 .../gdb.mi/mi2-amd64-entry-value.exp          |  23 +--
 gdb/testsuite/gdb.opt/inline-locals.c         |   2 +-
 gdb/testsuite/gdb.opt/inline-locals.exp       |   8 +-
 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 +-
 18 files changed, 513 insertions(+), 31 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


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-01-11  8:55 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-29 11:14 [PATCH v2 0/2] add annotation in 'info locals' command for variables shadowing case abdul.b.ijaz
2021-12-29 11:14 ` [PATCH v2 1/2] gdb: " abdul.b.ijaz
2022-01-05 15:20   ` Andrew Burgess
2022-01-05 15:55     ` Pedro Alves
2022-01-05 16:26       ` Andrew Burgess
2022-01-11  8:55         ` Ijaz, Abdul B
2021-12-29 11:14 ` [PATCH v2 2/2] gdb: add shadowed_loc field in '-stack-list-locals/variables' mi commands abdul.b.ijaz
2022-01-01 20:14 ` [PATCH v2 0/2] add annotation in 'info locals' command for variables shadowing case Philippe Waroquiers

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).