DavidSpickett wrote: Please cite https://sourceware.org/gdb/current/onlinedocs/gdb.html/Notification-Packets.html in the PR description. Specifically this bit: > 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.**
So I think this PR is probably justified because: * `%something` will remove the `%` and never hit the `case '%':`. * `%%something` would be an invalid notification because the data includes `%`. Even if we didn't catch that, the second `%` is actually part of the data so we'd see the data as `something` instead of `%something`. * `$%something` is not a notification but instead a normal packet containing a `%` for some reason, so we'd get that wrong. I am rather busy at the moment so hopefully @jasonmolenda can fact check me and be the approver if they don't have any objections. On the general topic of notification handling. If you're going to fix it, consider first sending a PR with test cases that you know fail (so it "passes" for current lldb behaviour). Then your later fixes will be much easier to review as the test diff will be much smaller. There's a rule for this somewhere in llvm's docs, it's often done for codegen failures. https://github.com/llvm/llvm-project/pull/203204 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
