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

2023-12-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo closed 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

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

2023-12-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/74808 >From 4e6bfb5f26f7744db1cb4a37d0e342195ae0ff8a Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Fri, 8 Dec 2023 00:11:19 -0500 Subject: [PATCH 1/3] [lldb-dap] Implement quiet commands This adds sup

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

2023-12-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/74808 >From 4e6bfb5f26f7744db1cb4a37d0e342195ae0ff8a Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Fri, 8 Dec 2023 00:11:19 -0500 Subject: [PATCH 1/2] [lldb-dap] Implement quiet commands This adds sup

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

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -11,40 +11,81 @@ namespace lldb_dap { -void RunLLDBCommands(llvm::StringRef prefix, +bool RunLLDBCommands(llvm::StringRef prefix, const llvm::ArrayRef &commands, - llvm::raw_ostream &strm) { + llvm::raw_ostream

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

2023-12-14 Thread Greg Clayton via lldb-commits
@@ -434,20 +434,54 @@ ExpressionContext DAP::DetectExpressionContext(lldb::SBFrame &frame, return ExpressionContext::Variable; } -void DAP::RunLLDBCommands(llvm::StringRef prefix, - const std::vector &commands) { - SendOutput(OutputType::Console, -

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

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg approved this pull request. Just fix an init as suggested and this is good to go. https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailm

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

2023-12-14 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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

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

2023-12-14 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/74808 >From 4e6bfb5f26f7744db1cb4a37d0e342195ae0ff8a Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Fri, 8 Dec 2023 00:11:19 -0500 Subject: [PATCH] [lldb-dap] Implement quiet commands This adds support

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

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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

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

2023-12-12 Thread Greg Clayton via lldb-commits
@@ -33,18 +39,59 @@ void RunLLDBCommands(llvm::StringRef prefix, const char *error = result.GetError(); strm << error; } + }; + + lldb::SBCommandInterpreter interp = g_dap.debugger.GetCommandInterpreter(); + for (llvm::StringRef command : commands) { +lld

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

2023-12-12 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. Just one variable rename and inline the `print_result` and this is good to go. https://github.com/llvm/llvm-project/pull/74808 ___ lldb-commits mailing list lldb-commits@lists.llvm.org

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

2023-12-12 Thread Greg Clayton via lldb-commits
@@ -33,18 +39,59 @@ void RunLLDBCommands(llvm::StringRef prefix, const char *error = result.GetError(); strm << error; } + }; + + lldb::SBCommandInterpreter interp = g_dap.debugger.GetCommandInterpreter(); + for (llvm::StringRef command : commands) { +lld

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

2023-12-12 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo updated https://github.com/llvm/llvm-project/pull/74808 >From e4c6bed8327aaedab1b5bd0a13e7408dc4d152e4 Mon Sep 17 00:00:00 2001 From: walter erquinigo Date: Fri, 8 Dec 2023 00:11:19 -0500 Subject: [PATCH] [lldb-dap] Implement quiet commands This adds support

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

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > > "error: one of your required 'attachCommands' failed, check the debug > > console for details" > > This is a key thing that I didn't consider in the beginning. I'm going to > update this patch to only support `?`, and then I'll make another one for > `!`, because I need to

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

2023-12-11 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: > "error: one of your required 'attachCommands' failed, check the debug console > for details" This is a key thing that I didn't consider in the beginning. I'm going to update this patch to only support `?`, and then I'll make another one for `!`, because I need to exp

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

2023-12-11 Thread Greg Clayton via lldb-commits
clayborg wrote: > @clayborg , I actually insist on aborting on failure for this feature. You > mention: > > > It would be nice if the RunLLDBCommands function could take an extra bool > > &fatal_error that clients could check after running when needed to decide > > what to do if this is set t

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

2023-12-09 Thread Walter Erquinigo via lldb-commits
walter-erquinigo wrote: @clayborg , I actually insist on aborting on failure for this feature. You mention: > It would be nice if the RunLLDBCommands function could take an extra bool > &fatal_error that clients could check after running when needed to decide > what to do if this is set to tr

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -33,9 +39,14 @@ namespace lldb_dap { /// \param[in] strm /// The stream that will receive the prefix, prompt + command and /// all command output. +/// +/// \param[in] parse_command_directives +/// If \b false, then command prefixes like \b ! or \b ? are not pars

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -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) { +lld

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

2023-12-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg requested changes to this pull request. I would rather not terminate the debug session if we get erorrs on `!`. It would be nice if the `RunLLDBCommands` function could take an extra `bool &fatal_error` that clients could check after running when needed to decide wh

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -13,16 +13,22 @@ namespace lldb_dap { void RunLLDBCommands(llvm::StringRef prefix, const llvm::ArrayRef &commands, - llvm::raw_ostream &strm) { + llvm::raw_ostream &strm, bool parse_command_directives) { -

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -33,9 +39,14 @@ namespace lldb_dap { /// \param[in] strm /// The stream that will receive the prefix, prompt + command and /// all command output. +/// +/// \param[in] parse_command_directives +/// If \b false, then command prefixes like \b ! or \b ? are not pars

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -13,16 +13,22 @@ namespace lldb_dap { void RunLLDBCommands(llvm::StringRef prefix, const llvm::ArrayRef &commands, - llvm::raw_ostream &strm) { + llvm::raw_ostream &strm, bool parse_command_directives) { if (co

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

2023-12-08 Thread Greg Clayton via lldb-commits
https://github.com/clayborg edited 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

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

2023-12-08 Thread Greg Clayton via lldb-commits
@@ -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) { +lld

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

2023-12-08 Thread Walter Erquinigo via lldb-commits
@@ -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) { +lld

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

2023-12-08 Thread Alex Langford via lldb-commits
@@ -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) { +lld

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

2023-12-08 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo edited 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

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

2023-12-08 Thread Walter Erquinigo via lldb-commits
https://github.com/walter-erquinigo edited 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