[Lldb-commits] [lldb] [lldb-dap] assembly breakpoints (PR #139969)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 20 08:10:46 PDT 2025


================
@@ -63,14 +65,31 @@ protocol::Breakpoint Breakpoint::ToProtocolBreakpoint() {
     std::string formatted_addr =
         "0x" + llvm::utohexstr(bp_addr.GetLoadAddress(m_bp.GetTarget()));
     breakpoint.instructionReference = formatted_addr;
+
+    lldb::StopDisassemblyType stop_disassembly_display =
+        GetStopDisassemblyDisplay(m_dap.debugger);
     auto line_entry = bp_addr.GetLineEntry();
-    const auto line = line_entry.GetLine();
-    if (line != UINT32_MAX)
-      breakpoint.line = line;
-    const auto column = line_entry.GetColumn();
-    if (column != 0)
-      breakpoint.column = column;
-    breakpoint.source = CreateSource(line_entry);
+    if (!ShouldDisplayAssemblySource(line_entry, stop_disassembly_display)) {
+      const auto line = line_entry.GetLine();
+      if (line != LLDB_INVALID_LINE_NUMBER)
+        breakpoint.line = line;
+      const auto column = line_entry.GetColumn();
+      if (column != LLDB_INVALID_COLUMN_NUMBER)
+        breakpoint.column = column;
+      breakpoint.source = CreateSource(line_entry);
+    } else {
+      // Breakpoint made by assembly
----------------
JDevlieghere wrote:

```suggestion
      // Assembly breakpoint.
```

https://github.com/llvm/llvm-project/pull/139969


More information about the lldb-commits mailing list