diff options
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 16 |
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; |

