diff options
Diffstat (limited to 'lldb/source/API/SBTarget.cpp')
| -rw-r--r-- | lldb/source/API/SBTarget.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/lldb/source/API/SBTarget.cpp b/lldb/source/API/SBTarget.cpp index 7013e2b45e5..312e4df7586 100644 --- a/lldb/source/API/SBTarget.cpp +++ b/lldb/source/API/SBTarget.cpp @@ -1176,12 +1176,15 @@ bool SBTarget::FindBreakpointsByName(const char *name, TargetSP target_sp(GetSP()); if (target_sp) { std::lock_guard<std::recursive_mutex> guard(target_sp->GetAPIMutex()); - BreakpointList bkpt_list(false); - bool is_valid = - target_sp->GetBreakpointList().FindBreakpointsByName(name, bkpt_list); - if (!is_valid) + llvm::Expected<std::vector<BreakpointSP>> expected_vector = + target_sp->GetBreakpointList().FindBreakpointsByName(name); + if (!expected_vector) { + LLDB_LOG(lldb_private::GetLogIfAllCategoriesSet(LIBLLDB_LOG_BREAKPOINTS), + "invalid breakpoint name: {}", + llvm::toString(expected_vector.takeError())); return false; - for (BreakpointSP bkpt_sp : bkpt_list.Breakpoints()) { + } + for (BreakpointSP bkpt_sp : *expected_vector) { bkpts.AppendByID(bkpt_sp->GetID()); } } |

