[Lldb-commits] [lldb] [lldb] Source file search paths (PR #190276)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Apr 2 16:59:30 PDT 2026


JDevlieghere wrote:

Search path prefixes has come up previously, but I think that was in the context of breakpoints rather than for source files. I found https://reviews.llvm.org/D129307 but I think it has been discussed more recently. That might have been a conversation with @jeffreytan81 and/or @clayborg who are reviewers here (which I'm sure is not a coincidence?).

Can either of you confirm whether or not we ever solved that problem? If so, can we make sure this works consistently. if not, can we co-design the feature so that it does? 

While I think this sounds useful, I'm a little skeptical about the motivation. 

> When users deal with relocated source files (e.g. their build system temporarily moves the project headers, symlinks, locally debugging a remote build, etc.), the traditional approach to resolve this is to use `target.source-map`. However, it can be difficult for users to determine the path LLDB's attempting and failing to find. 

This PR doesn't really improve that besides potentially remapping a path that wasn't previously?

> It can sometimes also be confusing to figure out which path prefixes to replace, and what order the source-mapping should be. 

I'd expect that either the build system (buck?) would generate the remapping, or if it needs to be done by a human, you actually do need to think about these things for it to work correctly. The search path approach doesn't really improve that problem either.

https://github.com/llvm/llvm-project/pull/190276


More information about the lldb-commits mailing list