@@ -38,7 +38,7 @@ Expected OutputRedirector::GetWriteFileDescriptor() {
return m_fd;
}
-Error OutputRedirector::RedirectTo(std::FILE *file_override,
+Error OutputRedirector::RedirectTo(std::FILE *fileOverride,
ashgti wrote:
Sorry for the churn, I saw I brok
@@ -0,0 +1,152 @@
+//===-- Transport.cpp
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,56 @@
+//===-- Transport.h
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/ashgti created
https://github.com/llvm/llvm-project/pull/130453
This was missed in review but is showing up in lldb-dap output.
>From 317ab3778f56f7d32c6f3687981b5b87a8392915 Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Sat, 8 Mar 2025 18:50:30 -0800
Subject: [PATCH] [
https://github.com/ashgti ready_for_review
https://github.com/llvm/llvm-project/pull/130453
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
ashgti wrote:
This is split off from #130026
https://github.com/llvm/llvm-project/pull/130454
___
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/130454
Per the DAP spec, the event 'body' field should contain any additional data
related to the event. I updated the lldb-dap 'statistics' extension into the
terminated event's body like:
```
{
"type": "event",
@@ -0,0 +1,146 @@
+//===-- Transport.cpp
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -0,0 +1,146 @@
+//===-- Transport.cpp
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -838,19 +775,16 @@ llvm::Error DAP::Loop() {
StopEventHandlers();
});
while (!disconnecting) {
-llvm::json::Object object;
-lldb_dap::PacketStatus status = GetNextObject(object);
-
-if (status == lldb_dap::PacketStatus::EndOfFile) {
- break;
-}
-
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130653
>From 88f1cf3469c9f24a768f5147c22cfe414aea014e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Sat, 8 Mar 2025 17:55:34 -0800
Subject: [PATCH 1/3] [lldb-dap] Adding logging helpers.
Improving logging by defin
@@ -239,14 +241,7 @@ void DAP::SendJSON(const llvm::json::Value &json) {
std::lock_guard locker(mutex);
SendJSON(json_str);
- if (log) {
-auto now = std::chrono::duration(
-std::chrono::system_clock::now().time_since_epoch());
-*log << llvm::formatv("{0:f9
@@ -711,22 +700,15 @@ PacketStatus DAP::GetNextObject(llvm::json::Object
&object) {
llvm::StringRef json_sref(json);
llvm::Expected json_value = llvm::json::parse(json_sref);
- if (auto error = json_value.takeError()) {
-std::string error_str = llvm::toString(std::mo
https://github.com/ashgti closed
https://github.com/llvm/llvm-project/pull/130454
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -0,0 +1,58 @@
+//===-- DAPLog.h
--===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apa
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 1/4] [lldb-dap] Refactoring IOStream into Transport handler.
Inste
https://github.com/ashgti created
https://github.com/llvm/llvm-project/pull/130169
Adding support for cancelling requests.
There are two forms of request cancellation.
* Preemptively cancelling a request that is in the queue.
* Actively cancelling the in progress request as a best effort attem
https://github.com/ashgti created
https://github.com/llvm/llvm-project/pull/130026
Instead of having two discrete InputStream and OutputStream helpers, this
merges the two into a unifed 'Transport' handler.
This handler is responsible for reading the DAP message headers, parsing the
resulting
https://github.com/ashgti closed
https://github.com/llvm/llvm-project/pull/130653
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -315,23 +316,19 @@ serveConnection(const Socket::SocketProtocol &protocol,
const std::string &name,
&dap_sessions_mutex, &dap_sessions,
&clientCount](
https://github.com/ashgti created
https://github.com/llvm/llvm-project/pull/130090
This is a work in progress refactor to add explicit types instead of
generic 'llvm::json::Value' types to the DAP protocol.
This updates RequestHandler to have take the type of the arguments and
response body for
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 1/5] [lldb-dap] Refactoring IOStream into Transport handler.
Inste
@@ -0,0 +1,144 @@
+//===-- Transport.cpp
-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
@@ -838,19 +770,12 @@ llvm::Error DAP::Loop() {
StopEventHandlers();
});
while (!disconnecting) {
-llvm::json::Object object;
-lldb_dap::PacketStatus status = GetNextObject(object);
-
-if (status == lldb_dap::PacketStatus::EndOfFile) {
+std::optional nex
@@ -63,12 +64,12 @@ const char DEV_NULL[] = "/dev/null";
namespace lldb_dap {
-DAP::DAP(llvm::StringRef client_name, llvm::StringRef path, std::ofstream *log,
- lldb::IOObjectSP input, lldb::IOObjectSP output, ReplMode repl_mode,
- std::vector pre_init_command
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 01/10] [lldb-dap] Refactoring IOStream into Transport handler.
Ins
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 1/8] [lldb-dap] Refactoring IOStream into Transport handler.
Inste
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 1/9] [lldb-dap] Refactoring IOStream into Transport handler.
Inste
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130026
>From c340c38a82880114471938b19512670d7f94245e Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 10:18:36 +0100
Subject: [PATCH 1/6] [lldb-dap] Refactoring IOStream into Transport handler.
Inste
@@ -210,12 +209,33 @@ struct DAP {
// will contain that expression.
std::string last_nonempty_var_expression;
- DAP(llvm::StringRef client_name, llvm::StringRef path, std::ofstream *log,
- lldb::IOObjectSP input, lldb::IOObjectSP output, ReplMode repl_mode,
- st
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130090
>From f26c9a79ca234bee77ec1a9694bf8be2d0e3745c Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 13:21:10 +0100
Subject: [PATCH 1/2] [lldb-dap] Updating RequestHandler to encode/decode
arguments
@@ -240,6 +240,137 @@ using Message = std::variant;
bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path);
llvm::json::Value toJSON(const Message &);
+// MARK: Types
+
+// "Source": {
+// "type": "object",
+// "description": "A `Source` is a descriptor for
@@ -240,6 +240,137 @@ using Message = std::variant;
bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path);
llvm::json::Value toJSON(const Message &);
+// MARK: Types
+
+// "Source": {
+// "type": "object",
+// "description": "A `Source` is a descriptor for
@@ -240,6 +240,137 @@ using Message = std::variant;
bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path);
llvm::json::Value toJSON(const Message &);
+// MARK: Types
+
+// "Source": {
+// "type": "object",
+// "description": "A `Source` is a descriptor for
@@ -57,235 +68,288 @@ class RequestHandler {
DAP &dap;
};
-class AttachRequestHandler : public RequestHandler {
-public:
- using RequestHandler::RequestHandler;
+/// Base class for handling DAP requests. Handlers should declare their
+/// arguments and response body types l
https://github.com/ashgti updated
https://github.com/llvm/llvm-project/pull/130090
>From f26c9a79ca234bee77ec1a9694bf8be2d0e3745c Mon Sep 17 00:00:00 2001
From: John Harrison
Date: Thu, 6 Mar 2025 13:21:10 +0100
Subject: [PATCH 1/3] [lldb-dap] Updating RequestHandler to encode/decode
arguments
https://github.com/ashgti ready_for_review
https://github.com/llvm/llvm-project/pull/130090
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
@@ -57,235 +68,288 @@ class RequestHandler {
DAP &dap;
};
-class AttachRequestHandler : public RequestHandler {
-public:
- using RequestHandler::RequestHandler;
+/// Base class for handling DAP requests. Handlers should declare their
+/// arguments and response body types l
ashgti wrote:
Apparently rebasing my changes on a main caused GH to not let me reply to some
comments directly (still learning GH's PR nuances...).
>From labath
> That probably fine, but I am pretty sure that being abstract doesn't prevent
> you from [forming a reference](https://godbolt.org/z
https://github.com/ashgti approved this pull request.
Looks great!
https://github.com/llvm/llvm-project/pull/125843
___
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/130855
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
501 - 541 of 541 matches
Mail list logo