pfaffe added a comment.

This change breaks all existing uses of relative comp_dirs that don't 
accidentally make all of them relative to the executable's directory already.

It's easy to construct broken use cases: Consider compiling your program like 
`clang -g ./src/src.c -gsplit-dwarf -o ./out/src -fdebug-prefix-map=$(pwd)=.`. 
This will create `src.dwo` in $(pwd) and set the DW_AT_comp_dir of `src` to 
".";  the change makes it impossible to load `src.dwo`.

The problem is easy to see in this slightly constructed example and could be 
fixed here by moving around the dwo files or setting the prefix to '..' to make 
it point to the executable. But that's not always possible! What if we have a 
static library that gets linked into multiple executables in different 
locations? What do we set comp_dir to in the library objects?

The change also introduces different behavior for loading dwos vs. source 
files. The latter will still be loaded relative to the CWD.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97786/new/

https://reviews.llvm.org/D97786

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to