[Lldb-commits] [PATCH] D97786: LLDB: Use path relative to binary, not relative to debugger CWD, for finding .dwo files.

David Blaikie via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Aug 31 09:24:37 PDT 2021


dblaikie added a comment.

In D97786#2974202 <https://reviews.llvm.org/D97786#2974202>, @pfaffe wrote:

> In D97786#2973868 <https://reviews.llvm.org/D97786#2973868>, @dblaikie wrote:
>
>> This doesn't solve all use cases/it's not a terribly general purpose situation - using -fdebug-prefix-map/-fdebug-compilation-dir requires knowledge of these limitations/how to use these features together. (though I agree that changes in this area should apply to all relative comp_dir lookups - source and dwo files alike, rather than handling one group differently from the other when they're all defined as comp_dir relative)
>
> My main concern is that even with knowledge of how the debug-compilation-dir features work, there are use cases that stop working after this change and are unfixable on the user's end. Anything that involves linking shared objects into multiple executables for example.

Not fixable? Not sure I follow. In the case of cwd-relative (old behavior) you can fix the behavior by changing where you invoke the debugger from, and in the case of exe-relative you can fix the behavior by moving the executable? (once both source and dwo lookup is implemented consistently, at least)

Do you know anyone using the feature that would be challenged by this change in behavior? The only place I know using the feature is Chromium. (Google's internal build system uses -fdebug-compilation-dir=/proc/cwd so it really gets cwd-relative always, even with this change in lldb (but it's not a portable solution, since the path is unix-ish-specific, whereas Chromium probably needs a more portable solution that works on Windows, etc) - and then some local patches to gdb I think to do change the search paths so comp_dir gets ignored anyway, I think? not 100% sure, it's all a bit arcane)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D97786



More information about the lldb-commits mailing list