From: Kevin Buettner <kevinb@redhat.com>
To: gdb@sources.redhat.com
Subject: Redundancy in remote.c packet config messages?
Date: Wed, 06 Apr 2005 21:24:00 -0000 [thread overview]
Message-ID: <20050406142359.0c61c694@ironwood.lan> (raw)
While working on a recently posted patch to eliminate
deprecated_show_value_hack() from remote.c, I began to wonder if
there's some redundancy in the messages showing the state of the
machinery used for enabling and disabling the various remote protocol
packets.
Consider "show remote p-packet":
(gdb) show remote p-packet
Current use of remote protocol `p' (fetch-register) is auto.
Support for remote protocol `p' (fetch-register) packet is auto-detected,
currently unknown.
The first line (beginning with "Current") says that the value of the
p-packet "auto boolean" variable is auto. The second and (subsequent)
line says the same thing as well as providing the detection status.
If you examine the code involved, the "auto" in the first line and the
"auto-detected" in the second line were both determined by examining
the same variable. (Though you do have to wade through a bit of code
to figure this out.)
If I'm not mistaken, we have a similar situation when the packet has
been enabled and disabled by the user:
(gdb) set remote p-packet on
(gdb) show remote p-packet
Current use of remote protocol `p' (fetch-register) is on.
Support for remote protocol `p' (fetch-register) packet is currently
enabled.
(gdb) set remote p-packet off
(gdb) show remote p-packet
Current use of remote protocol `p' (fetch-register) is off.
Support for remote protocol `p' (fetch-register) packet is currently
disabled.
Does anyone know of a case where the first line provides non-redundant
information? If not, I'd like to prepare a patch which eliminates it.
That is, I would like the above session to instead show the following
output:
(gdb) show remote p-packet
Support for remote protocol `p' (fetch-register) packet is auto-detected,
currently unknown.
(gdb) set remote p-packet on
(gdb) show remote p-packet
Support for remote protocol `p' (fetch-register) packet is currently
enabled.
(gdb) set remote p-packet off
(gdb) show remote p-packet
Support for remote protocol `p' (fetch-register) packet is currently
disabled.
Kevin
next reply other threads:[~2005-04-06 21:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-06 21:24 Kevin Buettner [this message]
2005-04-06 21:28 ` 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=20050406142359.0c61c694@ironwood.lan \
--to=kevinb@redhat.com \
--cc=gdb@sources.redhat.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