[Lldb-commits] [PATCH] D76672: [lldb/Reproducers] Always collect the whole dSYM in the reproducer

Pavel Labath via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 26 03:45:02 PDT 2020


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





More information about the lldb-commits mailing list