[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-18 Thread John Harrison via lldb-commits
@@ -50,17 +56,88 @@ class TransportUnhandledContentsError std::string m_unhandled_contents; }; +class InvalidParams : public llvm::ErrorInfo { ashgti wrote: Added comments to this and a bunch of other classes in this file. https://github.com/llvm/llvm-proj

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-18 Thread John Harrison via lldb-commits
@@ -50,17 +56,88 @@ class TransportUnhandledContentsError std::string m_unhandled_contents; }; +class InvalidParams : public llvm::ErrorInfo { +public: + static char ID; + + explicit InvalidParams(std::string method, std::string context) + : m_method(std::move(method)

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-18 Thread John Harrison via lldb-commits
@@ -100,22 +175,301 @@ template class Transport { virtual llvm::Expected RegisterMessageHandler(MainLoop &loop, MessageHandler &handler) = 0; - // FIXME: Refactor mcp::Server to not directly access log on the transport. - // protected: +protected: template inline a

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-18 Thread John Harrison via lldb-commits
@@ -100,22 +175,301 @@ template class Transport { virtual llvm::Expected RegisterMessageHandler(MainLoop &loop, MessageHandler &handler) = 0; - // FIXME: Refactor mcp::Server to not directly access log on the transport. - // protected: +protected: template inline a

[Lldb-commits] [lldb] [lldb-dap] Add memory event (PR #158437)

2025-09-17 Thread John Harrison via lldb-commits
ashgti wrote: LGTM, I can merge it. https://github.com/llvm/llvm-project/pull/158437 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Add memory event (PR #158437)

2025-09-17 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/158437 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-mcp] Fix servers accepting more than one client. (PR #158357)

2025-09-17 Thread John Harrison via lldb-commits
@@ -52,11 +60,14 @@ class ProtocolServerMCP : public ProtocolServer { lldb_private::MainLoop m_loop; std::thread m_loop_thread; std::mutex m_mutex; + uint32_t m_client_count = 0; ashgti wrote: Done, updated to `size_t`. https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] [lldb-mcp] Fix servers accepting more than one client. (PR #158357)

2025-09-17 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158357 >From 07a8a62569a41c881f721b2800086eb559da6fa8 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 13:06:30 -0700 Subject: [PATCH 1/2] [lldb-mcp] Fix servers accepting more than one client. This

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-17 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158701 >From 39b27ffc60fe30e88e42918f2c3382369f06f3df Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 15 Sep 2025 10:30:04 -0700 Subject: [PATCH 1/3] [lldb-mcp] Launch lldb on demand, if needed. Adding support

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/159160 This adds a new Binding helper class to allow mapping of incoming and outgoing requests / events to specific handlers. This should make it easier to create new protocol implementations and allow us to create a

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/159160 >From b91cad6dc7ea4c40c61a0cfe9bb45be03de32254 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 10 Sep 2025 10:42:56 -0700 Subject: [PATCH] [lldb] Adding A new Binding helper for JSONTransport. This adds

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/159160 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adding A new Binding helper for JSONTransport. (PR #159160)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/159160 >From 5472b257f704288060ce3bad408c958c2a538e0d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 10 Sep 2025 10:42:56 -0700 Subject: [PATCH] [lldb] Adding A new Binding helper for JSONTransport. This adds

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-16 Thread John Harrison via lldb-commits
@@ -35,24 +41,88 @@ using namespace llvm; using namespace lldb; using namespace lldb_protocol::mcp; +using lldb_private::Environment; using lldb_private::File; +using lldb_private::FileSpec; +using lldb_private::FileSystem; +using lldb_private::Host; using lldb_private::Main

[Lldb-commits] [lldb] [lldb-mcp] Fix servers accepting more than one client. (PR #158357)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158357 >From 07a8a62569a41c881f721b2800086eb559da6fa8 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 13:06:30 -0700 Subject: [PATCH] [lldb-mcp] Fix servers accepting more than one client. This fixe

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158701 >From 39b27ffc60fe30e88e42918f2c3382369f06f3df Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 15 Sep 2025 10:30:04 -0700 Subject: [PATCH 1/5] [lldb-mcp] Launch lldb on demand, if needed. Adding support

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-16 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158701 >From 39b27ffc60fe30e88e42918f2c3382369f06f3df Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 15 Sep 2025 10:30:04 -0700 Subject: [PATCH 1/4] [lldb-mcp] Launch lldb on demand, if needed. Adding support

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158701 >From 39b27ffc60fe30e88e42918f2c3382369f06f3df Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 15 Sep 2025 10:30:04 -0700 Subject: [PATCH 1/2] [lldb-mcp] Launch lldb on demand, if needed. Adding support

[Lldb-commits] [lldb] [lldb-mcp] Launch lldb on demand, if needed. (PR #158701)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/158701 Adding support for launching lldb with `-O protocol start MCP` if a valid ~/.lldb/lldb-mcp-*.json` file is not found. >From 39b27ffc60fe30e88e42918f2c3382369f06f3df Mon Sep 17 00:00:00 2001 From: John Harrison

[Lldb-commits] [lldb] [lldb-dap] Add memory event (PR #158437)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/158437 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Add memory event (PR #158437)

2025-09-15 Thread John Harrison via lldb-commits
@@ -88,6 +88,34 @@ struct InvalidatedEventBody { llvm::json::Value toJSON(const InvalidatedEventBody::Area &); llvm::json::Value toJSON(const InvalidatedEventBody &); +/// This event indicates that some memory range has been updated. It should only +/// be sent if the corresp

[Lldb-commits] [lldb] [lldb-dap] Add memory event (PR #158437)

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

[Lldb-commits] [lldb] [lldb-mcp] Fix servers accepting more than one client. (PR #158357)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158357 >From 07a8a62569a41c881f721b2800086eb559da6fa8 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 13:06:30 -0700 Subject: [PATCH] [lldb-mcp] Fix servers accepting more than one client. This fixe

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/158340 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-15 Thread John Harrison via lldb-commits
ashgti wrote: I filed #158676 for the index issue so we don't loose track of it. https://github.com/llvm/llvm-project/pull/158340 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158340 >From aab75bdd91f15a3dde3a6ac9fbf7804461fa8951 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 11:10:31 -0700 Subject: [PATCH 1/2] [lldb-mcp] Adding a tool to list debuggers again. This bring

[Lldb-commits] [lldb] [lldb-dap] Adding exception handling for dap server disconnect and terminations in lldbdap_testcase.py (PR #155335)

2025-09-12 Thread John Harrison via lldb-commits
@@ -450,6 +450,20 @@ def disassemble(self, threadId=None, frameIndex=None): return disassembled_instructions, disassembled_instructions[memoryReference] +def dapCleanup(self, disconnectAutomatically): +if disconnectAutomatically: +try: ---

[Lldb-commits] [lldb] [lldb-dap] Add invalidated event (PR #157530)

2025-09-12 Thread John Harrison via lldb-commits
@@ -56,6 +57,14 @@ struct ModuleEventBody { llvm::json::Value toJSON(const ModuleEventBody::Reason &); llvm::json::Value toJSON(const ModuleEventBody &); +struct InvalidatedEventBody { + enum Area : unsigned { eAreaAll, eAreaStacks, eAreaThreads, eAreaVariables }; + + std::v

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-12 Thread John Harrison via lldb-commits
@@ -53,33 +134,41 @@ int main(int argc, char *argv[]) { assert(result); #endif - lldb::IOObjectSP input = std::make_shared( + if (auto e = g_debugger_lifetime->Initialize( + std::make_unique(nullptr))) +error(std::move(e)); + + IOObjectSP input_sp = std::make

[Lldb-commits] [lldb] [lldb-mcp] Fix servers accepting more than one client. (PR #158357)

2025-09-12 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/158357 This fixes an issue where the MCP server would stop the main loop after the first client disconnects. This moves the MainLoop out of the Server instance and lifts the server up into the ProtocolServerMCP object

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-12 Thread John Harrison via lldb-commits
@@ -10,26 +10,107 @@ #include "lldb/Host/File.h" #include "lldb/Host/MainLoop.h" #include "lldb/Host/MainLoopBase.h" -#include "lldb/Protocol/MCP/Protocol.h" +#include "lldb/Host/Socket.h" +#include "lldb/Initialization/SystemInitializerCommon.h" +#include "lldb/Initialization/

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-12 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/158340 This brings back the tool for listing debuggers. This is helpful when an LLM doesn't support resources, like gemini-cli. I also fixed an issue with `ServerInfoHandle` not always cleaning up the `~/lldb/lldb-mcp

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-12 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158340 >From aab75bdd91f15a3dde3a6ac9fbf7804461fa8951 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 11:10:31 -0700 Subject: [PATCH 1/2] [lldb-mcp] Adding a tool to list debuggers again. This bring

[Lldb-commits] [lldb] [lldb-mcp] Adding a tool to list debuggers again. (PR #158340)

2025-09-12 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/158340 >From 465f9379664cd9178fd226967da9a6ab680cbf2a Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 12 Sep 2025 11:10:31 -0700 Subject: [PATCH 1/2] [lldb-mcp] Adding a tool to list debuggers again. This bring

[Lldb-commits] [lldb] [lldb-dap] Add invalidated event (PR #157530)

2025-09-12 Thread John Harrison via lldb-commits
@@ -91,8 +94,13 @@ WriteMemoryRequestHandler::Run( if (bytes_written == 0) { return llvm::make_error(write_error.GetCString()); } - protocol::WriteMemoryResponseBody response; + WriteMemoryResponseBody response; response.bytesWritten = bytes_written; + + // Also s

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

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

[Lldb-commits] [lldb] [lldb-dap] Add invalidated event (PR #157530)

2025-09-12 Thread John Harrison via lldb-commits
@@ -440,6 +441,8 @@ def _handle_event(self, packet: Event) -> None: elif event == "capabilities" and body: # Update the capabilities with new ones from the event. self.capabilities.update(body["capabilities"]) +elif event == "invalidated"

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-09 Thread John Harrison via lldb-commits
@@ -7,25 +7,89 @@ //===--===// #include "lldb/Protocol/MCP/Server.h" +#include "lldb/Host/File.h" +#include "lldb/Host/FileSystem.h" +#include "lldb/Host/HostInfo.h" +#include "lldb/Host/JSONTransport.h" #in

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-09 Thread John Harrison via lldb-commits
@@ -7,25 +7,89 @@ //===--===// #include "lldb/Protocol/MCP/Server.h" +#include "lldb/Host/File.h" +#include "lldb/Host/FileSystem.h" +#include "lldb/Host/HostInfo.h" +#include "lldb/Host/JSONTransport.h" #in

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-08 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/157503 >From ec45d323014b15ce7a960fc519ef3782820a44d2 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 8 Sep 2025 09:05:15 -0700 Subject: [PATCH] [lldb-mcp] Auto connect to the first running lldb mcp instance.

[Lldb-commits] [lldb] [lldb-mcp] Auto connect to the first running lldb mcp instance. (PR #157503)

2025-09-08 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/157503 This improves the flow by automatically connecting to an exisitng lldb instance, if one is found. Future improvements include: * Launching a binary if an instance isn't detected. * Multiplexing if multiple inst

[Lldb-commits] [lldb] Default-initialize all fields of lldb_dap::protocol::Symbol. (PR #157150)

2025-09-05 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/157150 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] ensure that dap_symbol is always initialized (PR #156956)

2025-09-05 Thread John Harrison via lldb-commits
ashgti wrote: I'll send an update to initialize all the variables. https://github.com/llvm/llvm-project/pull/156956 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-09-05 Thread John Harrison via lldb-commits
@@ -62,7 +97,11 @@ struct Variables { /// These are the variables evaluated from debug console REPL. llvm::DenseMap m_referencedpermanent_variables; - int64_t m_next_temporary_var_ref{VARREF_FIRST_VAR_IDX}; + /// Key = frame_id + /// Value = (locals, globals Registers)

[Lldb-commits] [lldb] [lldb] Moving MCPTransport into its own file. (PR #156712)

2025-09-04 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/156712 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)

2025-09-04 Thread John Harrison via lldb-commits
@@ -327,6 +348,23 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name, std::unique_lock lock(dap_sessions_mutex); dap_sessions.erase(&loop); std::notify_all_at_thread_exit(dap_sessions_condition, std::move(lock)); + + if (t

[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)

2025-09-04 Thread John Harrison via lldb-commits
@@ -327,6 +348,23 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name, std::unique_lock lock(dap_sessions_mutex); dap_sessions.erase(&loop); std::notify_all_at_thread_exit(dap_sessions_condition, std::move(lock)); + + if (t

[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)

2025-09-04 Thread John Harrison via lldb-commits
@@ -509,6 +547,17 @@ int main(int argc, char *argv[]) { } if (!connection.empty()) { +int ttl = 0; ashgti wrote: nit: Could this be `ttl_ms` or maybe a `std::chrono::milliseconds` instead of an `int`? https://github.com/llvm/llvm-project/pull/156803

[Lldb-commits] [lldb] [lldb-dap] Add new optional argument `time-to-live` when using `--connection` (PR #156803)

2025-09-04 Thread John Harrison via lldb-commits
@@ -327,6 +348,23 @@ serveConnection(const Socket::SocketProtocol &protocol, const std::string &name, std::unique_lock lock(dap_sessions_mutex); dap_sessions.erase(&loop); std::notify_all_at_thread_exit(dap_sessions_condition, std::move(lock)); + + if (t

[Lldb-commits] [lldb] [lldb] Moving MCPTransport into its own file. (PR #156712)

2025-09-03 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/156712 >From de461689fdfc19e3c4bca841fb693bef59c66253 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 3 Sep 2025 09:18:45 -0700 Subject: [PATCH 1/2] [lldb] Moving MCPTransport into its own file. Moving `lldb_pr

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

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

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-29 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/8] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-08-29 Thread John Harrison via lldb-commits
@@ -9,6 +9,7 @@ #ifndef LLDB_TOOLS_LLDB_DAP_JSONUTILS_H #define LLDB_TOOLS_LLDB_DAP_JSONUTILS_H +#include "DAP.h" ashgti wrote: We have DAPForward on line 13, do we need the full DAP here? https://github.com/llvm/llvm-project/pull/124232

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-08-29 Thread John Harrison via lldb-commits
@@ -103,3 +120,76 @@ lldb::SBValue Variables::FindVariable(uint64_t variablesReference, } return variable; } + +std::optional +Variables::GetScopeKind(const int64_t variablesReference) { + auto scope_kind_iter = m_scope_kinds.find(variablesReference); + if (scope_kind_it

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-08-29 Thread John Harrison via lldb-commits
@@ -11,6 +11,7 @@ #include "ExceptionBreakpoint.h" #include "LLDBUtils.h" #include "ProtocolUtils.h" +#include "Variables.h" ashgti wrote: Is variables needed any here? I don't see any usage... https://github.com/llvm/llvm-project/pull/124232

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-08-29 Thread John Harrison via lldb-commits
@@ -103,3 +120,76 @@ lldb::SBValue Variables::FindVariable(uint64_t variablesReference, } return variable; } + +std::optional +Variables::GetScopeKind(const int64_t variablesReference) { + auto scope_kind_iter = m_scope_kinds.find(variablesReference); + if (scope_kind_it

[Lldb-commits] [lldb] lldb-dap: Stop using replicated variable ids (PR #124232)

2025-08-29 Thread John Harrison via lldb-commits
@@ -103,3 +119,55 @@ lldb::SBValue Variables::FindVariable(uint64_t variablesReference, } return variable; } + +std::optional +Variables::GetScopeKind(const int64_t variablesReference) { + auto iter = m_scope_kinds.find(variablesReference); + if (iter != m_scope_kinds.en

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/8] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/7] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/6] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/3] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
@@ -104,6 +104,43 @@ llvm::Error ProtocolServerMCP::Start(ProtocolServer::Connection connection) { if (llvm::Error error = handles.takeError()) return error; + auto listening_uris = m_listener->GetListeningConnectionURI(); + if (listening_uris.empty()) +return cre

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
@@ -104,6 +104,43 @@ llvm::Error ProtocolServerMCP::Start(ProtocolServer::Connection connection) { if (llvm::Error error = handles.takeError()) return error; + auto listening_uris = m_listener->GetListeningConnectionURI(); + if (listening_uris.empty()) +return cre

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
@@ -14,11 +14,23 @@ #include "lldb/Protocol/MCP/Resource.h" #include "lldb/Protocol/MCP/Tool.h" #include "lldb/Protocol/MCP/Transport.h" +#include "lldb/lldb-types.h" #include "llvm/ADT/StringMap.h" #include "llvm/Support/Error.h" +#include "llvm/Support/JSON.h" namespace

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH 1/2] [lldb] Adjust ProtocolServer connection defaults. This adjus

[Lldb-commits] [lldb] [lldb] Add lldbHost dependency to lldbProtocolMCP (PR #155811)

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

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-27 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155714 >From 831a505e3e8368cf2ee5cae995b8920fbc8d2365 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 15:58:04 -0700 Subject: [PATCH] [lldb] Adjust ProtocolServer connection defaults. This adjusts t

[Lldb-commits] [lldb] [lldb] Correct a usage after a rename was merged. (PR #155720)

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

[Lldb-commits] [lldb] [lldb] Correct a usage after a rename was merged. (PR #155720)

2025-08-27 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/155720 Fixes lldb-mcp, aa71d95 was merged after 71a065e. >From 6630ce4639806ea392f3ad3a1b36bf6c40b423f2 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 27 Aug 2025 16:30:14 -0700 Subject: [PATCH] [lldb] Correct

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-27 Thread John Harrison via lldb-commits
ashgti wrote: Right now, I wasn't entirely sure how to make the MCP server's fully unique on the host or what information we need to store about the servers, so I'm currently using the lldb pid to make the files unique. That could be replaced in the future by something else a UUID or hash. ht

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

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

[Lldb-commits] [lldb] [lldb] NFC Moving mcp::Transport into its own file. (PR #155711)

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

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
@@ -0,0 +1,80 @@ +//===--===// +// +// 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: Apac

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/155708 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-27 Thread John Harrison via lldb-commits
ashgti wrote: This is built on #155711, so I'll leave it as a draft until that is in. https://github.com/llvm/llvm-project/pull/155714 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commit

[Lldb-commits] [lldb] [lldb] Adjust ProtocolServer connection defaults. (PR #155714)

2025-08-27 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/155714 This adjusts the ProtocolServer command to default to create a new connection listening on `localhost:0` and adds a new `ServerMetadata` details to `~/.lldb/mcp/lldb-.json` to record information about the curren

[Lldb-commits] [lldb] [lldb] NFC Moving mcp::Transport into its own file. (PR #155711)

2025-08-27 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/155711 Moving `lldb_protocol::mcp::MCPTransport` out of Server.h and into its own file and simplifying the name to `Transport`. >From b10f3ffca74e08234960fc0a3d4dfb5431d901ee Mon Sep 17 00:00:00 2001 From: John Harriso

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
@@ -0,0 +1,21 @@ + +http://www.apple.com/DTDs/PropertyList-1.0.dtd";> + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.lldb-dap + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + lldb-dap ---

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
@@ -0,0 +1,80 @@ +//===--===// +// +// 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: Apac

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
@@ -0,0 +1,80 @@ +//===--===// +// +// 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: Apac

[Lldb-commits] [lldb] [lldb] Add lldb-mcp scaffolding (PR #155708)

2025-08-27 Thread John Harrison via lldb-commits
@@ -0,0 +1,21 @@ + +http://www.apple.com/DTDs/PropertyList-1.0.dtd";> + + + CFBundleDevelopmentRegion + English + CFBundleIdentifier + com.apple.lldb-dap ashgti wrote: com.apple.lldb-mcp? https://github.com/llvm/llvm-project/pull/155708 _

[Lldb-commits] [lldb] [lldb-dap] Adding exception handling for dap server disconnect and terminations in lldbdap_testcase.py (PR #155335)

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

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

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

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
@@ -198,12 +207,165 @@ struct ToolDefinition { // JSON Schema for the tool's parameters. std::optional inputSchema; }; - llvm::json::Value toJSON(const ToolDefinition &); bool fromJSON(const llvm::json::Value &, ToolDefinition &, llvm::json::Path); using ToolArguments

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155460 >From 8b89bfa1a114dd45bbd0b8023540112654f8590b Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 26 Aug 2025 10:56:45 -0700 Subject: [PATCH 1/3] [lldb] Adding structured types for existing MCP calls. This

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155460 >From 8b89bfa1a114dd45bbd0b8023540112654f8590b Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 26 Aug 2025 10:56:45 -0700 Subject: [PATCH 1/2] [lldb] Adding structured types for existing MCP calls. This

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/155460 >From 8b89bfa1a114dd45bbd0b8023540112654f8590b Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 26 Aug 2025 10:56:45 -0700 Subject: [PATCH 1/2] [lldb] Adding structured types for existing MCP calls. This

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
@@ -81,6 +81,10 @@ bool operator==(const Request &a, const Request &b) { return a.id == b.id && a.method == b.method && a.params == b.params; } +void PrintTo(const Request &req, std::ostream *os) { + *os << formatv("{0}", toJSON(req)).str(); +} ashgti wrote

[Lldb-commits] [lldb] [lldb] Creating a new Binder helper for JSONRPC transport. (PR #155315)

2025-08-26 Thread John Harrison via lldb-commits
https://github.com/ashgti converted_to_draft https://github.com/llvm/llvm-project/pull/155315 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Creating a new Binder helper for JSONRPC transport. (PR #155315)

2025-08-26 Thread John Harrison via lldb-commits
ashgti wrote: > Let's split out the changes to the protocol, we can land and test those > independently and that would simplify this patch a lot. I also think all the > socket code is (not yet) necessary. Split the protocol changes into #155460 and I'll also add another to move the MCPTranspo

[Lldb-commits] [lldb] [lldb] Adding structured types for existing MCP calls. (PR #155460)

2025-08-26 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/155460 This adds or renames existing types to match the names of the types on https://modelcontextprotocol.io/specification/2025-06-18/schema for the existing calls. The new types are used in the unit tests and server

[Lldb-commits] [lldb] [lldb-dap] Adding exception handling for dap server disconnect and terminations in lldbdap_testcase.py (PR #155335)

2025-08-26 Thread John Harrison via lldb-commits
@@ -466,8 +466,15 @@ def attach( # if we throw an exception during the test case. def cleanup(): if disconnectAutomatically: -self.dap_server.request_disconnect(terminateDebuggee=True) -self.dap_server.terminate() +

[Lldb-commits] [lldb] [lldb] Creating a new Binder helper for JSONRPC transport. (PR #155315)

2025-08-25 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/155315 The `lldb_protocol::mcp::Binder` class is used to craft bindings between requests and notifications to specific handlers. This supports both incoming and outgoing handlers that bind these functions to a Message

[Lldb-commits] [lldb] [lldb][lldb-dap] parse `pathFormat` as an optional (PR #155238)

2025-08-25 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/155238 ___ 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 'completions' to structured types. (PR #153317)

2025-08-22 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/153317 ___ 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 'completions' to structured types. (PR #153317)

2025-08-21 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/153317 >From 3db3a7184eb7d729c37f7dc02f826c77df8c65e9 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Aug 2025 16:23:18 -0700 Subject: [PATCH 1/6] [lldb-dap] Migrating 'completions' to structured types. This

[Lldb-commits] [lldb] [lldb-dap] Migrating 'completions' to structured types. (PR #153317)

2025-08-21 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/153317 >From 3db3a7184eb7d729c37f7dc02f826c77df8c65e9 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Aug 2025 16:23:18 -0700 Subject: [PATCH 1/5] [lldb-dap] Migrating 'completions' to structured types. This

[Lldb-commits] [lldb] [lldb-dap] Migrating 'completions' to structured types. (PR #153317)

2025-08-21 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/153317 >From 3db3a7184eb7d729c37f7dc02f826c77df8c65e9 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 12 Aug 2025 16:23:18 -0700 Subject: [PATCH 1/6] [lldb-dap] Migrating 'completions' to structured types. This

[Lldb-commits] [lldb] Reapply "[lldb-dap] Re-land refactor of DebugCommunication. (#147787)" (PR #154832)

2025-08-21 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/154832 This reverts commit 0f33b90b6117bcfa6ca3779c641c1ee8d03590fd and includes a fix for the added test that was submitted between my last update and pull. >From ff17fd28c43d1109c8cb6057c628ad6f4b541242 Mon Sep 17 00

[Lldb-commits] [lldb] [lldb-dap] Re-land refactor of DebugCommunication. (PR #147787)

2025-08-21 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/147787 ___ 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   7   8   9   10   >