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

Zachary Turner via lldb-commits lldb-commits at lists.llvm.org
Tue Oct 31 11:02:24 PDT 2017


On Tue, Oct 31, 2017 at 10:43 AM Jim Ingham <jingham at apple.com> wrote:

>
>
> > On Oct 31, 2017, at 9:05 AM, Zachary Turner <zturner at google.com> wrote:
> >
> > This is a case where I think a new API *would* be warranted.  But it
> would not be an API specifically for the -m option.  It would instead be an
> API that introduces an `SBBreakpointOptions` class, and then add a method
> called `BreakpointCreateWithOptions(options)`.
>
> That's almost right.  I want to keep the options that determine WHERE
> locations get set separate from the options that determine what happens
> WHEN a breakpoint gets hit.  The "reaction" options can be shared with the
> SBBreakpointName class and with Stop Hooks, and with a little fiddling
> should also be sharable with Watchpoints.  The only difference between
> watchpoints & breakpoints is the meaning of the ID they get passed
> however.  If you really wanted to share the options broadly, we'd probably
> have to also tell you what kind of stop this was for.  Anyway, for these
> reasons it is valuable to keep this part of the breakpoint specification
> separate.  But at the lldb_private layer these are already all gathered
> into their own class so promoting them would be straightforward.
>
> The setting options aren't factored into their own class at the
> lldb_private layer.  They get used directly to make the search filters &
> kernels that actually implement the breakpoint, so that class wasn't really
> needed.  But it wouldn't be that hard to make an intermediary that gathers
> up these options for convenience.  Then you'd have:
>
> SBBreakpoint BreakpointCreateWithOptions(SBBreakpointSettingOptions
> &setting_options, SBStoppointOptions &reaction_options);
>

That makes sense, I can get behind something like this.  I might quibble
over the names a little bit in the interest of brevity (e.g. something like
SBBreakpointLocation and SBBreakpointAction), but that's minor.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20171031/3573ef3d/attachment.html>


More information about the lldb-commits mailing list