[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)
John Harrison via lldb-commits
lldb-commits at lists.llvm.org
Mon May 19 15:41:37 PDT 2025
================
@@ -35,29 +36,34 @@ SourceBreakpoint::SourceBreakpoint(DAP &dap,
m_line(breakpoint.line),
m_column(breakpoint.column.value_or(LLDB_INVALID_COLUMN_NUMBER)) {}
-void SourceBreakpoint::SetBreakpoint(const protocol::Source &source) {
+llvm::Error SourceBreakpoint::SetBreakpoint(const protocol::Source &source) {
lldb::SBMutex lock = m_dap.GetAPIMutex();
std::lock_guard<lldb::SBMutex> guard(lock);
if (m_line == 0)
- return;
+ return llvm::createStringError(llvm::inconvertibleErrorCode(),
+ "Invalid line number.");
if (source.sourceReference) {
// breakpoint set by assembly source.
lldb::SBAddress source_address(*source.sourceReference, m_dap.target);
if (!source_address.IsValid())
- return;
+ return llvm::createStringError(llvm::inconvertibleErrorCode(),
----------------
ashgti wrote:
nit: This will be converted into an error when if it makes it to the `RequestHandler<>` but you could also use `DAPError` if we wanted to use any of the error message features (like a URL to or something) in the future. Like: `llvm::make_error<DAPError>("...");`
https://github.com/llvm/llvm-project/pull/139969
More information about the lldb-commits
mailing list