[Lldb-commits] [PATCH] D97786: LLDB: Use path relative to binary, not relative to debugger CWD, for finding .dwo files.
Jim Ingham via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Mar 8 10:19:32 PST 2021
jingham added a comment.
I bet gdb uses the debugger's CWD because that's the practice working ON gdb (at least back in the day when I worked on it). You built gdb, cd'ed into the gdb build directory and ran the debugger on it from there. gdb's build also produced a debugging-gdb specific .gdbinit file in the build directory that would also get read in if you did it that way. When using command-line debuggers, running from the build directory is probably a fairly common practice. So there are merits to the cwd way of doing things. These merits fade when using IDE's which generally support debugging more than one thing at a time, so changing the working directory of the IDE makes little sense.
Anyway, I agree with Pavel that the surprise of doing it differently from gdb is probably more important than the relative merits of one way or the other. If you can convince the gdb folks to change to next to the binary, lldb should follow that.
I don't know if people do this with dwo's but I've seen in other instances where you get symbols from some sort of federated build system and just dump them all in some debug info directory. If people also do this with dwo's then it would make sense to use the debug symbols path to specify this. That does seem like a separate patch, however.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D97786/new/
https://reviews.llvm.org/D97786
More information about the lldb-commits
mailing list