================
@@ -218,10 +234,18 @@ 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);
+ UUID memory_module_uuid = memory_module_sp->GetUUID();
+ if (memory_module_uuid.IsValid() &&
----------------
DavidSpickett wrote:
Sorry, Github ate the `<>` in my comment. It was meant to say `include the
<name of the section> in core dumps`.
Replace with the actual name, `.note.gnu.build-id` I presume.
https://github.com/llvm/llvm-project/pull/80785
_______________________________________________
lldb-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits