================ @@ -983,6 +1005,73 @@ llvm::Error ProcessElfCore::ParseThreadContextsFromNoteSegment( } } +bool ProcessElfCore::IsElf(const lldb::addr_t address) { + uint8_t buf[4]; + Status error; + size_t byte_read = ReadMemory(address, buf, 4, error); + if (byte_read != 4) + return false; + return elf::ELFHeader::MagicBytesMatch(buf); +} + +std::optional<UUID> ProcessElfCore::FindNote(const lldb::addr_t address, ---------------- labath wrote:
Please give this a more specific name (to say what kind of note its searching for and where). An uninformed reader would think this is searching for a note in the core file itself. https://github.com/llvm/llvm-project/pull/92492 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits