[all-commits] [llvm/llvm-project] bcf654: [lldb] Fix loading UUIDs from ELF headers. (#117028)

Greg Clayton via All-commits all-commits at lists.llvm.org
Thu Nov 21 14:15:47 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: bcf654c7f5fb84dd7cff5fe112d96658853cd8f5
      https://github.com/llvm/llvm-project/commit/bcf654c7f5fb84dd7cff5fe112d96658853cd8f5
  Author: Greg Clayton <gclayton at fb.com>
  Date:   2024-11-21 (Thu, 21 Nov 2024)

  Changed paths:
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp

  Log Message:
  -----------
  [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.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list