[Lldb-commits] [lldb] [lldb-dap] Correct the variable name from a half finished merge. (PR #130186)

2025-03-06 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-06 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-06 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb] Remove an extraneous `printf` statement. (PR #130453)

2025-03-08 Thread John Harrison via lldb-commits
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] [

[Lldb-commits] [lldb] [lldb] Remove an extraneous `printf` statement. (PR #130453)

2025-03-08 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-08 Thread John Harrison via 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

[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-08 Thread John Harrison via 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",

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-10 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-10 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-10 Thread John Harrison via lldb-commits
@@ -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; -} -

[Lldb-commits] [lldb] [lldb-dap] Adding logging helpers. (PR #130653)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Adding logging helpers. (PR #130653)

2025-03-11 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Adding logging helpers. (PR #130653)

2025-03-11 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Migrating terminated statistics to the event body. (PR #130454)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via 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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Adding support for cancelling a request. (PR #130169)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Adding logging helpers. (PR #130653)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
@@ -315,23 +316,19 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name, &dap_sessions_mutex, &dap_sessions, &clientCount](

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-12 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-12 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
@@ -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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via 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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-12 Thread John Harrison via 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

[Lldb-commits] [lldb] [lldb-dap] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-12 Thread John Harrison via lldb-commits
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

[Lldb-commits] [lldb] [lldb-dap] Validate server mode support prior to invoking lldb-dap. (PR #130855)

2025-03-12 Thread John Harrison via 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

<    1   2   3   4   5   6