[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 2/2] gdbstub: do not split gdb_monitor_write payload
From: |
Damien Hedde |
Subject: |
Re: [PATCH v2 2/2] gdbstub: do not split gdb_monitor_write payload |
Date: |
Fri, 13 Dec 2019 13:13:43 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.0 |
On 12/12/19 11:52 AM, Alex Bennée wrote:
>
> Damien Hedde <address@hidden> writes:
>
>> On 12/11/19 7:59 PM, Alex Bennée wrote:
>>>
>>> Damien Hedde <address@hidden> writes:
>>>
>>>> Since we can now send packets of arbitrary length:
>>>> simplify gdb_monitor_write() and send the whole payload
>>>> in one packet.
>>>
>>> Do we know gdb won't barf on us. Does the negotiated max packet size
>>> only apply to data sent to the gdbserver?
>>
>> Yes the negociated packet size is only about packet we can receive.
>> Qutoting the gdb doc:
>> | ‘PacketSize=bytes’
>> |
>> | The remote stub can accept packets up to at least bytes in length.
>> | GDB will send packets up to this size for bulk transfers, and will
>> | never send larger packets.
>>
>> The qSupported doc also says that "Any GDB which sends a ‘qSupported’
>> packet supports receiving packets of unlimited length".
>> I did some digging and qSupported appeared in gdb 6.6 (december 2006).
>> And gdb supported arbitrary sized packet even before that (6.4.9 2006
>> too).
>
> I think that is worth a comment for the function gdb_monitor_write
> quoting the spec and the versions. With that comment:
>
> Reviewed-by: Alex Bennée <address@hidden>
>
Good idea ! Is that ok if I add these comments in the 1st patch along
with the gdbstate.last_packet field ? it seems a more central place.
I can still add a short note for gdb_monitor_write().
Damien
[PATCH v2 1/2] gdbstub: change GDBState.last_packet to GByteArray, Damien Hedde, 2019/12/11