This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 08/10] Handle "show remote memory-write-packet-size" when not connected


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]