[Lldb-commits] [lldb] [LLDB] Add FreeBSD kernel coredump matching check. (PR #80785)
via lldb-commits
lldb-commits at lists.llvm.org
Tue Feb 6 03:18:27 PST 2024
================
@@ -218,10 +230,16 @@ lldb_private::UUID DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress(
return UUID();
}
- // In here, I should check is_kernel for memory_module_sp
- // However, the ReadModuleFromMemory reads wrong section so that this check
- // will failed
- ArchSpec kernel_arch(llvm::ELF::convertEMachineToArchName(header.e_machine));
+ // Because the memory module is read from memory and in the memory, the type
+ // is eTypeExecutable so we have to assign the type manually
+ memory_module_sp->GetObjectFile()->SetType(ObjectFile::eTypeCoreFile);
+
+ if (memory_module_sp->GetUUID() !=
+ process->GetTarget().GetExecutableModule()->GetUUID()) {
+ LLDB_LOGF(log, "DynamicLoaderFreeBSDKernel::CheckForKernelImageAtAddress "
----------------
aokblast wrote:
Does this message ".note.gnu.build-id mismatched. Maybe you are using incompatible coredump with kernel binary?" like this is good?
https://github.com/llvm/llvm-project/pull/80785
More information about the lldb-commits
mailing list