Differential D33595 Diff 100405 source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Changeset View
Changeset View
Standalone View
Standalone View
source/Plugins/Process/gdb-remote/GDBRemoteCommunicationServerLLGS.cpp
Show First 20 Lines • Show All 1,274 Lines • ▼ Show 20 Lines | GDBRemoteCommunicationServerLLGS::Handle_jTraceRead( | ||||
else if (packet.ConsumeFront("jTraceMetaRead:")) | else if (packet.ConsumeFront("jTraceMetaRead:")) | ||||
tracetype = MetaData; | tracetype = MetaData; | ||||
else { | else { | ||||
return SendIllFormedResponse(packet, "jTrace: Ill formed packet "); | return SendIllFormedResponse(packet, "jTrace: Ill formed packet "); | ||||
} | } | ||||
lldb::user_id_t uid = LLDB_INVALID_UID; | lldb::user_id_t uid = LLDB_INVALID_UID; | ||||
size_t byte_count = std::numeric_limits<size_t>::max(); | uint64_t byte_count = std::numeric_limits<uint64_t>::max(); | ||||
lldb::tid_t tid = LLDB_INVALID_THREAD_ID; | lldb::tid_t tid = LLDB_INVALID_THREAD_ID; | ||||
size_t offset = std::numeric_limits<size_t>::max(); | uint64_t offset = std::numeric_limits<uint64_t>::max(); | ||||
auto json_object = StructuredData::ParseJSON(packet.Peek()); | auto json_object = StructuredData::ParseJSON(packet.Peek()); | ||||
if (!json_object || | if (!json_object || | ||||
json_object->GetType() != StructuredData::Type::eTypeDictionary) | json_object->GetType() != StructuredData::Type::eTypeDictionary) | ||||
return SendIllFormedResponse(packet, "jTrace: Ill formed packet "); | return SendIllFormedResponse(packet, "jTrace: Ill formed packet "); | ||||
auto json_dict = json_object->GetAsDictionary(); | auto json_dict = json_object->GetAsDictionary(); | ||||
Show All 17 Lines | GDBRemoteCommunicationServerLLGS::Handle_jTraceRead( | ||||
if (tracetype == BufferData) | if (tracetype == BufferData) | ||||
error = m_debugged_process_sp->GetData(uid, tid, buf, offset); | error = m_debugged_process_sp->GetData(uid, tid, buf, offset); | ||||
else if (tracetype == MetaData) | else if (tracetype == MetaData) | ||||
error = m_debugged_process_sp->GetMetaData(uid, tid, buf, offset); | error = m_debugged_process_sp->GetMetaData(uid, tid, buf, offset); | ||||
if (error.Fail()) | if (error.Fail()) | ||||
return SendErrorResponse(error.GetError()); | return SendErrorResponse(error.GetError()); | ||||
for (size_t i = 0; i < buf.size(); ++i) | for (uint64_t i = 0; i < buf.size(); ++i) | ||||
response.PutHex8(buf[i]); | response.PutHex8(buf[i]); | ||||
StreamGDBRemote escaped_response; | StreamGDBRemote escaped_response; | ||||
escaped_response.PutEscapedBytes(response.GetData(), response.GetSize()); | escaped_response.PutEscapedBytes(response.GetData(), response.GetSize()); | ||||
return SendPacketNoLock(escaped_response.GetString()); | return SendPacketNoLock(escaped_response.GetString()); | ||||
} | } | ||||
GDBRemoteCommunication::PacketResult | GDBRemoteCommunication::PacketResult | ||||
▲ Show 20 Lines • Show All 2,142 Lines • Show Last 20 Lines |