[Lldb-commits] [lldb] [lldb-dap] Correcting the types for launch and attach requests. (PR #137365)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137365 There were a few types that were incorrectly specified in the lldb-dap/package.json. The 'timeout' field was set to 'string' but is interpreted as an integer number of seconds and 'args' for launch is handled as

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/133624 ___ 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 the 'stepOut' request to use typed RequestHandler. (PR #137362)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137362 This moves the 'stepOut' request to the typed RequestHandler. >From 853cbbaf00f80ef42f916d72ed5a0e14b7c848be Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 25 Apr 2025 09:46:43 -0700 Subject: [PATCH] [l

[Lldb-commits] [lldb] [lldb] Emit diagnostics as "important" output (PR #137280)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/137280 ___ 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 formatting chrono::seconds warning. (PR #137371)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137371 >From b509831348617bb67298b5dbcdfad9bcf8f0ca55 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 25 Apr 2025 10:31:18 -0700 Subject: [PATCH] [lldb-dap] Fix formatting chrono::seconds. --- lldb/tools/lldb-

[Lldb-commits] [lldb] [lldb-dap] Support the Module Event (PR #137380)

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

[Lldb-commits] [lldb] [lldb-dap] Mitigate a build error on Windows. (PR #137388)

2025-04-25 Thread John Harrison via lldb-commits
ashgti wrote: It seems to work with MSVC 2022, so I guess its something to do with the way `std::future` is implemented in the 2019 version. https://github.com/llvm/llvm-project/pull/137388 ___ lldb-commits mailing list lldb-commits@lists.llvm.org htt

[Lldb-commits] [lldb] [lldb-dap] Mitigate a build error on Windows. (PR #137388)

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

[Lldb-commits] [lldb] [lldb-dap] Correcting the types for launch and attach requests. (PR #137365)

2025-04-25 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/137365 ___ 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 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/133624 >From 3240fe49515e5f59c5b9ff9c02423b77504d8a43 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 28 Mar 2025 14:02:53 -0700 Subject: [PATCH 1/6] [lldb-dap] Refactoring lldb-dap 'launch' request to use type

[Lldb-commits] [lldb] [lldb-dap] Improve error reporting dap command arguments. (PR #135684)

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

[Lldb-commits] [lldb] [lldb-dap] Improve error reporting for dap command arguments. (PR #135684)

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

[Lldb-commits] [lldb] [lldb-dap] Improve error reporting for dap command arguments. (PR #135684)

2025-04-15 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/135684 ___ 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 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/133624 >From 3240fe49515e5f59c5b9ff9c02423b77504d8a43 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 28 Mar 2025 14:02:53 -0700 Subject: [PATCH 1/8] [lldb-dap] Refactoring lldb-dap 'launch' request to use type

[Lldb-commits] [lldb] [lldb-dap] Fix win32 build. (PR #135638)

2025-04-15 Thread John Harrison via lldb-commits
ashgti wrote: > @ashgti Did you test #130169 on Windows? This patch will fix the building, > but I'm not sure that it will work on Windows considering this: SelectHelper has a Windows implementation: https://github.com/llvm/llvm-project/blob/a43ff0ec8a684b2f8e93bb9f6df3b513c577091b/lldb/source

[Lldb-commits] [lldb] [lldb-dap] Imporve error reporting if a command's arguments fail to parse correctly. (PR #135684)

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

[Lldb-commits] [lldb] [lldb-dap] Imporve error reporting if a command's arguments fail to parse correctly. (PR #135684)

2025-04-15 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/135684 Previously the error only contained the failed to parse JSON message, which has no additional context. This improves the error messages and improves the consistency of handling properties in protocol structures

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-15 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/133624 >From 3240fe49515e5f59c5b9ff9c02423b77504d8a43 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 28 Mar 2025 14:02:53 -0700 Subject: [PATCH 1/5] [lldb-dap] Refactoring lldb-dap 'launch' request to use type

[Lldb-commits] [lldb] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-15 Thread John Harrison via lldb-commits
@@ -33,15 +35,12 @@ MakeArgv(const llvm::ArrayRef &strs) { return argv; } -static uint32_t SetLaunchFlag(uint32_t flags, const llvm::json::Object *obj, - llvm::StringRef key, lldb::LaunchFlags mask) { - if (const auto opt_value = GetBoolean(obj,

[Lldb-commits] [lldb] [llvm] [lldb-dap] migrate set breakpoint requests (PR #137448)

2025-04-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/137448 ___ 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] migrate set breakpoint requests (PR #137448)

2025-04-27 Thread John Harrison via lldb-commits
@@ -322,6 +323,186 @@ enum SteppingGranularity : unsigned { bool fromJSON(const llvm::json::Value &, SteppingGranularity &, llvm::json::Path); +/// Information about a breakpoint created in `setBreakpoints`, +/// `setFunctionBreakpoints`, `setInstructionBreakpoin

[Lldb-commits] [lldb] Fix the lldb-dap error when empty source map is specified (PR #137722)

2025-04-28 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Should we also add a test for the `attach` request as well? https://github.com/llvm/llvm-project/pull/137722 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/

[Lldb-commits] [lldb] Fix the lldb-dap error when empty source map is specified (PR #137722)

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

[Lldb-commits] [lldb] [lldb-dap] Adding an icon to the lldb-dap package. (PR #137695)

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

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

2025-04-28 Thread John Harrison via lldb-commits
ashgti wrote: @eronnen this should resolve #134564 https://github.com/llvm/llvm-project/pull/137694 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adding an icon to the lldb-dap package. (PR #137695)

2025-04-28 Thread John Harrison via lldb-commits
ashgti wrote: Resolves #137294 https://github.com/llvm/llvm-project/pull/137695 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

2025-04-28 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137694 This adds support for loading user level defaults in VSCode. The defaults are stored as basic settings that are loaded when the debug configuration is resolved. Not all settings are currently supported, I limite

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

2025-04-29 Thread John Harrison via lldb-commits
ashgti wrote: Okay, how about this, I updated the settings to break things into 2 categories "Adapter" settings and "Defaults". This is presented in the UI like this https://github.com/user-attachments/assets/5ab13737-91fb-44a3-934c-b0dd5dd782c9"; /> And removes `defaults` from the settings

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

2025-04-29 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137694 >From 7de424db38e5decff9ce511bea9ff07f32509391 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 28 Apr 2025 12:11:52 -0700 Subject: [PATCH 1/3] [lldb-dap] Adding defaults to VSCode settings for user level

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -13,168 +13,66 @@ namespace lldb_dap { -// "SetVariableRequest": { -// "allOf": [ { "$ref": "#/definitions/Request" }, { -// "type": "object", -// "description": "setVariable request; value of command field is -// 'setVariable'. Set the variable with the give

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -13,168 +13,66 @@ namespace lldb_dap { -// "SetVariableRequest": { -// "allOf": [ { "$ref": "#/definitions/Request" }, { -// "type": "object", -// "description": "setVariable request; value of command field is -// 'setVariable'. Set the variable with the give

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -13,168 +13,66 @@ namespace lldb_dap { -// "SetVariableRequest": { -// "allOf": [ { "$ref": "#/definitions/Request" }, { -// "type": "object", -// "description": "setVariable request; value of command field is -// 'setVariable'. Set the variable with the give

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -294,6 +294,75 @@ bool fromJSON(const llvm::json::Value &, LaunchRequestArguments &, /// field is required. using LaunchResponseBody = VoidResponse; +/// Arguments for `setVariable` request. +struct SetVariableArguments { + /// The reference of the variable container. The

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -13,168 +13,66 @@ namespace lldb_dap { -// "SetVariableRequest": { -// "allOf": [ { "$ref": "#/definitions/Request" }, { -// "type": "object", -// "description": "setVariable request; value of command field is -// 'setVariable'. Set the variable with the give

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -13,168 +13,66 @@ namespace lldb_dap { -// "SetVariableRequest": { -// "allOf": [ { "$ref": "#/definitions/Request" }, { -// "type": "object", -// "description": "setVariable request; value of command field is -// 'setVariable'. Set the variable with the give

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -430,17 +430,20 @@ class ScopesRequestHandler : public LegacyRequestHandler { void operator()(const llvm::json::Object &request) const override; }; -class SetVariableRequestHandler : public LegacyRequestHandler { +class SetVariableRequestHandler final ash

[Lldb-commits] [lldb] [lldb][lldb-dap] use the new protocol for setVariable requests. (PR #137803)

2025-04-29 Thread John Harrison via lldb-commits
@@ -294,6 +294,75 @@ bool fromJSON(const llvm::json::Value &, LaunchRequestArguments &, /// field is required. using LaunchResponseBody = VoidResponse; +/// Arguments for `setVariable` request. +struct SetVariableArguments { + /// The reference of the variable container. The

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-01 Thread John Harrison via lldb-commits
@@ -417,8 +424,11 @@ struct DAP { lldb::SBMutex GetAPIMutex() const { return target.GetAPIMutex(); } private: - std::mutex m_queue_mutex; + /// Queue for all incoming messages. std::deque m_queue; + /// Dedicated queue for launching and attaching. + std::deque m_launc

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-01 Thread John Harrison via lldb-commits
@@ -161,20 +161,22 @@ static void EventThreadFunction(DAP &dap) { case lldb::eStateSuspended: break; case lldb::eStateStopped: ashgti wrote: May be unrelated but in [`lldb_private::StateIsRunningState`](https://github.com/llvm/

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-01 Thread John Harrison via lldb-commits
@@ -161,20 +161,22 @@ static void EventThreadFunction(DAP &dap) { case lldb::eStateSuspended: break; case lldb::eStateStopped: -// We launch and attach in synchronous mode then the first stop -// event will not be delivere

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

2025-05-01 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137911 >From a43b90dba56bd411b09257d47e3a3091faa09efd Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 29 Apr 2025 17:36:46 -0700 Subject: [PATCH 1/4] [lldb-dap] Migrate attach to typed RequestHandler. This upda

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

2025-05-01 Thread John Harrison via lldb-commits
@@ -675,12 +675,11 @@ lldb::SBTarget DAP::CreateTarget(lldb::SBError &error) { // enough information to determine correct arch and platform (or ELF can be // omitted at all), so it is good to leave the user an opportunity to specify // those. Any of those three can be lef

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

2025-05-01 Thread John Harrison via lldb-commits
@@ -1213,12 +1212,13 @@ void DAP::ConfigureSourceMaps() { void DAP::SetConfiguration(const protocol::Configuration &config, bool is_attach) { configuration = config; + stop_at_entry = config.stopOnEntry; this->is_attach = is_attach; - if (con

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

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

[Lldb-commits] [lldb] [lldb-dap] Adding defaults to VSCode settings for user level defaults. (PR #137694)

2025-05-02 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137694 Rate limit ยท GitHub body { background-color: #f6f8fa; color: #24292e; font-family: -apple-system,BlinkMacSystemFont,Segoe UI,Helvetica,Arial,sans-se

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-02 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Yesterday I enabled all the lldb-dap tests that support macOS and I noticed #138197 where some tests `attach` failed due to attaching to a parallel test process. I was consistently hitting it on my MBP but I think due to timing not on my Ma

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-02 Thread John Harrison via lldb-commits
@@ -333,6 +333,7 @@ def attach( exitCommands=None, attachCommands=None, coreFile=None, +stopOnAttach=True, ashgti wrote: Sounds good, we can follow up with some other improvements to tests. https://github.com/llvm/llvm-project/

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

2025-05-02 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137911 >From a43b90dba56bd411b09257d47e3a3091faa09efd Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 29 Apr 2025 17:36:46 -0700 Subject: [PATCH 1/5] [lldb-dap] Migrate attach to typed RequestHandler. This upda

[Lldb-commits] [lldb] [lldb-dap] Migrate attach to typed RequestHandler. (PR #137911)

2025-05-02 Thread John Harrison via lldb-commits
ashgti wrote: > It is also ignored in the `SetFrame/ThreadFormat` functions. I am not sure if > we should accept it as it also valid in the command line Updated to remove the `.empty()` check. https://github.com/llvm/llvm-project/pull/137911 ___ lldb

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-02 Thread John Harrison via lldb-commits
@@ -333,6 +333,7 @@ def attach( exitCommands=None, attachCommands=None, coreFile=None, +stopOnAttach=True, ashgti wrote: Should we default this to `False`? Or should we have the `DAPTestCaseBase` case `attach` and `launch` help

[Lldb-commits] [lldb] [lldb-dap] Change the launch sequence (PR #138219)

2025-05-02 Thread John Harrison via lldb-commits
@@ -591,6 +591,7 @@ def request_attach( attachCommands=None, terminateCommands=None, coreFile=None, +stopOnAttach=True, ashgti wrote: Should we default to `False` for attach requests? https://github.com/llvm/llvm-project/pull/1

[Lldb-commits] [lldb] [lldb-dap] Fix the package.json and format lldb-dap typescript. (PR #138918)

2025-05-07 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/138918 >From 05b709033990e6cdfd7cb9fdbd7e8eab260e7a62 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 7 May 2025 10:46:55 -0700 Subject: [PATCH] [lldb-dap] Fix package.json after a bad merge. The package.json i

[Lldb-commits] [lldb] [lldb-dap] Fix package.json after a bad merge. (PR #138918)

2025-05-07 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/138918 ___ 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 package.json after a bad merge. (PR #138918)

2025-05-07 Thread John Harrison via lldb-commits
ashgti wrote: > @ashgti Hey John, do you mind splitting this patch? Sure, I'll make this fixing the package.json. > As for the package.json, do we have any tests that try to npm build? Should > we add them? I don't think they're run as part of the CI today. We could see if there is some way

[Lldb-commits] [lldb] [lldb-dap] Format extension typescript. (PR #138925)

2025-05-07 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/138925 I think the format checker isn't checking typescript files. I ran `npm run format` to fix the extenion typescript. >From 389bcb54b146ff707933146d561a272024f415fb Mon Sep 17 00:00:00 2001 From: John Harrison Dat

[Lldb-commits] [lldb] [lldb-dap] Fix package.json after a bad merge. (PR #138918)

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

[Lldb-commits] [lldb] [lldb-dap] Implement a MemoryMonitor for macOS & Linux (PR #129332)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Looks great! https://github.com/llvm/llvm-project/pull/129332 ___ 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 process picker command to VS Code extension (PR #128943)

2025-02-28 Thread John Harrison via lldb-commits
@@ -0,0 +1,38 @@ +import { ChildProcessWithoutNullStreams, spawn } from "child_process"; +import { BaseProcessTree, ProcessTreeParser } from "../base-process-tree"; + +export class LinuxProcessTree extends BaseProcessTree { + protected override spawnProcess(): ChildProcessWithout

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/129294 >From 8d466e5c4b1b6913e788fd11d46689af8f0b8eec Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 27 Feb 2025 15:33:51 -0800 Subject: [PATCH 1/2] [lldb-dap] Updating the logging of lldb-dap to use existing

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/128957 ___ 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 the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
ashgti wrote: Also, for reference, this does change the output format. ``` $ cat lldb-test-build.noindex/tools/lldb-dap/launch/TestDAP_launch.test_termination/dap.txt 1740771506.578514099 stdin/stdout --> {"command":"disconnect","type":"request","arguments":{},"seq":1} 1740771506.578675032 std

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/129294 Today, logging is handling by a simple `std::ofstream *` for handling logging. LLDBLog.h can help improve logging by adding new categories of logs and give us additional formatting support for log messages. We

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti ready_for_review https://github.com/llvm/llvm-project/pull/129294 ___ 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 the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/129294 ___ 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 process picker command to VS Code extension (PR #128943)

2025-02-28 Thread John Harrison via lldb-commits
@@ -0,0 +1,102 @@ +import { ChildProcessWithoutNullStreams } from "child_process"; +import { Process, ProcessTree } from "."; +import { Transform } from "stream"; + +/** Parses process information from a given line of process output. */ +export type ProcessTreeParser = (line: stri

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/129294 >From 8d466e5c4b1b6913e788fd11d46689af8f0b8eec Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 27 Feb 2025 15:33:51 -0800 Subject: [PATCH 1/3] [lldb-dap] Updating the logging of lldb-dap to use existing

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
@@ -0,0 +1,34 @@ +//===-- DAPLog.h *- C++ -*-===// ashgti wrote: Done. https://github.com/llvm/llvm-project/pull/129294 ___ lldb-commits mailing list lldb-commits@lists.

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
@@ -0,0 +1,22 @@ +#include "DAPLog.h" ashgti wrote: Added https://github.com/llvm/llvm-project/pull/129294 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/129294 >From 8d466e5c4b1b6913e788fd11d46689af8f0b8eec Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 27 Feb 2025 15:33:51 -0800 Subject: [PATCH 1/3] [lldb-dap] Updating the logging of lldb-dap to use existing

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-28 Thread John Harrison via lldb-commits
@@ -115,41 +123,71 @@ export class LLDBDapDescriptorFactory } const configEnvironment = config.get<{ [key: string]: string }>("environment") || {}; -const dapPath = await getDAPExecutable(session); +const dapPath = (await getDAPExecutable(session)) ?? exec

[Lldb-commits] [lldb] [lldb-dap] Updating the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-02-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/129294 >From 8d466e5c4b1b6913e788fd11d46689af8f0b8eec Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 27 Feb 2025 15:33:51 -0800 Subject: [PATCH] [lldb-dap] Updating the logging of lldb-dap to use existing LLDB

[Lldb-commits] [lldb] [lldb-dap] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-28 Thread John Harrison via lldb-commits
@@ -115,41 +123,71 @@ export class LLDBDapDescriptorFactory } const configEnvironment = config.get<{ [key: string]: string }>("environment") || {}; -const dapPath = await getDAPExecutable(session); +const dapPath = (await getDAPExecutable(session)) ?? exec

[Lldb-commits] [lldb] [lldb-dap] Implement a MemoryMonitor for macOS & Linux (PR #129332)

2025-03-01 Thread John Harrison via lldb-commits
@@ -0,0 +1,114 @@ +//===-- MemoryMonitor.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] Implement a MemoryMonitor for macOS & Linux (PR #129332)

2025-03-02 Thread John Harrison via lldb-commits
@@ -0,0 +1,114 @@ +//===-- MemoryMonitor.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] Adding server mode support to lldb-dap VSCode extension. (PR #128957)

2025-02-28 Thread John Harrison via lldb-commits
ashgti wrote: > Random question: what happens when the server crashes? Do you get a popup in > the UI telling you? If the server is killed while the debug session is running then the debug session stops. This is the same behavior as today when running not in server mode. If the server crashe

[Lldb-commits] [lldb] [lldb-dap] Restore the override FD used by the output redirect on stop. (PR #129964)

2025-03-07 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/129964 ___ 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 naming and documentation to follow style guide. (PR #130202)

2025-03-06 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/130202 Updating the naming and adding documentation to better follow the style guide. >From a0e065631c5cd071ccf371aa647dd206a99b4054 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Fri, 7 Mar 2025 00:13:53 +0100 Sub

[Lldb-commits] [lldb] [lldb-dap] Updating naming and documentation to follow style guide. (PR #130202)

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

[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] Replace Get{Signed, Unsigned} with GetInteger (NFC) (PR #129823)

2025-03-04 Thread John Harrison via lldb-commits
@@ -131,11 +131,13 @@ void BreakpointLocationsRequestHandler::operator()( auto *arguments = request.getObject("arguments"); auto *source = arguments->getObject("source"); std::string path = GetString(source, "path").str(); - uint64_t start_line = GetUnsigned(arguments, "

[Lldb-commits] [lldb] [lldb-dap] Return a std::optional from GetBoolean (NFC) (PR #129818)

2025-03-04 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/129818 ___ 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 the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-03-04 Thread John Harrison via lldb-commits
@@ -0,0 +1,30 @@ +//===-- DAPLog.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: Apa

[Lldb-commits] [lldb] [lldb-dap] Replace Get{Signed, Unsigned} with GetInteger (NFC) (PR #129823)

2025-03-04 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/129823 ___ 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 the logging of lldb-dap to use existing LLDBLog. (PR #129294)

2025-03-04 Thread John Harrison via lldb-commits
ashgti wrote: > The more I think about it, the less I like the idea of using `LLDBLog` in > `lldb-dap`. Initially, I liked the idea of reusing our existing logging > implementation, although I have expressed my concern about relying on > `liblldb` in other PRs. But the issues and workarounds w

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

2025-03-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130026 >From a53fafd8b63ce874166a1893fe3fe5abc912509a Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 10:18:36 +0100 Subject: [PATCH] [lldb-dap] Refactoring IOStream into Transport handler. Instead o

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

2025-03-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130026 >From 228369443a418e23f82ddc47371f7531bd4a9cb7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 10:18:36 +0100 Subject: [PATCH] [lldb-dap] Refactoring IOStream into Transport handler. Instead o

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

2025-03-06 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130090 >From 228369443a418e23f82ddc47371f7531bd4a9cb7 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 10:18:36 +0100 Subject: [PATCH 1/2] [lldb-dap] Refactoring IOStream into Transport handler. Inste

[Lldb-commits] [lldb] [lldb-dap] Adding support for well typed events. (PR #130104)

2025-03-06 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/130104 This adds a mechanism for registering well typed events with the DAP. For a proof of concept, this updates the 'exited' event to use the new protocol serialization handlers and updates the call sites to use the n

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

2025-03-06 Thread John Harrison via lldb-commits
ashgti wrote: #130090 is a follow up to add improved type handling to `RequestHandler` for encoding / decoding. https://github.com/llvm/llvm-project/pull/130026 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[Lldb-commits] [lldb] [lldb-dap] Adding support for well typed events. (PR #130104)

2025-03-06 Thread John Harrison via lldb-commits
ashgti wrote: This builds on #130090 and #130026 https://github.com/llvm/llvm-project/pull/130104 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Restore the override FD used by the output redirect on stop. (PR #129964)

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

[Lldb-commits] [lldb] [lldb-dap] Restore the override FD used by the output redirect on stop. (PR #129964)

2025-03-05 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/129964 While running lldb-dap over stdin/stdout the `stdout` and `stderr` FD's are replaced with a pipe that is reading the output to forward to the dap client. During shutdown we were not properly restoring those FDs,

[Lldb-commits] [lldb] [lldb-dap] Restore the override FD used by the output redirect on stop. (PR #129964)

2025-03-05 Thread John Harrison via lldb-commits
ashgti wrote: Checking this with: ``` $ echo 'Content-Length: 51\r\n\r\n{"command":"disconnect","seq": 1,"type": "request"' > /tmp/partial_message $ lldb lldb-dap (lldb) process handle -s true SIGPIPE (lldb) process launch -i /tmp/partial_message ``` Without the `LLDBDAP_LOG` env set is how I

[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
ashgti wrote: I didn't realize the suggestion only updated the variable name in the parameter, sorry! https://github.com/llvm/llvm-project/pull/130186 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

<    1   2   3   4   5   6   7   8   9   10   >