[Lldb-commits] [PATCH] D130045: Implement better path matching in FileSpecList::FindFileIndex(...).

Greg Clayton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 25 16:59:26 PDT 2022


clayborg added a comment.

In D130045#3675738 <https://reviews.llvm.org/D130045#3675738>, @labath wrote:

> In D130045#3666610 <https://reviews.llvm.org/D130045#3666610>, @JDevlieghere wrote:
>
>> I'm slightly worried about the change to make the new "fuzzy" matching the default. While it makes sense for the breakpoints, I wouldn't generally expect `./a/b/c/main.cpp` to match `/build/a/b/c/main.cpp`,
>
> Would you expect that `main.cpp` "generally" matches `/build/a/b/c/main.cpp`?
>
> (I'm not arguing for/against anything (yet, at least), but I would like to hear your reasoning if the answer to the question is "yes".)

I would say it should match. If FindFileIndex is currently called with a FileSpec that only has "main.cpp" as the m_filename, then it will fall back to only matching by filename even if "full = true;". I would expect it to work the other way around too if we have any files in the file list that are base name only. Does that make sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D130045



More information about the lldb-commits mailing list