This is an archive of the discontinued LLVM Phabricator instance.

Support setting a breakpoint by FileSpec+Line+Column in the SBAPI.
ClosedPublic

Authored by aprantl on Aug 29 2018, 3:34 PM.

Details

Summary

Support setting a breakpoint bile FileSpec+Line+Column in the SBAPI.

This patch extends the SBAPI to allow for setting a breakpoint not
only at a specific line, but also at a specific (minimum) column. When
a column is specified, it will try to find an exact match or the
closest match on the same line that comes after the specified
location.

Diff Detail

Repository
rL LLVM

Event Timeline

aprantl created this revision.Aug 29 2018, 3:34 PM
jingham requested changes to this revision.Aug 29 2018, 4:30 PM

This looks great, just a few small nits and a test request.

include/lldb/Breakpoint/BreakpointResolverFileLine.h
71 ↗(On Diff #163207)

This comment should go after m_inlines and get a ///<

packages/Python/lldbsuite/test/functionalities/breakpoint/breakpoint_by_line_and_column/TestBreakpointByLineAndColumn.py
23–31 ↗(On Diff #163207)

Can you add a run_to_line_breakpoint to lldbutil.py and use it here? Should just take a couple of lines, (see run_to_source_breakpoint and run_to_name_breakpoint) and I think it's better to centralize this logic in lldbutil.

42–50 ↗(On Diff #163207)

Then use it here too...

source/Breakpoint/BreakpointResolverFileLine.cpp
67–72 ↗(On Diff #163207)

Should probably make this optional or it will break old save files. If it's not there set the column to 0.

This revision now requires changes to proceed.Aug 29 2018, 4:30 PM
aprantl retitled this revision from Support setting a breakpoint bile FileSpec+Line+Column in the SBAPI. to Support setting a breakpoint by FileSpec+Line+Column in the SBAPI..Aug 29 2018, 4:35 PM
aprantl updated this revision to Diff 163231.Aug 29 2018, 4:50 PM
aprantl marked 4 inline comments as done.

Address review feedback.

jingham accepted this revision.Aug 29 2018, 5:10 PM

That's great, thanks!

This revision is now accepted and ready to land.Aug 29 2018, 5:10 PM
This revision was automatically updated to reflect the committed changes.