[Lldb-commits] [lldb] [lldb-dap] Implement command directives (PR #74808)
Alex Langford via lldb-commits
lldb-commits at lists.llvm.org
Fri Dec 8 15:51:53 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;
+
+ 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
More information about the lldb-commits
mailing list