This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Is "QTBuffer:size" a packet, or "QTBuffer:" plus an argument?
On 02/20/2012 02:53 PM, Pedro Alves wrote:
> On 02/17/2012 07:49 AM, Yao Qi wrote:
>> On 02/16/2012 01:22 AM, Pedro Alves wrote:
>>> One question this raises is, is the right response to
>>> QTBuffer:size:ffffffff, "E01", or an empty reply, indicating packet
>>> not supported? IOW, are QTBuffer:size and QTBuffer:circular two
>>> different packets, or a single QTBuffer: packet with different
>>> arguments? This makes a difference if GDB is to gracefully detect
>>> when the target side doesn't support QTBuffer:foo.
>>
>> IMO, "QTBuffer" is the packet, and "size" is an argument.
>
>> I hope the right response to QTBuffer:size:ffffffff is an empty reply, means
>> remote stubs don't support QTBuffer:size. Reply "E01" means remote stub
>> supports QTBuffer:size, but unable to meet this request, due to some
>> reasons, limited memory, for example.
>
> Thing is empty reply implies it's a different packet, so we can't
> have both. I also think the right answer is empty reply. I realized
> we also consider the qXfer:$obj:read different packets, so there's
> precedent for thinking of `:' as part of the packet. BTW, the packet
> is documented as:
>
> @item QTBuffer:circular:@var{value}
> This packet directs the target to use a circular trace buffer if
> @var{value} is 1, or a linear buffer if the value is 0.
>
> So I don't think anything needs to change there.
>
> So here's the patch I propose to check in.
>
> 2012-02-20 Pedro Alves <palves@redhat.com>
>
> * tracepoint.c (cmd_bigqtbuffer): Rename as ...
> (cmd_bigqtbuffer_circular): ... this. Only handle
> 'QTBuffer:circular:'.
> (handle_tracepoint_general_set): Adjust.
Checked in now.
--
Pedro Alves