[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
Wed Nov 1 17:21:34 PDT 2017


hintonda updated this revision to Diff 121214.
hintonda added a comment.

Addressed @clayborg's comments.

- Added FileSpec ctor that takes an explicit RegularExpression object when using FileSpec as a regex pattern.

- Removed the RegularExpression member variable, added a flag, and create the regex on demand in operator==().

- Added type to PathSyntax enum, and reordered member variables from, largest to smallest (evens thought the last three are now the same size) to make sure sizeof(FileSpec) doesn't grow with this change.

- Removed implementation of special methods that had default behavior, and declared the default ctor '= default', which should reduce the maintenance burden.

Next steps:

- Create SBRegularExpression and add ctor to SBFileSpec that takes it as parameter.  That will allow this use case without any other changes:

  regex = lldb.SBRegularExpression(".*/some/path/.*") target.BreakpointCreateBySourceRegex(name, lldb.SBFileSpec(regex))

- Then wire up SBFileSpec to do the right thing.  SBRegularExpression can validate the expression on construction to give immediate feedback.


https://reviews.llvm.org/D39436

Files:
  include/lldb/Utility/FileSpec.h
  source/Commands/CommandObjectBreakpoint.cpp
  source/Utility/FileSpec.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39436.121214.patch
Type: text/x-patch
Size: 8946 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171102/0e01c8e7/attachment.bin>


More information about the lldb-commits mailing list