[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)

Greg Clayton via lldb-commits lldb-commits at lists.llvm.org
Fri Dec 8 20:42:54 PST 2023


================
@@ -33,14 +39,49 @@ void RunLLDBCommands(llvm::StringRef prefix,
       const char *error = result.GetError();
       strm << error;
     }
+  };
+
+  lldb::SBCommandInterpreter interp = g_dap.debugger.GetCommandInterpreter();
+  for (llvm::StringRef command : commands) {
+    lldb::SBCommandReturnObject result;
+    bool quiet_on_success = false;
+    bool abort_on_error = false;
----------------
clayborg wrote:

I am not sure we want to actually abort the `lldb-dap` program if we encounter an error, maybe this function can take an extra "bool &fatal_error" parameter that can be set to true if and only if we find any `!` prefixed commands that fail? Then any callers of this function would then check `fatal_error` and return an error for indicating why the current packet failed? 

More comments below

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


More information about the lldb-commits mailing list