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

2025-04-30 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Looks great! https://github.com/llvm/llvm-project/pull/137803 ___ 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 raciness in launch and attach tests (PR #137920)

2025-04-30 Thread John Harrison via lldb-commits
ashgti wrote: We could block the DAP queue until we get the stop event before we send the `initialized` event maybe. https://github.com/llvm/llvm-project/blob/d7f096e3fe611ae2cc7403c3cf2f88255a47b61d/lldb/tools/lldb-dap/Handler/LaunchRequestHandler.cpp#L70-L77 is where I am thinking we can wai

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

2025-04-30 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/2] [lldb-dap] Migrate attach to typed RequestHandler. This upda

[Lldb-commits] [lldb] [lldb-dap] Add an RAII helper for synchronous mode (NFC) (PR #137900)

2025-04-29 Thread John Harrison via lldb-commits
@@ -235,4 +235,15 @@ std::string GetStringValue(const lldb::SBStructuredData &data) { return str; } +ScopeSyncMode::ScopeSyncMode(lldb::SBDebugger &debugger) +: m_debugger(debugger) { + assert(m_debugger.GetAsync() && "Debugger not in asynchronous mode!");

[Lldb-commits] [lldb] [lldb-dap] Add an RAII helper for synchronous mode (NFC) (PR #137900)

2025-04-29 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. LGTM, that’s helpful for making sure we’re consistent at least https://github.com/llvm/llvm-project/pull/137900 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-b

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

2025-04-29 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137911 This updates the `attach` request to the typed `RequestHandler`. Added a few more overlapping configurations to `lldb_dap::protocol::Configuration` that are shared between launching and attaching. There may b

[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
@@ -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] 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] 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] Fix machine-overridable scope (PR #137723)

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

2025-04-27 Thread John Harrison via lldb-commits
@@ -43,6 +43,32 @@ bool fromJSON(const json::Value &Params, Source &S, json::Path P) { O.map("sourceReference", S.sourceReference); } +static llvm::json::Value ToString(PresentationHint hint) { ashgti wrote: toJSON? Then on line 67 you don't need t

[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] [lldb-dap] Make lldb-dap.executable-path machine specific (PR #137485)

2025-04-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/137485 ___ 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] Migrating breakpointLocations request to use typed RequestHandler (PR #137426)

2025-04-27 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. Awesome! https://github.com/llvm/llvm-project/pull/137426 ___ 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] 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] 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] 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
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137388 When building with MSVC 2019 using `std::future` causes a compile time build error. ``` C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\future(196): error C22

[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] Fix formatting chrono::seconds warning. (PR #137371)

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

[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] 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
@@ -37,14 +39,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] [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-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] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-25 Thread John Harrison via lldb-commits
@@ -37,14 +39,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] [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. 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] Emit diagnostics as "important" output (PR #137280)

2025-04-25 Thread John Harrison via lldb-commits
@@ -117,6 +118,9 @@ static void EventThreadFunction(DAP &dap) { lldb::SBEvent event; lldb::SBListener listener = dap.debugger.GetListener(); dap.broadcaster.AddListener(listener, eBroadcastBitStopEventThread); + dap.debugger.GetBroadcaster().AddListener( + listener,

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

2025-04-24 Thread John Harrison via lldb-commits
@@ -37,14 +39,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] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-24 Thread John Harrison via lldb-commits
@@ -9,127 +9,69 @@ #include "DAP.h" #include "EventHelper.h" #include "JSONUtils.h" +#include "Protocol/ProtocolRequests.h" #include "RequestHandler.h" +#include "llvm/Support/Error.h" #include "llvm/Support/FileSystem.h" +using namespace llvm; +using namespace lldb_dap::pr

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

2025-04-24 Thread John Harrison via lldb-commits
@@ -9,127 +9,69 @@ #include "DAP.h" #include "EventHelper.h" #include "JSONUtils.h" +#include "Protocol/ProtocolRequests.h" #include "RequestHandler.h" +#include "llvm/Support/Error.h" #include "llvm/Support/FileSystem.h" +using namespace llvm; +using namespace lldb_dap::pr

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

2025-04-24 Thread John Harrison via lldb-commits
@@ -672,21 +670,17 @@ DAP::CreateTargetFromArguments(const llvm::json::Object &arguments, // enough information to determine correct arch and platform (or ELF can be // omitted at all), so it is good to leave the user an apportunity to specify // those. Any of those thre

[Lldb-commits] [lldb] [lldb-dap] Support StackFrameFormat (PR #137113)

2025-04-24 Thread John Harrison via lldb-commits
@@ -180,44 +184,53 @@ void StackTraceRequestHandler::operator()( llvm::json::Object body; lldb::SBFormat frame_format = dap.frame_format; + bool include_all = false; ashgti wrote: Should this default to `dap.configuration.displayExtendedBacktrace` and th

[Lldb-commits] [lldb] [lldb-dap] Support StackFrameFormat (PR #137113)

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

[Lldb-commits] [lldb] [lldb-dap] Support StackFrameFormat (PR #137113)

2025-04-24 Thread John Harrison via lldb-commits
@@ -178,14 +179,45 @@ void StackTraceRequestHandler::operator()( llvm::json::Array stack_frames; llvm::json::Object body; + lldb::SBFormat frame_format = dap.frame_format; + + if (const auto *format = arguments->getObject("format")) { +const bool parameters = GetBool

[Lldb-commits] [lldb] [lldb-dap] Support StackFrameFormat (PR #137113)

2025-04-24 Thread John Harrison via lldb-commits
@@ -178,14 +179,45 @@ void StackTraceRequestHandler::operator()( llvm::json::Array stack_frames; llvm::json::Object body; + lldb::SBFormat frame_format = dap.frame_format; + + if (const auto *format = arguments->getObject("format")) { ashgti wrote: Anot

[Lldb-commits] [lldb] [lldb-dap] Support StackFrameFormat (PR #137113)

2025-04-24 Thread John Harrison via lldb-commits
@@ -178,14 +179,45 @@ void StackTraceRequestHandler::operator()( llvm::json::Array stack_frames; llvm::json::Object body; + lldb::SBFormat frame_format = dap.frame_format; + + if (const auto *format = arguments->getObject("format")) { +const bool parameters = GetBool

[Lldb-commits] [lldb] [lldb-dap] fix wrong assembly line number x64 (PR #136486)

2025-04-24 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/136486 ___ 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 wrong assembly line number x64 (PR #136486)

2025-04-24 Thread John Harrison via lldb-commits
@@ -0,0 +1,64 @@ +""" +Test lldb-dap stack trace containing x86 assembly +""" + +import lldbdap_testcase +from lldbsuite.test.decorators import skipUnlessArch, skipUnlessPlatform +from lldbsuite.test.lldbtest import line_number + + +class TestDAP_stacktrace_x86(lldbdap_testcase.DA

[Lldb-commits] [lldb] [lldb-dap] Migrate 'stepIn' request to well structured types. (PR #137071)

2025-04-23 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/137071 Migrates the 'stepIn' request handler to have well structured types instead of raw json values. I also noticed in the 'next' request handler we were not passing the 'RunMode' flag. Updated the 'next' request ha

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

2025-04-23 Thread John Harrison via lldb-commits
ashgti wrote: I updated my branch with main and updated the launch handler to return an `llvm::Error` to simplify the body. https://github.com/llvm/llvm-project/pull/133624 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.o

[Lldb-commits] [lldb] [lldb-dap] Updating the 'next' request handler use well structured types (PR #136642)

2025-04-23 Thread John Harrison via lldb-commits
@@ -8,72 +8,37 @@ #include "DAP.h" #include "EventHelper.h" -#include "JSONUtils.h" +#include "Protocol/ProtocolTypes.h" #include "RequestHandler.h" +#include "llvm/Support/Error.h" + +using namespace llvm; +using namespace lldb_dap::protocol; namespace lldb_dap { -// "N

[Lldb-commits] [lldb] [lldb-dap] Migrate 'stepIn' request to well structured types. (PR #137071)

2025-04-23 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/137071 >From f4f2fea5cebbce550de0e0c3facaac894b9f40b8 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 23 Apr 2025 15:01:53 -0700 Subject: [PATCH 1/2] [lldb-dap] Migrate 'stepIn' request to well structured types

[Lldb-commits] [lldb] [lldb-dap] Updating the 'next' request handler use well structured types (PR #136642)

2025-04-23 Thread John Harrison via lldb-commits
@@ -8,72 +8,37 @@ #include "DAP.h" #include "EventHelper.h" -#include "JSONUtils.h" +#include "Protocol/ProtocolTypes.h" #include "RequestHandler.h" +#include "llvm/Support/Error.h" + +using namespace llvm; +using namespace lldb_dap::protocol; namespace lldb_dap { -// "N

[Lldb-commits] [lldb] [lldb-dap] Ensure we acquire the SB API lock while handling requests. (PR #137026)

2025-04-23 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/137026 ___ 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 'next' request handler use well structured types (PR #136642)

2025-04-23 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/136642 ___ 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 'next' request handler use well structured types (PR #136642)

2025-04-22 Thread John Harrison via lldb-commits
@@ -8,72 +8,37 @@ #include "DAP.h" #include "EventHelper.h" -#include "JSONUtils.h" +#include "Protocol/ProtocolTypes.h" #include "RequestHandler.h" +#include "llvm/Support/Error.h" + +using namespace llvm; +using namespace lldb_dap::protocol; namespace lldb_dap { -// "N

[Lldb-commits] [lldb] [lldb-dap] Updating the 'next' request handler use well structured types (PR #136642)

2025-04-21 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/136642 This updates the 'next' request to use well structured types. While working on this I also simplified the 'RequestHandler' implementation to better handle void responses by allowing requests to return a 'llvm::E

[Lldb-commits] [lldb] [lldb-dap] Remove an incorrect assumption on reverse requests. (PR #136210)

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

[Lldb-commits] [lldb] [lldb-dap] Remove an incorrect assumption on reverse requests. (PR #136210)

2025-04-17 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/136210 Reverse requests do have a 'seq' set still from VSCode. I incorrectly interpreted https://github.com/microsoft/vscode/blob/dede7bb4b7e9c9ec69155a243bb84037a40588fe/src/vs/workbench/contrib/debug/common/abstractD

[Lldb-commits] [lldb] [lldb-dap] Fixing a race during disconnect. (PR #135872)

2025-04-16 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/135872 ___ 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
@@ -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] [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] 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] 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 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] 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] 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] 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] 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 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] Imporve error reporting if a command's arguments fail to parse correctly. (PR #135684)

2025-04-14 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/135684 >From cab7671780bde4d4e2e137f10ced6b5fe504 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 14 Apr 2025 13:22:31 -0700 Subject: [PATCH 1/2] [lldb-dap] Imporve error reporting if a command's arguments

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

2025-04-14 Thread John Harrison via lldb-commits
ashgti wrote: This should fix https://lab.llvm.org/buildbot/#/builders/197/builds/3983 https://github.com/llvm/llvm-project/pull/135638 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-comm

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

2025-04-14 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/135638 ___ 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-14 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] Adding support for cancelling a request. (PR #130169)

2025-04-14 Thread John Harrison via lldb-commits
ashgti wrote: PR #135638 should fix the build failure. https://github.com/llvm/llvm-project/pull/130169 ___ 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 win32 build. (PR #135638)

2025-04-14 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/135638 This enum was not fully specified. >From 1fe129959d425d8f298e111d73cfa88e429e3cfc Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 14 Apr 2025 09:07:48 -0700 Subject: [PATCH] [lldb-dap] Fix win32 build.

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

2025-04-14 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] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-14 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] [lldb-dap] Refactoring lldb-dap 'launch' request to use typed RequestHandler<>. (PR #133624)

2025-04-14 Thread John Harrison via lldb-commits
@@ -9,127 +9,66 @@ #include "DAP.h" #include "EventHelper.h" #include "JSONUtils.h" +#include "Protocol/ProtocolRequests.h" #include "RequestHandler.h" #include "llvm/Support/FileSystem.h" namespace lldb_dap { -// "LaunchRequest": { -// "allOf": [ { "$ref": "#/definiti

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

2025-04-14 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/130169 ___ 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 a DAPError for showing users error messages. (PR #132255)

2025-04-05 Thread John Harrison via lldb-commits
@@ -0,0 +1,33 @@ +//===-- DAPError.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] Adding support for well typed events. (PR #130104)

2025-04-05 Thread John Harrison via lldb-commits
@@ -316,6 +316,36 @@ struct Source { bool fromJSON(const llvm::json::Value &, Source &, llvm::json::Path); llvm::json::Value toJSON(const Source &); +// MARK: Events + +// "ExitedEvent": { +// "allOf": [ { "$ref": "#/definitions/Event" }, { +// "type": "object", +//

[Lldb-commits] [lldb] [lldb-dap] Swapping to not use FLAG_ENUM and just defining typed enums. (PR #133622)

2025-04-05 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/133622 ___ 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 support for well typed events. (PR #130104)

2025-04-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/130104 >From 2c51a8bdb27764a358e76e554d693a4af57074fc Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 6 Mar 2025 14:13:58 +0100 Subject: [PATCH] [lldb-dap] Adding support for well typed events. This adds a mech

[Lldb-commits] [lldb] [lldb-dap] Make the DAP server resilient against broken pipes (PR #133791)

2025-04-05 Thread John Harrison via lldb-commits
ashgti wrote: I did that while I was trying to figure out how to have `cancel` request support. I was trying to close the FD to stop the reader thread, but that actually doesn't interrupt in-progress `read` calls. I should have reverted that when I did some of the `Transport` refactors. In my

[Lldb-commits] [lldb] [lldb-dap] Migrating DAP 'initialize' to new typed RequestHandler. (PR #133007)

2025-04-05 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/133007 This adds new types and helpers to support the 'initialize' request with the new typed RequestHandler. While working on this I found there were a few cases where we incorrectly treated initialize arguments as ca

[Lldb-commits] [lldb] [lldb-dap] Adding a DAPError for showing users error messages. (PR #132255)

2025-04-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/132255 >From a696c1c3ce5cf0f652e0a016c5d5d422b2ae24d3 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 20 Mar 2025 10:08:53 -0700 Subject: [PATCH 1/3] [lldb-dap] Adding a DAPError for showing users error message

[Lldb-commits] [lldb] [lldb-dap] Protect SetBreakpoint with the API mutex (PR #134030)

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

[Lldb-commits] [lldb] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-04-05 Thread John Harrison via lldb-commits
@@ -0,0 +1,118 @@ +//===-- GoToRequestHandler.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: Apache-2.

[Lldb-commits] [lldb] [lldb] Convert Breakpoint & Watchpoints structs to classes (NFC) (PR #133780)

2025-04-05 Thread John Harrison via lldb-commits
@@ -52,14 +37,33 @@ struct SourceBreakpoint : public Breakpoint { static bool BreakpointHitCallback(void *baton, lldb::SBProcess &process, lldb::SBThread &thread, lldb::SBBreakpointLocation &location); --

[Lldb-commits] [lldb] [lldb] Convert Breakpoint & Watchpoints structs to classes (NFC) (PR #133780)

2025-04-05 Thread John Harrison via lldb-commits
@@ -52,14 +37,33 @@ struct SourceBreakpoint : public Breakpoint { static bool BreakpointHitCallback(void *baton, lldb::SBProcess &process, lldb::SBThread &thread, lldb::SBBreakpointLocation &location); -}

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

2025-04-05 Thread John Harrison via lldb-commits
https://github.com/ashgti edited https://github.com/llvm/llvm-project/pull/130169 ___ 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   >