[Lldb-commits] [lldb] d2b19d4 - [lldb/Utility] YAML validation should be orthogonal to packet semantics.
Jonas Devlieghere via lldb-commits
lldb-commits at lists.llvm.org
Fri Jan 3 14:25:33 PST 2020
Author: Jonas Devlieghere
Date: 2020-01-03T14:23:42-08:00
New Revision: d2b19d455de22fe3c8aa192320e1ff9a4eb1a365
URL: https://github.com/llvm/llvm-project/commit/d2b19d455de22fe3c8aa192320e1ff9a4eb1a365
DIFF: https://github.com/llvm/llvm-project/commit/d2b19d455de22fe3c8aa192320e1ff9a4eb1a365.diff
LOG: [lldb/Utility] YAML validation should be orthogonal to packet semantics.
It's not up to YAML to validate the semantics of the GDB remote packet
struct. This is especially wrong here as there's nothing that says that
the amount of bytes transmitted matches the packet payload size.
Added:
Modified:
lldb/source/Utility/GDBRemote.cpp
Removed:
################################################################################
diff --git a/lldb/source/Utility/GDBRemote.cpp b/lldb/source/Utility/GDBRemote.cpp
index 54f3a3cd8a86..f267d00fc97e 100644
--- a/lldb/source/Utility/GDBRemote.cpp
+++ b/lldb/source/Utility/GDBRemote.cpp
@@ -93,9 +93,6 @@ void yaml::MappingTraits<GDBRemotePacket>::mapping(IO &io,
StringRef
yaml::MappingTraits<GDBRemotePacket>::validate(IO &io,
GDBRemotePacket &Packet) {
- if (Packet.bytes_transmitted != Packet.packet.data.size())
- return "BinaryData size doesn't match bytes transmitted";
-
return {};
}
More information about the lldb-commits
mailing list