From: Eli Zaretskii <eliz@gnu.org>
To: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
Cc: gdb-patches@sourceware.org, 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
Subject: Re: [PATCH v6 2/2] gdb: add shadowed field in '-stack-list-locals/variables' mi commands
Date: Wed, 22 Nov 2023 16:38:12 +0200 [thread overview]
Message-ID: <83leaphmzv.fsf@gnu.org> (raw)
In-Reply-To: <20231122081301.5997-3-abdul.b.ijaz@intel.com> (message from Abdul Basit Ijaz on Wed, 22 Nov 2023 09:13:01 +0100)
> From: Abdul Basit Ijaz <abdul.b.ijaz@intel.com>
> 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,
> eliz@gnu.org,
> "Ijaz, Abdul B" <abdul.b.ijaz@intel.com>
> Date: Wed, 22 Nov 2023 09:13:01 +0100
>
> diff --git a/gdb/doc/gdb.texinfo b/gdb/doc/gdb.texinfo
> index 6efcc5a8dc9..348844bbb8d 100644
> --- a/gdb/doc/gdb.texinfo
> +++ b/gdb/doc/gdb.texinfo
> @@ -34772,6 +34772,20 @@ If the @code{--skip-unavailable} option is specified, local variables
> and arguments that are not available are not listed. Partially
> available arguments and local variables are still displayed, however.
>
> +@smallexample
> +1: int x = 3;
> +2: @{
> +3: int x = 4; // breakpt
> +4: @}
> +(gdb) -stack-list-variables 2
> +^done,variables=[@{name="x",type="int",value="4",file="name.c",line="3"@},@{name="x",type="int",value="3",file="name.c",line="1",shadowed="true"@}]
> +@end smallexample
> +
> +A variable is shadowed when there's another variable by the same
> +name which is declared within an inner scope (decision block,
> +method, or inner class). For such cases, its location for the
> +outermost scope is followed by @samp{shadowed} attribute.
> +
> @subsubheading Example
>
> @smallexample
This part of the patch is okay, thanks.
Reviewed-By: Eli Zaretskii <eliz@gnu.org>
next prev parent reply other threads:[~2023-11-22 14:38 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 8:12 [PATCH v6 0/2] add annotation in 'info locals' command for variables shadowing case Abdul Basit Ijaz
2023-11-22 8:13 ` [PATCH v6 1/2] gdb: " Abdul Basit Ijaz
2023-11-22 14:37 ` Eli Zaretskii
2024-01-16 15:40 ` Guinevere Larsen
2023-11-22 8:13 ` [PATCH v6 2/2] gdb: add shadowed field in '-stack-list-locals/variables' mi commands Abdul Basit Ijaz
2023-11-22 14:38 ` Eli Zaretskii [this message]
2024-01-16 15:41 ` Guinevere Larsen
2023-12-28 11:28 ` [PING][PATCH v6 0/2] add annotation in 'info locals' command for variables shadowing case Ijaz, Abdul B
2024-01-15 12:29 ` [PING 2][PATCH " Ijaz, Abdul B
2024-03-04 18:10 ` [PING 3][PATCH " Ijaz, Abdul B
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83leaphmzv.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=abdul.b.ijaz@intel.com \
--cc=aburgess@redhat.com \
--cc=blarsen@redhat.com \
--cc=christina.schimpe@intel.com \
--cc=gdb-patches@sourceware.org \
--cc=lsix@lancelotsix.com \
--cc=pedro@palves.net \
--cc=philippe.waroquiers@skynet.be \
--cc=tankut.baris.aktemur@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).