[all-commits] [llvm/llvm-project] b241f3: [LLDB] Use path relative to binary for finding .dw...

cmtice via All-commits all-commits at lists.llvm.org
Thu Apr 15 14:44:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b241f3cb292d0ba1ad5a33b3bbd4a8a3a9c909dc
      https://github.com/llvm/llvm-project/commit/b241f3cb292d0ba1ad5a33b3bbd4a8a3a9c909dc
  Author: Caroline Tice <cmtice at google.com>
  Date:   2021-04-15 (Thu, 15 Apr 2021)

  Changed paths:
    M lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp
    A lldb/test/Shell/SymbolFile/DWARF/dwo-relative-path.s

  Log Message:
  -----------
  [LLDB] Use path relative to binary for finding .dwo files.

DWARF allows .dwo file paths to be relative rather than absolute. When
they are relative, DWARF uses DW_AT_comp_dir to find the .dwo
file. DW_AT_comp_dir can also be relative, making the entire search
patch for the .dwo file relative. In this case, LLDB currently
searches relative to its current working directory, i.e. the directory
from which the debugger was launched. This is not right, as the
compiler, which generated the relative paths, can have no idea where
the debugger will be launched. The correct thing is to search relative
to the location of the executable binary. That is what this patch
does.

Differential Revision: https://reviews.llvm.org/D97786




More information about the All-commits mailing list