Page MenuHomePhabricator

[lldb/API] Expose Target::CreateBreakpoint(..., move_to_nearest_code) overload

Authored by mib on Dec 14 2020, 6:50 PM.



This patch exposes the Target::CreateBreakpoint overload with the
boolean argument to move to the neareast code to the SBAPI.

This is useful when creating column breakpoints to restrict lldb's
resolution to the pointed source location, preventing it to go to the next


Signed-off-by: Med Ismail Bennani <>

Diff Detail

Event Timeline

mib requested review of this revision.Dec 14 2020, 6:50 PM
mib created this revision.
JDevlieghere added inline comments.Dec 14 2020, 6:58 PM

It's unfortunate that we have so many overloads, if we had to do it again I would've argued for something like SBBreakpointLocationOptions or something, but I'm not sure if that adds a lot, and dealing with defaults (such as the move_to_nearest_code) is hard because we have no SB counterpart for it. So I guess this is fine.


There's a lot of code duplication with the method just before it. Can we extract the common code into a private method that both call into? The reproducer instrumentation would remain in the public method.

mib updated this revision to Diff 311771.Dec 14 2020, 7:20 PM
mib marked 2 inline comments as done.

Address @JDevlieghere comments.

This revision is now accepted and ready to land.Dec 14 2020, 7:22 PM
This revision was landed with ongoing or failed builds.Dec 14 2020, 7:25 PM
This revision was automatically updated to reflect the committed changes.