summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
diff options
context:
space:
mode:
authorJonas Devlieghere <jonas@devlieghere.com>2019-10-03 20:10:56 +0000
committerJonas Devlieghere <jonas@devlieghere.com>2019-10-03 20:10:56 +0000
commit5f775d2912d4092d89742402315e6543966c8dce (patch)
tree3277638c5930b5dd0d0f1a814dc19be980b3103d /lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
parentede784ff5a600c5ee99270987d55abcc1e806891 (diff)
downloadbcm5719-llvm-5f775d2912d4092d89742402315e6543966c8dce.tar.gz
bcm5719-llvm-5f775d2912d4092d89742402315e6543966c8dce.zip
[JSON] Don't wrap json::Array in a value (NFC)
There's no need to wrap the just-constructed json::Array in a json::Value, we can just return that and pass ownership to the raw_ostream. llvm-svn: 373656
Diffstat (limited to 'lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp')
-rw-r--r--lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
index 36fb1781364..ad1a39b5796 100644
--- a/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
+++ b/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
@@ -493,7 +493,7 @@ static const char *GetStopReasonString(StopReason stop_reason) {
return nullptr;
}
-static llvm::Expected<json::Value>
+static llvm::Expected<json::Array>
GetJSONThreadsInfo(NativeProcessProtocol &process, bool abridged) {
Log *log(GetLogIfAnyCategoriesSet(LIBLLDB_LOG_PROCESS | LIBLLDB_LOG_THREAD));
@@ -660,12 +660,12 @@ GDBRemoteCommunicationServerLLGS::SendStopReplyPacketForThread(
// thread otherwise this packet has all the info it needs.
if (thread_index > 1) {
const bool threads_with_valid_stop_info_only = true;
- llvm::Expected<json::Value> threads_info = GetJSONThreadsInfo(
+ llvm::Expected<json::Array> threads_info = GetJSONThreadsInfo(
*m_debugged_process_up, threads_with_valid_stop_info_only);
if (threads_info) {
response.PutCString("jstopinfo:");
StreamString unescaped_response;
- unescaped_response.AsRawOstream() << *threads_info;
+ unescaped_response.AsRawOstream() << std::move(*threads_info);
response.PutStringAsRawHex8(unescaped_response.GetData());
response.PutChar(';');
} else {
OpenPOWER on IntegriCloud