diff options
Diffstat (limited to 'lldb/source/Commands/CommandObjectBreakpoint.cpp')
-rw-r--r-- | lldb/source/Commands/CommandObjectBreakpoint.cpp | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/lldb/source/Commands/CommandObjectBreakpoint.cpp b/lldb/source/Commands/CommandObjectBreakpoint.cpp index 4631c97..2440a7e 100644 --- a/lldb/source/Commands/CommandObjectBreakpoint.cpp +++ b/lldb/source/Commands/CommandObjectBreakpoint.cpp @@ -28,6 +28,7 @@ #include "lldb/Target/ThreadSpec.h" #include "lldb/Utility/RegularExpression.h" #include "lldb/Utility/StreamString.h" +#include "llvm/Support/FormatAdapters.h" #include <memory> #include <optional> @@ -956,7 +957,10 @@ protected: BreakpointLocation *location = breakpoint->FindLocationByID(cur_bp_id.GetLocationID()).get(); if (location) { - location->SetEnabled(true); + if (llvm::Error error = location->SetEnabled(true)) + result.AppendErrorWithFormatv( + "failed to enable breakpoint location: {0}", + llvm::fmt_consume(std::move(error))); ++loc_count; } } else { @@ -1062,7 +1066,10 @@ protected: BreakpointLocation *location = breakpoint->FindLocationByID(cur_bp_id.GetLocationID()).get(); if (location) { - location->SetEnabled(false); + if (llvm::Error error = location->SetEnabled(false)) + result.AppendErrorWithFormatv( + "failed to disable breakpoint location: {0}", + llvm::fmt_consume(std::move(error))); ++loc_count; } } else { @@ -1508,7 +1515,10 @@ protected: // It makes no sense to try to delete individual locations, so we // disable them instead. if (location) { - location->SetEnabled(false); + if (llvm::Error error = location->SetEnabled(false)) + result.AppendErrorWithFormatv( + "failed to disable breakpoint location: {0}", + llvm::fmt_consume(std::move(error))); ++disable_count; } } else { |