Add some more tests for breakpoint serialization.

Serialize breakpoint names & the hardware_requested attributes.
Also added a few missing affordances to SBBreakpoint whose absence
writing the tests pointed out.

<rdar://problem/12611863>

llvm-svn: 282036
This commit is contained in:
Jim Ingham
2016-09-20 22:54:49 +00:00
parent b6b8f6c308
commit 92d1960e3b
14 changed files with 270 additions and 64 deletions

View File

@@ -661,6 +661,14 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
SBBreakpoint
SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
uint32_t line, lldb::addr_t offset) {
SBFileSpecList empty_list;
return BreakpointCreateByLocation(sb_file_spec, line, offset, empty_list);
}
SBBreakpoint
SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
uint32_t line, lldb::addr_t offset,
SBFileSpecList &sb_module_list) {
Log *log(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_API));
SBBreakpoint sb_bp;
@@ -673,9 +681,13 @@ SBTarget::BreakpointCreateByLocation(const SBFileSpec &sb_file_spec,
const bool internal = false;
const bool hardware = false;
const LazyBool move_to_nearest_code = eLazyBoolCalculate;
*sb_bp = target_sp->CreateBreakpoint(NULL, *sb_file_spec, line, offset,
check_inlines, skip_prologue, internal,
hardware, move_to_nearest_code);
const FileSpecList *module_list = nullptr;
if (sb_module_list.GetSize() > 0) {
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);
}
if (log) {