Mirror of the gdb mailing list
 help / color / mirror / Atom feed
* Redundancy in remote.c packet config messages?
@ 2005-04-06 21:24 Kevin Buettner
  2005-04-06 21:28 ` Daniel Jacobowitz
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Buettner @ 2005-04-06 21:24 UTC (permalink / raw)
  To: gdb

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


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

end of thread, other threads:[~2005-04-06 21:28 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-06 21:24 Redundancy in remote.c packet config messages? Kevin Buettner
2005-04-06 21:28 ` Daniel Jacobowitz

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