[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap to support running in a server mode, allowing multiple connections. (PR #114881)

Adrian Vogelsgesang via lldb-commits lldb-commits at lists.llvm.org
Mon Nov 4 14:50:03 PST 2024


================
@@ -9,21 +9,28 @@
 #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
 #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H
 
-#include "llvm/Support/JSON.h"
 #include <string>
 
+#include "llvm/Support/JSON.h"
+
+#include "DAPForward.h"
+
 namespace lldb_dap {
 
 struct BreakpointBase {
+  // Associated DAP session.
+  DAP *dap;
 
   // An optional expression for conditional breakpoints.
   std::string condition;
   // An optional expression that controls how many hits of the breakpoint are
   // ignored. The backend is expected to interpret the expression as needed
   std::string hitCondition;
 
+  BreakpointBase(DAP *d) : dap(d) {}
+  BreakpointBase(DAP *d, const llvm::json::Object &obj);
----------------
vogelsgesang wrote:

afaik, those are not allowed to be nullptrs, are they?

```suggestion
  BreakpointBase(DAP &d) : dap(d) {}
  BreakpointBase(DAP &d, const llvm::json::Object &obj);
```

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


More information about the lldb-commits mailing list