[Lldb-commits] [lldb] Read and store gnu build id from loaded core file (PR #92492)
Kevin Frei via lldb-commits
lldb-commits at lists.llvm.org
Fri May 17 08:45:57 PDT 2024
================
@@ -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,
----------------
kevinfrei wrote:
I'd suggest instead, implement support for the Note section in the same fashion as the other ELF components, with a "parse" method and the like (check out ThreadElfCore.h) and integrated it into the top level loop, same as the other Program Header structures.
https://github.com/llvm/llvm-project/pull/92492
More information about the lldb-commits
mailing list