================
@@ -383,37 +383,46 @@ ClassDescriptorV2::ivar_t::Read(Process *process,
lldb::addr_t addr) {
result.m_alignment = extractor.GetU32_unchecked(&cursor);
result.m_size = extractor.GetU32_unchecked(&cursor);
- process->ReadCStringFromMemory(result.m_name_ptr, result.m_name, error);
- if (error.Fail())
- return error.takeError();
+ llvm::SmallVector<std::optional<std::string>> strs =
+ process->ReadCStringsFromMemory({result.m_name_ptr, result.m_type_ptr});
- process->ReadCStringFromMemory(result.m_type_ptr, result.m_type, error);
- if (error.Fail())
- return error.takeError();
+ if (!strs[0])
+ return llvm::createStringErrorV(
+ "Failed to read ivar_t::m_name_str at address {0:x}",
----------------
JDevlieghere wrote:
```suggestion
"failed to read ivar_t::m_name_str at address {0:x}",
```
https://github.com/llvm/llvm-project/pull/201578
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits