llvm-project
bcf654c7 - [lldb] Fix loading UUIDs from ELF headers. (#117028)

Commit
1 year ago
[lldb] Fix loading UUIDs from ELF headers. (#117028) A previous patch added the ability to load UUID from ELF headers using the program header and finding PT_NOTE entries. The fix would attempt to read the data for the PT_NOTE from memory, but it didn't slide the address so it ended up only working for the main executable if it wasn't moved in memory. This patch slides the address and adds logging. All processes map the ELF header + program headers + some program header contents into memory. The program header for the `PT_NOTE` entries are mapped, but the p_vaddr doesn't get relocated and is relative to the load address of the ELF header. So we take a "p_vaddr" (file address) and convert it into a load address in the process so we can load the correct bytes that contain the `PT_NOTE` contents.
Author
Parents
Loading