summaryrefslogtreecommitdiffstats
path: root/lldb/source
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2020-01-03 14:17:25 -0800
committerJonas Devlieghere <jonas@devlieghere.com>2020-01-03 14:23:42 -0800
commitd2b19d455de22fe3c8aa192320e1ff9a4eb1a365 (patch)
treeda9baae170d818bca1d3b3f6055c4af11ec17b2c /lldb/source
parent320b43c39f0eb636c84815ce463893b21befdc8f (diff)
downloadbcm5719-llvm-d2b19d455de22fe3c8aa192320e1ff9a4eb1a365.tar.gz
bcm5719-llvm-d2b19d455de22fe3c8aa192320e1ff9a4eb1a365.zip
[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.
Diffstat (limited to 'lldb/source')
-rw-r--r--lldb/source/Utility/GDBRemote.cpp3
1 files changed, 0 insertions, 3 deletions
diff --git a/lldb/source/Utility/GDBRemote.cpp b/lldb/source/Utility/GDBRemote.cpp
index 54f3a3cd8a8..f267d00fc97 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 {};
}
OpenPOWER on IntegriCloud