CMIUtilString CMICmnLLDBUtilSBValue::ReadCStringFromHostMemory(lldb::SBValue &vrValue, const MIuint vnMaxLen) const { std::string result; lldb::addr_t addr = vrValue.GetLoadAddress(), end_addr = addr + vnMaxLen * sizeof(charT); lldb::SBProcess process = CMICmnLLDBDebugSessionInfo::Instance().GetProcess(); lldb::SBError error; while (addr < end_addr) { charT ch; const MIuint64 nReadBytes = process.ReadMemory(addr, &ch, sizeof(ch), error); if (error.Fail() || nReadBytes != sizeof(ch)) return m_pUnkwn; else if (ch == 0) break; result.append(CMIUtilString::ConvertToPrintableASCII(ch)); addr += sizeof(ch); } return result.c_str(); }