================ @@ -5857,6 +5838,50 @@ bool ObjectFileMachO::GetCorefileThreadExtraInfos( return false; } +StructuredData::ObjectSP ObjectFileMachO::GetCorefileProcessMetadata() { + ModuleSP module_sp(GetModule()); + if (!module_sp) + return {}; + + Log *log(GetLog(LLDBLog::Object | LLDBLog::Process | LLDBLog::Thread)); + std::lock_guard<std::recursive_mutex> guard(module_sp->GetMutex()); + auto lc_notes = FindLC_NOTEByName("process metadata"); + if (lc_notes.size() == 0) + return {}; + + if (lc_notes.size() > 1) + LLDB_LOGF( + log, + "Multiple 'process metadata' LC_NOTEs found, only using the first."); + + offset_t payload_offset = std::get<0>(lc_notes[0]); + offset_t strsize = std::get<1>(lc_notes[0]); ---------------- JDevlieghere wrote:
FWIW, with structured bindings in C++17 you can now write this like: ```suggestion auto [payload_offset, strsize] = lc_notes[0]; ``` https://github.com/llvm/llvm-project/pull/144627 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits