Fix output of MI `-thread-info` command
authorIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 6 Apr 2018 21:03:10 +0000 (00:03 +0300)
committerIgor Kulaychuk <i.kulaychuk@samsung.com>
Fri, 6 Apr 2018 22:39:44 +0000 (01:39 +0300)
src/debug/netcoredbg/miprotocol.cpp

index 2a654dd205e2fa9cee6937cd3b16c55fa42ee471..d47dc386cb5f3528f0208bde89ce7bc0e32c1ea9 100644 (file)
@@ -549,9 +549,9 @@ HRESULT MIProtocol::HandleCommand(std::string command,
         const char *sep = "";
         for (const Thread& thread : threads)
         {
-            ss << "{id=\"" << thread.id
-            << "\",name=\"" << MIProtocol::EscapeMIValue(thread.name) << "\",state=\""
-            << (thread.running ? "running" : "stopped") << "\"}" << sep;
+            ss << sep << "{id=\"" << thread.id
+               << "\",name=\"" << MIProtocol::EscapeMIValue(thread.name) << "\",state=\""
+               << (thread.running ? "running" : "stopped") << "\"}";
             sep = ",";
         }