llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-lldb Author: None (GeorgeHuyubo) <details> <summary>Changes</summary> Previous commit https://github.com/llvm/llvm-project/commit/bcf654c7f5fb84dd7cff5fe112d96658853cd8f5 introduced a bug which makes lldb unable to parse gnu build id for the main executable from a core file. This PR fix it by replace p_vaddr with p_offset. Tested with core files with ELF headers off all modules. LLDB is able to parse the gnu build id for main executable as well as other shared libs. --- Full diff: https://github.com/llvm/llvm-project/pull/120655.diff 1 Files Affected: - (modified) lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp (+2-2) ``````````diff diff --git a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp index b3916cc913f7db..cf3e056a20a049 100644 --- a/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp +++ b/lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp @@ -1047,9 +1047,9 @@ UUID ProcessElfCore::FindBuidIdInCoreMemory(lldb::addr_t address) { std::vector<uint8_t> note_bytes; note_bytes.resize(program_header.p_memsz); - // We need to slide the address of the p_vaddr as these values don't get + // We need to slide the address of the p_offset as these values don't get // relocated in memory. - const lldb::addr_t vaddr = program_header.p_vaddr + address; + const lldb::addr_t vaddr = program_header.p_offset + address; byte_read = ReadMemory(vaddr, note_bytes.data(), program_header.p_memsz, error); if (byte_read != program_header.p_memsz) `````````` </details> https://github.com/llvm/llvm-project/pull/120655 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits