[Lldb-commits] [PATCH] D39436: Add regex support to file (-f) and module (-s) breakpoint options.

Don Hinton via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Mon Oct 30 17:30:15 PDT 2017


hintonda added a comment.

In https://reviews.llvm.org/D39436#911296, @jingham wrote:

> In https://reviews.llvm.org/D39436#911293, @hintonda wrote:
>
> > In https://reviews.llvm.org/D39436#911260, @jingham wrote:
> >
> > > I don't like this change.
> > >
> > > First off, the whole point of having options in the commands is so that we don't have to have magic encodings in the values.
> > >
> > > We also don't have FileSpec's that resolve to multiple files.  What do "Exists", "IsExecutable",  "GetPath" etc. mean in this context?  There would have to be a really strong reason for making this kind of change.  Just avoiding an extra option does not warrant this change so far as I can see.
> >
> >
> > It seems that FileSpec already has a dual role, and can be either a search criteria (possibly representing multiple files) or a resolved file.
> >
> > The former is used with the '-f' and '-s' parameters, and can easily match multiple files, e.g.: if I pass '-f "foo.cpp"', with no directory, it'll match every foo.cpp file included in the target or loaded module.  I'd need to check, but I think 'Exists', 'IsExecutable', and 'GetPath' would still work as expected.
>
>
> There's a big difference between "dir not specified" and a full on glob or regex matching.


Yes, which is what I'm trying to add.  Granted, this might not be acceptable, but the searchfilters already work this way.  Not sure how to enhance them to support this if we don't use FileSpec -- it's copy constructed in vector, so even thought it's passed around as a ref, we can't customize it -- at least without changing the vectors to take shared pointers.


https://reviews.llvm.org/D39436





More information about the lldb-commits mailing list