================
@@ -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;
+
+    while (parse_command_directives) {
+      if (command.starts_with("?")) {
+        command = command.drop_front();
+        quiet_on_success = true;
+      } else if (command.starts_with("!")) {
+        command = command.drop_front();
+        abort_on_error = true;
+      } else {
+        break;
+      }
+    }
+
+    interp.HandleCommand(command.str().c_str(), result);
----------------
bulbazord wrote:

If `parse_command_directives` is false and the commands start with `?` and `!` 
they'll fail right? Would you want the commands to run (ignoring the `?` and 
`!`) even though `parse_command_directives` is off?

https://github.com/llvm/llvm-project/pull/74808
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to