diff options
Diffstat (limited to 'lldb/unittests/tools/lldb-server/tests/TestClient.cpp')
-rw-r--r-- | lldb/unittests/tools/lldb-server/tests/TestClient.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp index 019e619e8a4..b10cf498496 100644 --- a/lldb/unittests/tools/lldb-server/tests/TestClient.cpp +++ b/lldb/unittests/tools/lldb-server/tests/TestClient.cpp @@ -235,23 +235,20 @@ Error TestClient::queryProcess() { Error TestClient::Continue(StringRef message) { assert(m_process_info.hasValue()); - std::string response; - if (Error E = SendMessage(message, response)) - return E; - auto creation = StopReply::create(response, m_process_info->GetEndian(), - m_register_infos); - if (Error E = creation.takeError()) - return E; + auto StopReplyOr = SendMessage<StopReply>( + message, m_process_info->GetEndian(), m_register_infos); + if (!StopReplyOr) + return StopReplyOr.takeError(); - m_stop_reply = std::move(*creation); + m_stop_reply = std::move(*StopReplyOr); if (!isa<StopReplyStop>(m_stop_reply)) { StringExtractorGDBRemote R; PacketResult result = ReadPacket(R, GetPacketTimeout(), false); if (result != PacketResult::ErrorDisconnected) { return make_error<StringError>( - formatv("Expected connection close after receiving {0}. Got {1}/{2} " + formatv("Expected connection close after sending {0}. Got {1}/{2} " "instead.", - response, result, R.GetStringRef()) + message, result, R.GetStringRef()) .str(), inconvertibleErrorCode()); } |