diff options
author | Adrian Prantl <aprantl@apple.com> | 2018-08-30 15:11:00 +0000 |
---|---|---|
committer | Adrian Prantl <aprantl@apple.com> | 2018-08-30 15:11:00 +0000 |
commit | 431b158400320fdeac946799d2087257e2bdc26c (patch) | |
tree | 30f2861f026750ed636d0d975b1ab52728b8c257 /lldb/source/API/SBTarget.cpp | |
parent | 5e98c2b69db07905348e8d5b1778bbba94c56531 (diff) | |
download | bcm5719-llvm-431b158400320fdeac946799d2087257e2bdc26c.tar.gz bcm5719-llvm-431b158400320fdeac946799d2087257e2bdc26c.zip |
Support setting a breakpoint by 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.
Differential Revision: https://reviews.llvm.org/D51461
llvm-svn: 341078
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r-- | lldb/source/API/SBTarget.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 15cdb0f312c..b143d6ccdff 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -693,6 +693,13 @@ SBBreakpoint SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec, uint32_t line, lldb::addr_t offset, SBFileSpecList &sb_module_list) { + return BreakpointCreateByLocation(sb_file_spec, line, 0, offset, + sb_module_list); +} + +SBBreakpoint SBTarget::BreakpointCreateByLocation( + const SBFileSpec &sb_file_spec, uint32_t line, uint32_t column, + lldb::addr_t offset, SBFileSpecList &sb_module_list) { Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API)); SBBreakpoint sb_bp; @@ -710,8 +717,8 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec, module_list = sb_module_list.get(); } sb_bp = target_sp->CreateBreakpoint( - module_list, *sb_file_spec, line, offset, check_inlines, skip_prologue, - internal, hardware, move_to_nearest_code); + module_list, *sb_file_spec, line, column, offset, check_inlines, + skip_prologue, internal, hardware, move_to_nearest_code); } if (log) { |