Skip to content

Commit 78ee72d

Browse files
authored
Merge pull request #7450 from jasonmolenda/r113037252-process-metadata-lcnote-01013
Add "process metadata" Mach-O LC_NOTE for corefiles
2 parents 02d3200 + a2df464 commit 78ee72d

File tree

7 files changed

+418
-294
lines changed

7 files changed

+418
-294
lines changed

lldb/include/lldb/Symbol/ObjectFile.h

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,6 +561,30 @@ class ObjectFile : public std::enable_shared_from_this<ObjectFile>,
561561
return false;
562562
}
563563

564+
/// Get metadata about threads from the corefile.
565+
///
566+
/// The corefile may have metadata (e.g. a Mach-O "thread extrainfo"
567+
/// LC_NOTE) which for the threads in the process; this method tries
568+
/// to retrieve them.
569+
///
570+
/// \param[out] tids
571+
/// Filled in with a vector of tid_t's that matches the number
572+
/// of threads in the corefile (ObjectFile::GetNumThreadContexts).
573+
/// If a tid is not specified for one of the corefile threads,
574+
/// that entry in the vector will have LLDB_INVALID_THREAD_ID and
575+
/// the caller should assign a tid to the thread that does not
576+
/// conflict with the ones provided in this array.
577+
/// As additional metadata are added, this method may return a
578+
/// \a tids vector with no thread id's specified at all; the
579+
/// corefile may only specify one of the other metadata.
580+
///
581+
/// \return
582+
/// Returns true if thread metadata was found in this corefile.
583+
///
584+
virtual bool GetCorefileThreadExtraInfos(std::vector<lldb::tid_t> &tids) {
585+
return false;
586+
}
587+
564588
virtual lldb::RegisterContextSP
565589
GetThreadContextAtIndex(uint32_t idx, lldb_private::Thread &thread) {
566590
return lldb::RegisterContextSP();

0 commit comments

Comments
 (0)