[all-commits] [llvm/llvm-project] 3dc24b: [LLDB] Re-land: Use path relative to binary for fi...

cmtice via All-commits all-commits at lists.llvm.org
Fri Apr 16 11:13:22 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dc24bc31edbc01dea085b24a6a6b024d7ae531c
      https://github.com/llvm/llvm-project/commit/3dc24bc31edbc01dea085b24a6a6b024d7ae531c
  Author: Caroline Tice <cmtice at google.com>
  Date:   2021-04-16 (Fri, 16 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] Re-land: 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