Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH 0/1] gdb: add 'set print shadowed' to hide shadowed variables
@ 2026-08-11 20:27 Stephan Rohr
  2026-08-11 20:27 ` [PATCH 1/1] gdb: Introduce new setting to filter out " Stephan Rohr
  0 siblings, 1 reply; 3+ messages in thread
From: Stephan Rohr @ 2026-08-11 20:27 UTC (permalink / raw)
  To: gdb-patches

From: "Rohr, Stephan" <stephan.rohr@intel.com>

Hello all,

this patch adds a new setting 'set print shadowed on|off' to control
whether shadowed variables are printed by 'info locals'.  The default
is 'on', matching current behaviour.

The patch was originally written by Eduard Sargsyan; I rebased to the
current master.

It is a follow-up to the original RFC:
https://sourceware.org/pipermail/gdb-patches/2023-November/203961.html
and Kevin's response:
https://sourceware.org/pipermail/gdb-patches/2023-November/203973.html

It depends on Abdul's preliminary series, which was merged recently:
https://sourceware.org/pipermail/gdb-patches/2026-July/228668.html

Regression tested on x86_64 Ubuntu 22 with the native, native gdbserver
and extended gdbserver targets; no regressions.

I appreciate your feedback.

Thanks
Stephan

Sargsyan, Eduard (1):
  gdb: Introduce new setting to filter out shadowed variables.

 gdb/NEWS                                 |  8 ++++++++
 gdb/doc/gdb.texinfo                      | 15 +++++++++++++-
 gdb/printcmd.c                           |  8 +++++++-
 gdb/stack.c                              | 25 +++++++++++++++++++++++-
 gdb/testsuite/gdb.ada/var_shadowing.exp  |  1 +
 gdb/testsuite/gdb.base/options.exp       |  1 +
 gdb/testsuite/gdb.base/var-shadowing.exp | 15 ++++++++++++++
 gdb/valprint.c                           | 20 +++++++++++++++++++
 gdb/valprint.h                           |  3 +++
 9 files changed, 93 insertions(+), 3 deletions(-)

-- 
2.43.0

________________________________________
Intel Deutschland GmbH 

Registered Address: Dornacher Strasse 1, 85622 Feldkirchen, Germany 

Tel: +49 (89) 99143-0 

www.intel.de 

Managing Directors: Candice Moore, Jeffrey Schneiderman, Ramachandran Sitaraman

Chairperson of the Supervisory Board: Sonja Pierer

Registered Seat: Munich Commercial Register B: Amtsgericht Munich HRB 186928

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.


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

end of thread, other threads:[~2026-08-13  4:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-08-11 20:27 [PATCH 0/1] gdb: add 'set print shadowed' to hide shadowed variables Stephan Rohr
2026-08-11 20:27 ` [PATCH 1/1] gdb: Introduce new setting to filter out " Stephan Rohr
2026-08-13  4:24   ` Simon Marchi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox