This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 08/10] Handle "show remote memory-write-packet-size" when not connected
- From: Simon Marchi <simon dot marchi at ericsson dot com>
- To: Pedro Alves <palves at redhat dot com>, <gdb-patches at sourceware dot org>
- Date: Fri, 18 May 2018 17:26:19 -0400
- Subject: Re: [PATCH 08/10] Handle "show remote memory-write-packet-size" when not connected
- References: <20180516141830.16859-1-palves@redhat.com> <20180516141830.16859-9-palves@redhat.com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On 2018-05-16 10:18 AM, Pedro Alves wrote:
> Currently "show remote memory-write-packet-size" says that the packet
> size is limited to whatever is stored in the remote_state global, even
> if not connected to a target.
>
> When we get to support multiple instances of remote targets, there
> won't be a remote_state global anymore, so that must be replaced by
> something else.
>
> Since it doesn't make sense to print the limit of the packet size of a
> non-existing connection, this patch makes us say that the limit will
> be further reduced when we connect.
>
> The text is taken from the command's online help, which says:
>
> "The actual limit is further reduced dependent on the target."
The result sounds a bit weird:
(gdb) show remote memory-read-packet-size
The memory-read-packet-size is 0. The actual limit will be further reduced dependent on the target.
(gdb) show remote memory-write-packet-size
The memory-write-packet-size is 0. The actual limit will be further reduced dependent on the target.
How can the limit be reduced if it is zero? I don't really know about
this code, is zero a special value that means no limit? Perhaps it should be
handled differently to make the message clearer.
Simon