summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-09-20 22:54:49 +0000
committerJim Ingham <jingham@apple.com>2016-09-20 22:54:49 +0000
commit92d1960e3b63c4c9ca7e7af3463b39c46864c792 (patch)
treed8df5f1e30f279fa1a51213dc92d6899029d1cde /lldb/source/API/SBTarget.cpp
parentb6b8f6c308ce165bc58a25f25f2226c18614e344 (diff)
downloadbcm5719-llvm-92d1960e3b63c4c9ca7e7af3463b39c46864c792.tar.gz
bcm5719-llvm-92d1960e3b63c4c9ca7e7af3463b39c46864c792.zip
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
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 66d375aa457..7cf9215aab8 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -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) {
OpenPOWER on IntegriCloud