[all-commits] [llvm/llvm-project] 536abf: Read and store gnu build id from loaded core file ...

GeorgeHuyubo via All-commits all-commits at lists.llvm.org
Tue May 14 14:35:56 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 536abf827b481f78a0879b02202fb9a3ffe3a908
      https://github.com/llvm/llvm-project/commit/536abf827b481f78a0879b02202fb9a3ffe3a908
  Author: GeorgeHuyubo <113479859+GeorgeHuyubo at users.noreply.github.com>
  Date:   2024-05-14 (Tue, 14 May 2024)

  Changed paths:
    M lldb/include/lldb/Target/Process.h
    M lldb/source/Commands/CommandObjectMemory.cpp
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.cpp
    M lldb/source/Plugins/Process/elf-core/ProcessElfCore.h
    M lldb/source/Target/Process.cpp

  Log Message:
  -----------
  Read and store gnu build id from loaded core file (#92078)

As we have debuginfod as symbol locator available in lldb now, we want
to make full use of it.
In case of post mortem debugging, we don't always have the main
executable available.
However, the .note.gnu.build-id of the main executable(some other
modules too), should be available in the core file, as those binaries
are loaded in memory and dumped in the core file.

We try to iterate through the NT_FILE entries, read and store the gnu
build id if possible. This will be very useful as this id is the unique
key which is needed for querying the debuginfod server.

Test:
Build and run lldb. Breakpoint set to
https://github.com/llvm/llvm-project/blob/main/lldb/source/Plugins/SymbolLocator/Debuginfod/SymbolLocatorDebuginfod.cpp#L147
Verified after this commit, module_uuid is the correct gnu build id of
the main executable which caused the crash(first in the NT_FILE entry)



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