From: Eli Zaretskii <eliz@gnu.org>
To: Daniel Jacobowitz <drow@false.org>
Cc: gdb-patches@sourceware.org
Subject: Re: RFC: Skip declarations in "info variables"
Date: Sat, 14 Nov 2009 09:36:00 -0000 [thread overview]
Message-ID: <833a4ho3ej.fsf@gnu.org> (raw)
In-Reply-To: <20091113214448.GA30270@caradoc.them.org>
> Date: Fri, 13 Nov 2009 16:44:48 -0500
> From: Daniel Jacobowitz <drow@false.org>
>
> The second problem is that integer is listed twice. Jan pointed me to
> GCC PR 37982; the file has a declaration and definition for the
> variable if it is referenced (only a definition, otherwise).
> I don't think we should display the declaration. So I've changed
> search_symbols not to display variables of class LOC_UNRESOLVED, and
> updated the documentation to match. While this is a change of
> behavior, I don't think it's problematic.
To decide whether or not this is a Good Thing, we need to answer a
question: What is the purpose of "info variables"? More specifically,
what are the main use-cases for using it? Can people please share
their experience with this command?
Without that, I'm not sure we are not removing a potentially useful
behavior.
Alternatively, we could add a new `info' command, or a variant of
"info variables", that would show the declared variables as well.
Then we don't need to worry about the possibility of removing useful
functionality.
> Index: src/gdb/doc/gdb.texinfo
> ===================================================================
> --- src.orig/gdb/doc/gdb.texinfo 2009-11-13 16:28:20.000000000 -0500
> +++ src/gdb/doc/gdb.texinfo 2009-11-13 16:28:43.000000000 -0500
> @@ -12920,7 +12920,7 @@ that conflict with the regular expressio
>
> @kindex info variables
> @item info variables
> -Print the names and data types of all variables that are declared
> +Print the names and data types of all variables that are defined
> outside of functions (i.e.@: excluding local variables).
>
> @item info variables @var{regexp}
This is an almost mechanical change, so okay. But I think we need a
NEWS entry about the behavior change.
next prev parent reply other threads:[~2009-11-14 9:36 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-13 21:44 Daniel Jacobowitz
2009-11-13 22:27 ` Joel Brobecker
2009-11-14 9:36 ` Eli Zaretskii [this message]
2009-11-14 15:54 ` Daniel Jacobowitz
2009-11-14 16:03 ` Paul Pluzhnikov
2009-12-28 21:05 ` Daniel Jacobowitz
2009-12-28 21:21 ` Eli Zaretskii
2009-12-28 21:31 ` Daniel Jacobowitz
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=833a4ho3ej.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=drow@false.org \
--cc=gdb-patches@sourceware.org \
/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