On 12/12/19 11:52 AM, Alex Bennée wrote: > > Damien Hedde <damien.he...@greensocs.com> writes: > >> On 12/11/19 7:59 PM, Alex Bennée wrote: >>> >>> Damien Hedde <damien.he...@greensocs.com> 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 <alex.ben...@linaro.org> >
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