labath added a comment.

Wow. This is a lot more generic than I had mind. But at the same time, it does 
not seem generic enough. :( Like, for instance, using only component-based 
matching, one couldn't ignore `/usr/lib` while keeping `$BUILD/lib` or whatever.

What I had in mind for your use case was a simple function (*) like 
`repro::???->recordInterestingDirectory(StringRef)`, and calling this 
dynamically from SymbolVendorMacOSX when it opens a dsym (so, approximately 
around here 
<https://github.com/llvm/llvm-project/blob/master/lldb/source/Plugins/SymbolVendor/MacOSX/SymbolVendorMacOSX.cpp#L295>,
 maybe after some refactoring to avoid computing the dsym directory twice). 
That seems to be a lot more flexible, requires less plumbing, and about as 
equally obtrusive for the resulting code as attempting to statically describe 
the interesting directories via these matchers.

It's true that may need some kind of matchers for ignoring directories (**), 
but these should probably work on the full path, not individual components. And 
maybe they too shouldn't be fully static, so that they can be controlled by the 
context, or the user... I don't know -- we don't have to design this part now.

So what do you think about just adding the `recordInterestingDirectory` 
function? Would that be sufficient for your needs?

(*) I don't know which class should that function me a member of (if any). 
However, I think it would be nice if it was something in the repro namespace 
(and not the FileSystem class) to make it clear that this is happening for the 
sake of reproducers.

(**) I can see how my previous comment could be interpreted as a request to 
implement ignoring directories. That was not my intention, I am sorry. I was 
just musing about possible future directions (e.g. some function like 
`ignoreUniniterestingDirectory`).


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D76672



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to