[PATCH] D133480: [llvm-dwp] Get the DWO file using relative path instead of absolute path to make it work for distribution build
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 9 16:17:55 PDT 2022
steven.zhang added a comment.
In D133480#3780651 <https://reviews.llvm.org/D133480#3780651>, @dblaikie wrote:
> fair enough, if this is gold/binutils dwp's behavior (can you provide a pastebin/show this is the behavior there, maybe even point to the code that implements it?) doesn't seem like the worst thing to have in llvm-dwp, though this will need a test case
binutils dwp ONLY check the relative path while llvm-dwp now ONLY check the absolute path.
$ clang++ a.cpp -g -gsplit-dwarf
$ cd ..
$ ls
test
$ dwp -e test/a.out
dwp: error: cannot open a.dwo: No such file or directory
dwp: fatal error: a.dwo: can't open
$ llvm-dwp -e test/a.out -o test/a.out.dwp
We are trying to make both way work. The way GDB search the dwo is both way. It searches the absolute path first, and then, the relative path.
$ ls test/
a.cpp a.dwo a.out
$ touch a.dwo # invalid dwo in current dir
$ gdb test/a.out < a.dbx # works fine, so, it picks the dwo in test instead of current dir
$ mv test/a.dwo dwo # move the dwo to current dir
$ gdb test/a.out < a.dbx # still works fine, so, it now picks the dwo in current dir.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133480/new/
https://reviews.llvm.org/D133480
More information about the llvm-commits
mailing list