summaryrefslogtreecommitdiffstats
path: root/lldb/source/API/SBTarget.cpp
diff options
context:
space:
mode:
authorJim Ingham <jingham@apple.com>2016-09-22 22:20:28 +0000
committerJim Ingham <jingham@apple.com>2016-09-22 22:20:28 +0000
commit3acdf38519923f1ce293c7bacac542804145ea7c (patch)
tree44ff83bad4addee616af83ba9e95ab6577b87f80 /lldb/source/API/SBTarget.cpp
parentfcee2d80017f8e2db6a8ac3a70bdc0653afa7d01 (diff)
downloadbcm5719-llvm-3acdf38519923f1ce293c7bacac542804145ea7c.tar.gz
bcm5719-llvm-3acdf38519923f1ce293c7bacac542804145ea7c.zip
Add the ability to deserialize only breakpoints matching a given name.
Also tests for this and the ThreadSpec serialization. llvm-svn: 282207
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
-rw-r--r--lldb/source/API/SBTarget.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp
index 8616d22d0e3..54ed0989daf 100644
--- a/lldb/source/API/SBTarget.cpp
+++ b/lldb/source/API/SBTarget.cpp
@@ -1128,6 +1128,13 @@ bool SBTarget::DeleteAllBreakpoints() {
lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
SBBreakpointList &new_bps) {
+ SBStringList empty_name_list;
+ return BreakpointsCreateFromFile(source_file, empty_name_list, new_bps);
+}
+
+lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
+ SBStringList &matching_names,
+ SBBreakpointList &new_bps) {
SBError sberr;
TargetSP target_sp(GetSP());
if (!target_sp) {
@@ -1138,7 +1145,14 @@ lldb::SBError SBTarget::BreakpointsCreateFromFile(SBFileSpec &source_file,
std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex());
BreakpointIDList bp_ids;
- sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(), bp_ids);
+
+ std::vector<std::string> name_vector;
+ size_t num_names = matching_names.GetSize();
+ for (size_t i = 0; i < num_names; i++)
+ name_vector.push_back(matching_names.GetStringAtIndex(i));
+
+ sberr.ref() = target_sp->CreateBreakpointsFromFile(source_file.ref(),
+ name_vector, bp_ids);
if (sberr.Fail())
return sberr;
OpenPOWER on IntegriCloud