> On Oct 30, 2017, at 5:35 PM, Zachary Turner <ztur...@google.com> wrote:
>
>
> On Mon, Oct 30, 2017 at 5:32 PM Jim Ingham via Phabricator
> <revi...@reviews.llvm.org <mailto:revi...@reviews.llvm.org>> wrote:
> jingham added a comment.
>
> In https://reviews.llvm.org/D39436#911304
> <https://reviews.llvm.org/D39436#911304>, @hintonda wrote:
>
> > In https://reviews.llvm.org/D39436#911274
> > <https://reviews.llvm.org/D39436#911274>, @jingham wrote:
> >
> > > BTW, to Z's comment: you can't really resolve the regex pattern when you
> > > make the breakpoint. What if another library gets loaded later on, which
> > > has source files that match the source file pattern the user entered, and
> > > have source code that matches the -p pattern. The breakpoint should be
> > > updated to encompass those new locations, but you can't do that if you've
> > > already matched the pattern against the original list of files, and then
> > > thrown away the pattern.
> >
> >
> > Isn't this how it already works with all breakpoints? If you load more
> > modules, do more locations get automatically loaded? Sorry if that's a
> > dumb question.
>
>
> That's how it should work. Zachary was suggesting (though I don't think he
> is anymore) taking the pattern in as an argument, but then matching it
> against the files that matched the pattern at the time the breakpoint was
> set. That is NOT - as you correctly state - the way breakpoints are supposed
> to work. So if we want to make this a pattern, we have to store the pattern.
> At least not as part of the lldb command. But the more i hear, the more I’m
> starting to think we should just do nothing in lldb, and let all the logic
> for this live in the clangdiag python script
Yeah, I don’t mind the notion of an option that explicitly provides source
files as a filter. The -f option gets (ab?)used that way sometimes (function
foo in file bar.c for instance). That’s not convenient for more than a few
source files so having a pattern way to express it isn’t useless. But the case
isn’t super compelling.
I wouldn’t mind a FindSourceFilesMatchingRegex on SBTarget. That seems like a
useful “what the heck have I got in here" type investigation function.
Jim
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits