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
This commit is contained in:
Adrian Prantl
2018-08-30 15:11:00 +00:00
parent 5e98c2b69d
commit 431b158400
18 changed files with 238 additions and 52 deletions

View File

@@ -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) {