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
@@ -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
@@ -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
@@ -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
@@ -173,7 +171,7 @@ def do_test_scopes_variables_setVariable_evaluate(
"value": "1",
},
"declaration": {
-"equals": {"line": 12, "column": 14},
+"equals": {"line": 15
@@ -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
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
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
@@ -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
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.
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
@@ -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"\
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
@@ -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"\
@@ -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"\
@@ -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,
@@ -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 =
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
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
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
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
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:
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
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
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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
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
@@ -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
@@ -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
@@ -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
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
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
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
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
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
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
@@ -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
@@ -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
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
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
@@ -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
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
@@ -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
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
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
@@ -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
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
@@ -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]
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
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
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
@@ -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
@@ -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,
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
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
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
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
@@ -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 =
+
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
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
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
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
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
@@ -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 =
+
@@ -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
@@ -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
@@ -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):
+
@@ -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):
+
@@ -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
@@ -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_
@@ -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
@@ -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
@@ -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
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
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
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
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
@@ -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
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
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
101 - 200 of 541 matches
Mail list logo