diff options
author | Michał Górny <mgorny@gentoo.org> | 2022-10-01 18:59:28 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2022-10-03 18:42:49 +0200 |
commit | b6c24c161900a035f5ea7193f4816b6d192d6ac8 (patch) | |
tree | 0a6d57d2e3fc74f949f471e228dec2abb61a4e60 /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | |
parent | 9181673bef5e1b27c8b53c950c4fcd6196f4076a (diff) | |
download | llvm-b6c24c161900a035f5ea7193f4816b6d192d6ac8.zip llvm-b6c24c161900a035f5ea7193f4816b6d192d6ac8.tar.gz llvm-b6c24c161900a035f5ea7193f4816b6d192d6ac8.tar.bz2 |
[lldb] [gdb-remote] Move ReadPacketWithOutputSupport() to client
Move ReadPacketWithOutputSupport() from GDBRemoteCommunication
to GDBRemoteClientBase. This function is client-specific and moving
it there simplifies followup patches that split communication into
separate thread.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.llvm.org/D135028
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp')
-rw-r--r-- | lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp | 17 |
1 files changed, 0 insertions, 17 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp index b67cd7e..7daf003 100644 --- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp +++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp @@ -221,23 +221,6 @@ GDBRemoteCommunication::PacketResult GDBRemoteCommunication::GetAck() { } GDBRemoteCommunication::PacketResult -GDBRemoteCommunication::ReadPacketWithOutputSupport( - StringExtractorGDBRemote &response, Timeout<std::micro> timeout, - bool sync_on_timeout, - llvm::function_ref<void(llvm::StringRef)> output_callback) { - auto result = ReadPacket(response, timeout, sync_on_timeout); - while (result == PacketResult::Success && response.IsNormalResponse() && - response.PeekChar() == 'O') { - response.GetChar(); - std::string output; - if (response.GetHexByteString(output)) - output_callback(output); - result = ReadPacket(response, timeout, sync_on_timeout); - } - return result; -} - -GDBRemoteCommunication::PacketResult GDBRemoteCommunication::ReadPacket(StringExtractorGDBRemote &response, Timeout<std::micro> timeout, bool sync_on_timeout) { |