[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/112384 >From af2e73635f85bd56b708e1240ad2c6837b7e449f Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 15 Oct 2024 09:13:49 -0700 Subject: [PATCH 1/6] [lldb-dap] Creating an API for sending custom dap events fro

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

2024-11-05 Thread John Harrison via lldb-commits
@@ -9,21 +9,28 @@ #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H -#include "llvm/Support/JSON.h" #include +#include "llvm/Support/JSON.h" + +#include "DAPForward.h" + namespace lldb_dap { struct BreakpointBase { + // Associat

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

2024-11-05 Thread John Harrison via lldb-commits
@@ -12,15 +12,19 @@ namespace lldb_dap { -SourceBreakpoint::SourceBreakpoint(const llvm::json::Object &obj) -: Breakpoint(obj), logMessage(std::string(GetString(obj, "logMessage"))), +SourceBreakpoint::SourceBreakpoint(DAP *dap, const llvm::json::Object &obj) +: Break

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

2024-11-05 Thread John Harrison via lldb-commits
@@ -9,21 +9,28 @@ #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H -#include "llvm/Support/JSON.h" #include +#include "llvm/Support/JSON.h" + +#include "DAPForward.h" + namespace lldb_dap { struct BreakpointBase { + // Associat

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

2024-11-05 Thread John Harrison via lldb-commits
@@ -173,7 +171,7 @@ def do_test_scopes_variables_setVariable_evaluate( "value": "1", }, "declaration": { -"equals": {"line": 12, "column": 14}, +"equals": {"line": 15

[Lldb-commits] [lldb] [llvm] [lldb-dap] Support column breakpoints (PR #113787)

2024-10-30 Thread John Harrison via lldb-commits
@@ -910,6 +911,183 @@ void request_attach(const llvm::json::Object &request) { } } +// "BreakpointLocationsRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +// "description": "The `breakpointLocations` request returns all poss

[Lldb-commits] [lldb] [llvm] [lldb-dap] Support column breakpoints (PR #113787)

2024-10-28 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/113787 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Support column breakpoints (PR #113787)

2024-10-28 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/113787 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [llvm] [lldb-dap] Support column breakpoints (PR #113787)

2024-10-28 Thread John Harrison via lldb-commits
@@ -910,6 +911,183 @@ void request_attach(const llvm::json::Object &request) { } } +// "BreakpointLocationsRequest": { +// "allOf": [ { "$ref": "#/definitions/Request" }, { +// "type": "object", +// "description": "The `breakpointLocations` request returns all poss

[Lldb-commits] [lldb] [lldb-dap] Fix lldb-dap build for windows, missing PATH_MAX. (PR #115551)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/115551 None >From cc7dd5f8b51f9ad0379193e9ccaf4049307c9615 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 8 Nov 2024 14:04:13 -0800 Subject: [PATCH] [lldb-dap] Fix lldb-dap build for windows, missing PATH_MAX.

[Lldb-commits] [lldb] [lldb-dap] Fix lldb-dap build for windows, missing PATH_MAX. (PR #115551)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/115551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fix lldb-dap build for windows, missing PATH_MAX. (PR #115551)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/115551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Fix lldb-dap build for windows, missing PATH_MAX. (PR #115551)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/115551 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/115208 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. (PR #115933)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/115933 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap/DAP.{h, cpp} to use its own instance instead of the global instance. (PR #115948)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/115948 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/116045 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. (PR #115933)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115933 >From db7efd17208479fb56eac01eaad1f8bcb993db04 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Nov 2024 14:41:28 -0500 Subject: [PATCH 1/2] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils

[Lldb-commits] [lldb] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. (PR #115933)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/115933 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. (PR #115933)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/115933 This refactor removes g_dap references from lldb-dap/LLDBUtils.{h,cpp} to allow us to create more than one g_dap instance in the future. >From db7efd17208479fb56eac01eaad1f8bcb993db04 Mon Sep 17 00:00:00 2001 Fr

[Lldb-commits] [lldb] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. (PR #115933)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115933 >From db7efd17208479fb56eac01eaad1f8bcb993db04 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Nov 2024 14:41:28 -0500 Subject: [PATCH] [lldb-dap] Remove `g_dap` references from lldb-dap/LLDBUtils. Th

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap/DAP.{h, cpp} to use its own instance instead of the global instance. (PR #115948)

2024-11-12 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/115948 The refactor will unblock us for creating multiple DAP instances. >From 83a1ad1cd80c71531db6d3014fa16a8fbc38eeeb Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Nov 2024 17:13:32 -0500 Subject: [PATCH

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap/DAP.{h, cpp} to use its own instance instead of the global instance. (PR #115948)

2024-11-13 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/115948 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/116045 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/116045 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
@@ -101,9 +101,9 @@ def run_test_evaluate_expressions( if context == "repl": # In the repl context expressions may be interpreted as lldb # commands since no variables have the same name as the command. -self.assertEvaluate("var", r"\

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/116045 Previously this used `var` as both an lldb command and variable in the source to validate the behavior of the 'auto' repl mode. However, `var` seems to occasionally fail in the CI test when attempting to print s

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
@@ -101,9 +101,9 @@ def run_test_evaluate_expressions( if context == "repl": # In the repl context expressions may be interpreted as lldb # commands since no variables have the same name as the command. -self.assertEvaluate("var", r"\

[Lldb-commits] [lldb] [lldb-dap] Adjust the evaluate test to use a different lldb command. (PR #116045)

2024-11-13 Thread John Harrison via lldb-commits
@@ -101,9 +101,9 @@ def run_test_evaluate_expressions( if context == "repl": # In the repl context expressions may be interpreted as lldb # commands since no variables have the same name as the command. -self.assertEvaluate("var", r"\

[Lldb-commits] [lldb] [lldb-dap] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
@@ -1465,11 +1462,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request, llvm::StringRef key = envs.GetNameAtIndex(index); llvm::StringRef value = envs.GetValueAtIndex(index); -if (key.empty()) - g_dap.SendOutput(OutputType::Stderr,

[Lldb-commits] [lldb] [lldb-dap] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
@@ -154,7 +154,7 @@ DecodeMemoryReference(llvm::StringRef memoryReference) { std::vector GetStrings(const llvm::json::Object *obj, llvm::StringRef key) { std::vector strs; - auto json_array = obj->getArray(key); + const auto *json_array =

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 01/10] [lldb-dap] Refactoring breakpoints to not use the `g_dap` r

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 1/9] [lldb-dap] Refactoring breakpoints to not use the `g_dap` ref

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 01/11] [lldb-dap] Refactoring breakpoints to not use the `g_dap` r

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/115561 This is part of a larger refactor to remove the global `g_dap` variable. >From 3105fc424d4c712d90f10b771d4644c0e97355c4 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 7 Nov 2024 13:06:01 -0800 Subject:

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti unassigned https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti unassigned https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Rename `enableDisplayExtendedBacktrace` (PR #109521)

2024-09-22 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/109521 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][docs] Improve README (PR #109266)

2024-09-20 Thread John Harrison via lldb-commits
@@ -204,12 +171,67 @@ The default hostname being used `localhost`. } ``` -## Custom debugger commands +### Configuration Settings Reference + +For both launch and attach configurations, lldb-dap accepts the following `lldb-dap` +specific key/value pairs: + +|parameter

[Lldb-commits] [lldb] [lldb-dap][docs] Improve README (PR #109266)

2024-09-20 Thread John Harrison via lldb-commits
@@ -204,12 +171,67 @@ The default hostname being used `localhost`. } ``` -## Custom debugger commands +### Configuration Settings Reference + +For both launch and attach configurations, lldb-dap accepts the following `lldb-dap` +specific key/value pairs: + +|parameter

[Lldb-commits] [lldb] [lldb-dap][docs] Improve README (PR #109266)

2024-09-20 Thread John Harrison via lldb-commits
@@ -204,12 +171,67 @@ The default hostname being used `localhost`. } ``` -## Custom debugger commands +### Configuration Settings Reference + +For both launch and attach configurations, lldb-dap accepts the following `lldb-dap` +specific key/value pairs: + +|parameter

[Lldb-commits] [lldb] [lldb-dap] Correct auto-completion based on ReplMode and escape char (PR #110784)

2024-10-02 Thread John Harrison via lldb-commits
@@ -32,90 +47,146 @@ def test_completions(self): breakpoint2_line = line_number(source, "// breakpoint 2") self.set_source_breakpoints(source, [breakpoint1_line, breakpoint2_line]) + + +def test_command_completions(self): +""" +Tests comple

[Lldb-commits] [lldb] [lldb-dap] Correct auto-completion based on ReplMode and escape char (PR #110784)

2024-10-02 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/110784 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][docs] Fix README (PR #110982)

2024-10-03 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/110982 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][docs] Improve documentation for contributors (PR #110987)

2024-10-03 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/110987 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap][docs] Improve documentation for contributors (PR #110987)

2024-10-03 Thread John Harrison via lldb-commits
@@ -1,16 +1,95 @@ -# LLDB-DAP - -The `lldb-dap` tool (formerly `lldb-vscode`) is a command line tool that -implements the [Debug Adapter -Protocol](https://microsoft.github.io/debug-adapter-protocol/). It can be -installed as an extension for Visual Studio Code and other IDEs supp

[Lldb-commits] [lldb] [lldb-dap][docs] Improve documentation for contributors (PR #110987)

2024-10-03 Thread John Harrison via lldb-commits
@@ -1,16 +1,95 @@ -# LLDB-DAP - -The `lldb-dap` tool (formerly `lldb-vscode`) is a command line tool that -implements the [Debug Adapter -Protocol](https://microsoft.github.io/debug-adapter-protocol/). It can be -installed as an extension for Visual Studio Code and other IDEs supp

[Lldb-commits] [lldb] [lldb-dap][docs] Improve documentation for contributors (PR #110987)

2024-10-03 Thread John Harrison via lldb-commits
@@ -1,16 +1,95 @@ -# LLDB-DAP - -The `lldb-dap` tool (formerly `lldb-vscode`) is a command line tool that -implements the [Debug Adapter -Protocol](https://microsoft.github.io/debug-adapter-protocol/). It can be -installed as an extension for Visual Studio Code and other IDEs supp

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 87f0b7326e5d05e5d61d2596a1bfbc63aa7d6935 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH] [lldb-dap] Refactoring breakpoints to not use the `g_dap` referen

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/115208 Refactoring breakpoints to not use the `g_dap` reference. Instead, when a breakpoint is constructed it will be passed a DAP reference that it should use for its lifetime. This is part of a larger refactor to re

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/115208 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 586720cbf52aff41370368e9e1036f60200c1a83 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH] [lldb-dap] Refactoring breakpoints to not use the `g_dap` referen

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH] [lldb-dap] Refactoring breakpoints to not use the `g_dap` referen

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 1/2] [lldb-dap] Refactoring breakpoints to not use the `g_dap` ref

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
@@ -9,21 +9,27 @@ #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H -#include "llvm/Support/JSON.h" #include +#include "llvm/Support/JSON.h" + +#include "DAPForward.h" ashgti wrote: Updated all the files I touched i

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-07 Thread John Harrison via lldb-commits
@@ -11,23 +11,28 @@ #define LLDB_TOOLS_LLDB_DAP_INSTRUCTIONBREAKPOINT_H #include "Breakpoint.h" +#include "DAPForward.h" + +#include "lldb/lldb-defines.h" +#include "lldb/lldb-types.h" + +#include namespace lldb_dap { // Instruction Breakpoint struct InstructionBreakpo

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-07 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 1/4] [lldb-dap] Refactoring breakpoints to not use the `g_dap` ref

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/112384 >From 61f5407be7fed86428d46e0ea0a6d418a8e25bf7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 15 Oct 2024 09:13:49 -0700 Subject: [PATCH 1/2] [lldb-dap] Creating an API for sending custom dap events fro

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
@@ -962,6 +962,44 @@ bool ReplModeRequestHandler::DoExecute(lldb::SBDebugger debugger, return true; } +// Sends a custom DAP event with an optional body. +// +// See +// https://code.visualstudio.com/api/references/vscode-api#debug.onDidReceiveDebugSessionCustomEvent +bool

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/112384 >From 61f5407be7fed86428d46e0ea0a6d418a8e25bf7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 15 Oct 2024 09:13:49 -0700 Subject: [PATCH 1/3] [lldb-dap] Creating an API for sending custom dap events fro

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
@@ -290,6 +290,30 @@ The initial repl-mode can be configured with the cli flag `--repl-mode=` and may also be adjusted at runtime using the lldb command `lldb-dap repl-mode `. + `lldb-dap custom-event` ashgti wrote: Renamed the event to `lldb-dap send-ev

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/112384 >From 61f5407be7fed86428d46e0ea0a6d418a8e25bf7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 15 Oct 2024 09:13:49 -0700 Subject: [PATCH 1/4] [lldb-dap] Creating an API for sending custom dap events fro

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/112384 >From 61f5407be7fed86428d46e0ea0a6d418a8e25bf7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 15 Oct 2024 09:13:49 -0700 Subject: [PATCH 1/5] [lldb-dap] Creating an API for sending custom dap events fro

[Lldb-commits] [lldb] [lldb-dap] Creating an API for sending custom dap events from lldb-dap. (PR #112384)

2024-10-15 Thread John Harrison via lldb-commits
@@ -1896,6 +1896,8 @@ void request_initialize(const llvm::json::Object &request) { cmd.AddCommand( "repl-mode", new ReplModeRequestHandler(), "Get or set the repl behavior of lldb-dap evaluation requests."); + cmd.AddCommand("custom-event", new CustomDAPEventReq

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/115208 >From 125c8976906ff25da6e212dff21d1b129575bd28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 6 Nov 2024 09:36:48 -0800 Subject: [PATCH 1/3] [lldb-dap] Refactoring breakpoints to not use the `g_dap` ref

[Lldb-commits] [lldb] [lldb-dap] Refactoring breakpoints to not use the `g_dap` reference. (PR #115208)

2024-11-06 Thread John Harrison via lldb-commits
@@ -9,21 +9,27 @@ #ifndef LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H #define LLDB_TOOLS_LLDB_DAP_BREAKPOINTBASE_H -#include "llvm/Support/JSON.h" #include +#include "llvm/Support/JSON.h" + +#include "DAPForward.h" ashgti wrote: I ran `include-what-you-use`[^1]

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

2024-11-06 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/114881 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

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

2024-11-06 Thread John Harrison via lldb-commits
ashgti wrote: I will work on splitting this up into smaller pieces https://github.com/llvm/llvm-project/pull/114881 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-25 Thread John Harrison via lldb-commits
ashgti wrote: > The patch is still a bit larger than I'd like. I've tried to highlight a few > things that could be split off into separate PRs, but I think the biggest > question now (not really for you, but for lldb-dap maintainers) is whether > this could be using the socket abstractions al

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-25 Thread John Harrison via lldb-commits
@@ -0,0 +1,182 @@ +//===-- Socket.h *- C++ -*-===// ashgti wrote: Sounds good, I can re-work my patch to use `lldb/Hosts/*` https://github.com/llvm/llvm-project/pull/116392

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
@@ -1465,11 +1462,7 @@ CreateRunInTerminalReverseRequest(const llvm::json::Object &launch_request, llvm::StringRef key = envs.GetNameAtIndex(index); llvm::StringRef value = envs.GetValueAtIndex(index); -if (key.empty()) - g_dap.SendOutput(OutputType::Stderr,

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-da] Refactoring JSONUtils to not use `g_dap` and instead passing in required arguments. (PR #115561)

2024-11-08 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/115561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Removing the debugger log callback, instead use the default behavior. (PR #78343)

2024-11-14 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/78343 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)

2024-11-14 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/116272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)

2024-11-15 Thread John Harrison via lldb-commits
@@ -5046,30 +5026,48 @@ int main(int argc, char *argv[]) { pause(); } #endif + + // Initialize LLDB first before we do anything. + lldb::SBDebugger::Initialize(); + + // Terminate the debugger before the C++ destructor chain kicks in. + auto terminate_debugger = +

[Lldb-commits] [lldb] [lldb-da] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-15 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/116392 This refactors the port listening mode to allocate a new DAP object for each connection, allowing multiple connections to run concurrently. >From 43b8fc2a222e5460dd56782e31bd1b1ac399e03e Mon Sep 17 00:00:00 2001

[Lldb-commits] [lldb] [lldb-da] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/116392 >From acfdb2da30b7a49711c3d1ec3be3c9282d6c51b4 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 15 Nov 2024 09:56:43 -0500 Subject: [PATCH] [lldb-da] Refactoring lldb-dap port listening mode to allow mult

[Lldb-commits] [lldb] [lldb-da] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-15 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/116392 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)

2024-11-14 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/116272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)

2024-11-14 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/116272 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Refactor lldb-dap.cpp to not use global DAP variable. (PR #116272)

2024-11-14 Thread John Harrison via lldb-commits
@@ -5046,30 +5026,50 @@ int main(int argc, char *argv[]) { pause(); } #endif + + // Initialize LLDB first before we do anything. + lldb::SBDebugger::Initialize(); + + // Terminate the debugger before the C++ destructor chain kicks in. + auto terminate_debugger = +

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -5028,36 +5218,52 @@ int main(int argc, char *argv[]) { #endif // Initialize LLDB first before we do anything. - lldb::SBDebugger::Initialize(); + lldb::SBError error = lldb::SBDebugger::InitializeWithErrorHandling(); + if (error.Fail()) { +llvm::errs() << "Failed

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -1196,6 +1202,62 @@ def terminate(self): self.process.wait() self.process = None +@classmethod +def launch( +cls, executable: str, /, connection=None, log_file=None, env=None +) -> tuple[subprocess.Popen, str]: +adaptor_en

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -0,0 +1,67 @@ +""" +Test lldb-dap server integration. +""" + +import os +import tempfile + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +import lldbdap_testcase + + +class TestDAP_server(lldbdap_testcase.DAPTestCaseBase): +

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -0,0 +1,67 @@ +""" +Test lldb-dap server integration. +""" + +import os +import tempfile + +import dap_server +from lldbsuite.test.decorators import * +from lldbsuite.test.lldbtest import * +import lldbdap_testcase + + +class TestDAP_server(lldbdap_testcase.DAPTestCaseBase): +

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -1196,6 +1202,62 @@ def terminate(self): self.process.wait() self.process = None +@classmethod +def launch( +cls, executable: str, /, connection=None, log_file=None, env=None +) -> tuple[subprocess.Popen, str]: +adaptor_en

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -32,35 +34,44 @@ using namespace lldb_dap; namespace lldb_dap { -DAP::DAP(llvm::StringRef path, ReplMode repl_mode) -: debug_adaptor_path(path), broadcaster("lldb-dap"), - exception_breakpoints(), focus_tid(LLDB_INVALID_THREAD_ID), - stop_at_entry(false), is_

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -250,6 +251,13 @@ def which(program): return None +def pickrandomport(): +"""Returns a random open port.""" +with socket.socket() as sock: +sock.bind(("", 0)) +return sock.getsockname()[1] ashgti wrote: Reverted changes to this

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -52,11 +51,11 @@ struct StreamDescriptor { struct InputStream { StreamDescriptor descriptor; - bool read_full(std::ofstream *log, size_t length, std::string &text); + bool read_full(llvm::raw_ostream *log, size_t length, std::string &text); - bool read_line(std::ofst

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
@@ -0,0 +1,182 @@ +//===-- Socket.h *- C++ -*-===// ashgti wrote: I reworked this now to use the `lldb/Host/Socket.h` and associated types. https://github.com/llvm/llvm-project/pull/116392

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-11-26 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/116392 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Remove child_process_inherit from the socket classes (PR #117699)

2024-11-26 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/117699 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] For a host socket, add a method to print the listening address. (PR #118330)

2024-12-02 Thread John Harrison via lldb-commits
https://github.com/ashgti unassigned https://github.com/llvm/llvm-project/pull/118330 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] For a host socket, add a method to print the listening address. (PR #118330)

2024-12-02 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/118330 >From c3226b620bc8f745b92b3aca7b189803a24db788 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Dec 2024 08:29:01 -0800 Subject: [PATCH 1/2] [lldb] For a host socket, add a method to print the listening

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap port listening mode to allow multiple connections. (PR #116392)

2024-12-02 Thread John Harrison via lldb-commits
@@ -118,6 +124,15 @@ std::string TCPSocket::GetRemoteConnectionURI() const { return ""; } +std::string TCPSocket::GetListeningConnectionURI() const { ashgti wrote: Split this into its own PR https://github.com/llvm/llvm-project/pull/118330 https://github.c

[Lldb-commits] [lldb] [lldb] For a host socket, add a method to print the listening address. (PR #118330)

2024-12-02 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/118330 This is most useful if you are listening on an address like 'localhost:0' and want to know the resolved ip + port of the socket listener. >From c3226b620bc8f745b92b3aca7b189803a24db788 Mon Sep 17 00:00:00 2001 F

[Lldb-commits] [lldb] [lldb] For a host socket, add a method to print the listening address. (PR #118330)

2024-12-02 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/118330 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

<    1   2   3   4   5   6   >