DavidSpickett wrote:

> This changes WaitForPacketNoLock so that it ignores all notifications (I'm 
> not sure about corrupted ones).

>From the spec:
> A notification packet has the form ‘% data # checksum’, where data is the 
> content of the notification, and checksum is a checksum of data, computed and 
> formatted as for ordinary GDB packets. A notification’s data never contains 
> ‘$’, ‘%’ or ‘#’ characters. Upon receiving a notification, the recipient 
> sends no ‘+’ or ‘-’ to acknowledge the notification’s receipt or to report 
> its corruption.

So if it has the `%` prefix then we'd ignore it. Even if the rest of it was 
incorrect, like if it has a `%` in the data. If it doesn't start with `%` or 
`$` then we're going to call it an invalid packet.

Which means we're compliant with the spec.

Only if we added support for some notification format would we have to care 
about corruption within the notification data.

https://github.com/llvm/llvm-project/pull/204788
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to