[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
ashgti wrote: I also added some unit tests for the new 'CapabilitiesEventBody' serialization logic. But I have a style question. The existing `Capabilities` type doesn't initialize its fields, so if I use the aggregate I have to include all the fields. However, we could initialize the values

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From 0824e3c626ad5e8c2ce37f2fdfcf0c2fa47b7b1d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/7] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From 0824e3c626ad5e8c2ce37f2fdfcf0c2fa47b7b1d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/6] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/142510 ___ 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 'threads' request to structured types. (PR #142510)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 3a16210ba7643608dd0bd6a1ff4a76b4e72c74e3 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/6] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
ashgti wrote: Done, rebased on main. https://github.com/llvm/llvm-project/pull/142831 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From 0824e3c626ad5e8c2ce37f2fdfcf0c2fa47b7b1d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/6] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From 0824e3c626ad5e8c2ce37f2fdfcf0c2fa47b7b1d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/5] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From 0824e3c626ad5e8c2ce37f2fdfcf0c2fa47b7b1d Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/4] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
ashgti wrote: Working on an update rebased on HEAD. https://github.com/llvm/llvm-project/pull/142831 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-05 Thread John Harrison via lldb-commits
ashgti wrote: I see some of this has been reverted. Should I undo the revert and add that to my other PR or should I rebase my changes on HEAD and we can take another stab at updating the stepInTargets request? https://github.com/llvm/llvm-project/pull/142831 _

[Lldb-commits] [lldb] Revert "[lldb-dap] Use structured types for stepInTargets request (#142439)" (PR #142891)

2025-06-05 Thread John Harrison via lldb-commits
ashgti wrote: #142831 should fix the failing test on macOS. Should I revert this revert and add that to my other PR or should I rebase my changes on HEAD and we can take another stab at updating the stepInTargets request? https://github.com/llvm/llvm-project/pull/142891 ___

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-04 Thread John Harrison via lldb-commits
ashgti wrote: #142831 should fix this https://github.com/llvm/llvm-project/pull/142439 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, Breakpoints. (PR #141983)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/141983 >From 60ca2ac18ccff832d2137107d3f5161614c02dd1 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Thu, 29 May 2025 09:55:42 -0700 Subject: [PATCH] [lldb-dap] Test Gardening, Breakpoints. Enabling the breakpoint

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, attach tests. (PR #141981)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/141981 ___ 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 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
@@ -152,7 +152,7 @@ struct DAP { llvm::DenseSet clientFeatures; /// The initial thread list upon attaching. - std::optional initial_thread_list; + std::optional> initial_thread_list; ashgti wrote: Changed to just a vector that we check. https://github.

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
@@ -414,6 +414,16 @@ bool fromJSON(const llvm::json::Value &, SteppingGranularity &, llvm::json::Path); llvm::json::Value toJSON(const SteppingGranularity &); +/// A Thread. +struct Thread { + /// Unique identifier for the thread. + lldb::tid_t id; ---

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 3a16210ba7643608dd0bd6a1ff4a76b4e72c74e3 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/6] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 2fd86de03cbb207420ee45334639f82d19dbbc28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/5] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From ad3cd275d38fda7b61c96c532d4f807953beecf5 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/2] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
@@ -89,17 +91,14 @@ def test_supported_capability_x86_arch(self): self.assertEqual( len(breakpoint_ids), len(bp_lines), "expect correct number of breakpoints" ) -is_supported = self.dap_server.get_initialize_value( -"supportsStep

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142831 >From ad3cd275d38fda7b61c96c532d4f807953beecf5 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 11:03:37 -0700 Subject: [PATCH 1/3] [lldb-dap] Creating a 'capabilities' event helper. This adds

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
@@ -491,13 +495,11 @@ def wait_for_terminated(self, timeout: Optional[float] = None): raise ValueError("didn't get terminated event") return event_dict -def get_initialize_value(self, key): +def get_capability(self, key, default=None): """

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
@@ -30,6 +30,8 @@ def test_basic(self): self.assertEqual( len(breakpoint_ids), len(lines), "expect correct number of breakpoints" ) +# Target based capability 'supportsStepInTargetsRequest' is sent in ashgti wrote: Done. h

[Lldb-commits] [lldb] [lldb-dap] Creating a 'capabilities' event helper. (PR #142831)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/142831 This adds a new 'CapabilitiesEventBody' type for having a well structured type for the event and updates the 'stepInTargets' and 'restart' request to dynamically set their capabilities. This also fixes the 'ste

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-04 Thread John Harrison via lldb-commits
ashgti wrote: I'm working on a fix https://github.com/llvm/llvm-project/pull/142439 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Adjust the stepInTargets tests on non-intel platforms. (PR #142820)

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

[Lldb-commits] [lldb] [lldb-dap] Adjust the stepInTargets tests on non-intel platforms. (PR #142820)

2025-06-04 Thread John Harrison via lldb-commits
ashgti wrote: Looking at this, I think I'll take a different approach to fixing this and close this PR for now. https://github.com/llvm/llvm-project/pull/142820 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[Lldb-commits] [lldb] [lldb-dap] Adjust the stepInTargets tests on non-intel platforms. (PR #142820)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142820 >From 0fc2c8223ecb0888c15152331474f4ffb63c142b Mon Sep 17 00:00:00 2001 From: John Harrison Date: Wed, 4 Jun 2025 10:29:33 -0700 Subject: [PATCH 1/2] [lldb-dap] Adjust the stepInTargets tests on non-intel platfo

[Lldb-commits] [lldb] [lldb-dap] Adjust the stepInTargets tests on non-intel platforms. (PR #142820)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/142820 This test is failing for me on arm64 due to the capabilities not being sent until 'configurationDone' is called. I adjusted the test to ensure we call 'configurationDone' so the value is sent to the test correc

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
ashgti wrote: > I was trying to avoid putting JSON in the test because I find it hard to > maintain (your editor/IDE doesn't understand it's JSON, refactoring tools > don't work, no automatic formatting, etc) but if we think this is easier to > maintain (and means folks write more tests) then

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
@@ -116,78 +119,78 @@ void SendProcessEvent(DAP &dap, LaunchMethod launch_method) { // Send a thread stopped event for all threads as long as the process // is stopped. -void SendThreadStoppedEvent(DAP &dap) { +llvm::Error SendThreadStoppedEvent(DAP &dap, bool on_entry) { +

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
@@ -110,4 +116,48 @@ std::string GetLoadAddressString(const lldb::addr_t addr) { return "0x" + llvm::utohexstr(addr, false, 16); } +protocol::Thread CreateThread(lldb::SBThread &thread, lldb::SBFormat &format) { + std::string name; + lldb::SBStream stream; + if (format &&

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 2fd86de03cbb207420ee45334639f82d19dbbc28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/4] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 2fd86de03cbb207420ee45334639f82d19dbbc28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/3] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-04 Thread John Harrison via lldb-commits
@@ -116,78 +119,78 @@ void SendProcessEvent(DAP &dap, LaunchMethod launch_method) { // Send a thread stopped event for all threads as long as the process // is stopped. -void SendThreadStoppedEvent(DAP &dap) { +llvm::Error SendThreadStoppedEvent(DAP &dap, bool on_entry) { +

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-03 Thread John Harrison via lldb-commits
ashgti wrote: > Can you add a `Thread` serialization/deserialization unit test? I added some unit tests but looking at this a bit more, I took some time to try a slightly different approach to validating the serialization logic. Specifically, using `roundtrip` and the individual asserts on eac

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-03 Thread John Harrison via lldb-commits
@@ -8,72 +8,43 @@ #include "DAP.h" #include "EventHelper.h" -#include "JSONUtils.h" +#include "Protocol/ProtocolRequests.h" +#include "ProtocolUtils.h" #include "RequestHandler.h" +#include "lldb/API/SBDebugger.h" +#include "lldb/API/SBDefines.h" +#include "llvm/Support/Error

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-03 Thread John Harrison via lldb-commits
@@ -116,77 +116,79 @@ void SendProcessEvent(DAP &dap, LaunchMethod launch_method) { // Send a thread stopped event for all threads as long as the process // is stopped. -void SendThreadStoppedEvent(DAP &dap) { +void SendThreadStoppedEvent(DAP &dap, bool on_entry) { --

[Lldb-commits] [lldb] [lldb-dap] Migrating 'threads' request to structured types. (PR #142510)

2025-06-03 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/142510 >From 2fd86de03cbb207420ee45334639f82d19dbbc28 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Mon, 2 Jun 2025 18:07:52 -0700 Subject: [PATCH 1/2] [lldb-dap] Migrating 'threads' request to structured types.

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-03 Thread John Harrison via lldb-commits
@@ -414,6 +415,34 @@ bool fromJSON(const llvm::json::Value &, SteppingGranularity &, llvm::json::Path); llvm::json::Value toJSON(const SteppingGranularity &); +/// A `StepInTarget` can be used in the `stepIn` request and determines into +/// which single target

[Lldb-commits] [lldb] [lldb-dap] Forward any error from stepping. (PR #142652)

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

[Lldb-commits] [lldb] [lldb-dap] Forward any error from stepping. (PR #142652)

2025-06-03 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. For these three request handlers, should we also add a sanity check of: ``` if (!SBDebugger::StateIsStoppedState(process.GetState())) return make_error(); ``` To the `Run(...)` so we can get a specific error if the process isn't stoppe

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-03 Thread John Harrison via lldb-commits
@@ -414,6 +415,34 @@ bool fromJSON(const llvm::json::Value &, SteppingGranularity &, llvm::json::Path); llvm::json::Value toJSON(const SteppingGranularity &); +/// A `StepInTarget` can be used in the `stepIn` request and determines into +/// which single target

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

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

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-03 Thread John Harrison via lldb-commits
@@ -33,6 +33,23 @@ static void SendThreadExitedEvent(DAP &dap, lldb::tid_t tid) { dap.SendJSON(llvm::json::Value(std::move(event))); } +void SendAdditionalCapabilities(DAP &dap) { + if (dap.target.IsValid()) { ashgti wrote: We can always update it in the

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-03 Thread John Harrison via lldb-commits
@@ -78,3 +78,31 @@ def test_basic(self): leaf_frame = self.dap_server.get_stackFrame() self.assertIsNotNone(leaf_frame, "expect a leaf frame") self.assertEqual(step_in_targets[1]["label"], leaf_frame["name"]) + +def test_supported_capability(self): +

[Lldb-commits] [lldb] [lldb-dap] Use structured types for stepInTargets request (PR #142439)

2025-06-03 Thread John Harrison via lldb-commits
@@ -33,6 +33,23 @@ static void SendThreadExitedEvent(DAP &dap, lldb::tid_t tid) { dap.SendJSON(llvm::json::Value(std::move(event))); } +void SendAdditionalCapabilities(DAP &dap) { + if (dap.target.IsValid()) { +// FIXME: stepInTargets request is only supported by the x

[Lldb-commits] [lldb] Have lldb-dap extension support multi-root workspace (PR #142470)

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

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-06-02 Thread John Harrison via lldb-commits
ashgti wrote: FYI, I am not a code owner of lldb-dap or lldb. I think its usually best to wait for one of the owners to sign off before submitting. See https://github.com/llvm/llvm-project/blob/main/lldb/Maintainers.md for the full list of active maintainers. https://github.com/llvm/llvm-proj

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-30 Thread John Harrison via lldb-commits
@@ -0,0 +1,115 @@ +//===-- ProtocolUtils.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] Reuse source object logics (PR #141426)

2025-05-30 Thread John Harrison via lldb-commits
ashgti wrote: I meant should the file be `lldb/tools/lldb-dap/ProtocolUtils.{h,cpp}` https://github.com/llvm/llvm-project/pull/141426 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cg

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-30 Thread John Harrison via lldb-commits
@@ -0,0 +1,115 @@ +//===-- ProtocolUtils.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] Reuse source object logics (PR #141426)

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

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-30 Thread John Harrison via lldb-commits
@@ -0,0 +1,115 @@ +//===-- ProtocolUtils.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] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-30 Thread John Harrison via lldb-commits
ashgti wrote: > This PR seemingly made `disableASLR` default to `True` again. doh... I'll fix this when I make a new attempt at merging this PR in. > Reverted, please take a look and fix. Reproducing should be possible by > installing the libc debug package, not sure what's going on with the o

[Lldb-commits] [lldb] [lldb-dap][test] Fix DAP disassemble test (PR #142129)

2025-05-30 Thread John Harrison via lldb-commits
https://github.com/ashgti commented: Can we also move https://github.com/llvm/llvm-project/blob/f7e172da4caeab9d92f6e97501b1a2c561e616c1/lldb/test/API/tools/lldb-dap/disassemble/main.c#L9 to line 11? That should help us land on a location with a line associated with it. https://github.com/llv

[Lldb-commits] [lldb] [lldb-dap] Synchronously wait for breakpoints resolves in tests (PR #140470)

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

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-29 Thread John Harrison via lldb-commits
@@ -58,6 +59,9 @@ class LLDB_API SBAddress { // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)". lldb::SBSymbolContext GetSymbolContext(uint32_t resolve_scope); + lldb::SBSymbolContext GetSymbolContext(const SBTarget &target, +

[Lldb-commits] [lldb] [lldb-dap] fix config value comparison (PR #142017)

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

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-29 Thread John Harrison via lldb-commits
ashgti wrote: I'm surprised by some of these failures, since it passed on buildkite and the premerge check that are also on linux x86_64. Trying to understand the reason for these failures. https://github.com/llvm/llvm-project/pull/141689 ___ lldb-co

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-29 Thread John Harrison via lldb-commits
ashgti wrote: Looking into the failure on the buildbot. https://github.com/llvm/llvm-project/pull/141689 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, Breakpoints. (PR #141983)

2025-05-29 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/141983 Enabling the breakpoint tests, these have been stable for me locally and I think with the recent changes this should be stable again in the CI. >From 60ca2ac18ccff832d2137107d3f5161614c02dd1 Mon Sep 17 00:00:00

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-29 Thread John Harrison via lldb-commits
ashgti wrote: Okay, the latest version of this worked on buildkit for linux. I'll submit this, but if we get reports of it failing with other specific versions of python we may need to tweak things a bit. https://github.com/llvm/llvm-project/pull/141689 ___

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, attach tests. (PR #141981)

2025-05-29 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/141981 Trimming unused imports, adjusting the test to use the `DEFAULT_TIMEOUT` instead of a custom timeout and adjusting the flow to stopOnEntry for improving consistency. >From 509b0a5643620b10e77216c7cde591b7e8ccb1

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

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

[Lldb-commits] [lldb] [lldb][lldb-dap] Support breakpoint info bytes (PR #141122)

2025-05-29 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-29 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/141689 >From ad0a9cd321d260cd87b852b335da9565f8326449 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 27 May 2025 16:40:10 -0700 Subject: [PATCH 1/4] [lldb-dap] Test Gardening, improving DebugCommunication. Imp

[Lldb-commits] [lldb] [lldb][lldb-dap] Support breakpoint info bytes (PR #141122)

2025-05-29 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-29 Thread John Harrison via lldb-commits
ashgti wrote: Looks like my tests failed on the buildkit linux host, looking into why python3.10 failed. They passed on the 'CI Checks / Build and Test Linux' but that has python 3.12. https://github.com/llvm/llvm-project/pull/141689 ___ lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/141689 >From ad0a9cd321d260cd87b852b335da9565f8326449 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 27 May 2025 16:40:10 -0700 Subject: [PATCH 1/2] [lldb-dap] Test Gardening, improving DebugCommunication. Imp

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -1008,12 +1084,13 @@ def request_setBreakpoints(self, source: Source, line_array, data=None): breakpoints.append(bp) args_dict["breakpoints"] = breakpoints -command_dict = { +command_dict: Request = { "command": "set

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -224,99 +265,155 @@ def collect_output(self, category, timeout_secs, pattern, clear=True): break return collected_output if collected_output else None -def _enqueue_recv_packet(self, packet: Optional[ProtocolMessage]): -self.recv_con

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
@@ -104,6 +103,17 @@ def waitUntil(self, condition_callback): time.sleep(0.5) return False +def assertResponseSuccess(self, response: Response): +self.assertIsNotNone(response) +if not response.get("success", False): ash

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-28 Thread John Harrison via lldb-commits
ashgti wrote: nit: Should this live in the lldb-dap top level folder? I could go either way on that, but it matches the existing helpers. https://github.com/llvm/llvm-project/pull/141426 ___ lldb-commits mailing list

[Lldb-commits] [lldb] [lldb-dap] Reuse source object logics (PR #141426)

2025-05-28 Thread John Harrison via lldb-commits
@@ -58,6 +59,9 @@ class LLDB_API SBAddress { // "lldb::SBAddress SBTarget::ResolveLoadAddress (...)". lldb::SBSymbolContext GetSymbolContext(uint32_t resolve_scope); + lldb::SBSymbolContext GetSymbolContext(const SBTarget &target, +

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-28 Thread John Harrison via lldb-commits
https://github.com/ashgti updated https://github.com/llvm/llvm-project/pull/141689 >From ad0a9cd321d260cd87b852b335da9565f8326449 Mon Sep 17 00:00:00 2001 From: John Harrison Date: Tue, 27 May 2025 16:40:10 -0700 Subject: [PATCH 1/2] [lldb-dap] Test Gardening, improving DebugCommunication. Imp

[Lldb-commits] [lldb] [lldb-dap] Test Gardening, improving DebugCommunication. (PR #141689)

2025-05-27 Thread John Harrison via lldb-commits
ashgti wrote: This was split out from #140777 to make a smaller commit. https://github.com/llvm/llvm-project/pull/141689 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [libcxx] [lldb] [libc++][lldb-dap][test] Fix CI for bootstrapping-build (PR #141543)

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

[Lldb-commits] [lldb] [lldb][lldb-dap] Support breakpoint info bytes (PR #141122)

2025-05-27 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [libcxx] [lldb] [libc++][lldb-dap][test] Fix CI for bootstrapping-build (PR #141543)

2025-05-27 Thread John Harrison via lldb-commits
ashgti wrote: Maybe we should update https://github.com/llvm/llvm-project/blob/ff7bb17c88328276323603809d5d4549ca8bd22b/lldb/packages/Python/lldbsuite/test/tools/lldb-dap/dap_server.py#L859C9-L859C20 to default to `False` instead of `True`? https://github.com/llvm/llvm-project/pull/141543

[Lldb-commits] [lldb] [Support] [lldb] Fix thread jump #45326 (PR #135778)

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

[Lldb-commits] [lldb] [lldb-dap] DisassembleRequestHandler: use a better invalid instruction (PR #141463)

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

[Lldb-commits] [lldb] [lldb] add missing cmake build type argument (PR #141427)

2025-05-26 Thread John Harrison via lldb-commits
https://github.com/ashgti approved this pull request. https://github.com/llvm/llvm-project/pull/141427 ___ 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 address comparison in DisassembleRequestHandler (PR #140975)

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

[Lldb-commits] [lldb] [lldb-dap] Minor change to stdio client name. (PR #141266)

2025-05-23 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/141266 Update the stdin <-> stdout client name to `stdio`. I noticed on macOS if I get a crash report from lldb-dap the `/` in the client name causes some thread names to be reported without the full name. For example

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -104,7 +104,9 @@ def waitUntil(self, condition_callback): time.sleep(0.5) return False -def verify_breakpoint_hit(self, breakpoint_ids, timeout=DEFAULT_TIMEOUT): +def verify_breakpoint_hit( +self, breakpoint_ids, timeout=DEFAULT_TIMEOUT,

[Lldb-commits] [lldb] [lldb-dap] Minor change to stdio client name. (PR #141266)

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

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -131,9 +133,10 @@ def verify_breakpoint_hit(self, breakpoint_ids, timeout=DEFAULT_TIMEOUT): # So when looking at the description we just want to make sure # the right breakpoint matches and not worry about the actual # locatio

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -1042,16 +1042,30 @@ def request_setFunctionBreakpoints(self, names, condition=None, hitCondition=Non return self.send_recv(command_dict) def request_dataBreakpointInfo( -self, variablesReference, name, frameIndex=0, threadId=None +self, +

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] Support breakpoint info bytes (PR #141122)

2025-05-23 Thread John Harrison via lldb-commits
@@ -16,12 +15,61 @@ namespace lldb_dap { +static llvm::Expected +HandleDataBreakpointBytes(DAP &dap, + const protocol::DataBreakpointInfoArguments &args) { + llvm::StringRef address = args.name; + + unsigned long long load_addr = LLDB_INVALID_ADDRES

[Lldb-commits] [lldb] [lldb] Adding a new decorator for CMAKE_BUILD_TYPE. (PR #141159)

2025-05-23 Thread John Harrison via lldb-commits
https://github.com/ashgti closed https://github.com/llvm/llvm-project/pull/141159 ___ 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 decorator for CMAKE_BUILD_TYPE. (PR #141159)

2025-05-22 Thread John Harrison via lldb-commits
https://github.com/ashgti created https://github.com/llvm/llvm-project/pull/141159 In lldb-dap, we have existing tests that are known to be unstable when lldb and lldb-dap are built in the Debug configuration. This decorator lets us skip those tests in CI jobs that are to slow with those conf

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-22 Thread John Harrison via lldb-commits
ashgti wrote: This patch has grown a bit due to discovering a number of issues in some of the tests. I think I'll try splitting it up into smaller patches instead. https://github.com/llvm/llvm-project/pull/140777 ___ lldb-commits mailing list lldb-co

[Lldb-commits] [lldb] [lldb-dap] Test gardening, enabling tests and improving doc comments. (PR #140777)

2025-05-22 Thread John Harrison via lldb-commits
@@ -1102,3 +1103,28 @@ def is_feature_enabled(): return "%s is not supported on this system." % feature return skipTestIfFn(is_feature_enabled) + + +def skipIfBinaryToLarge(path: Optional[str], maxSize: int): +"""Skip the test if a binary is to large. +

  1   2   3   4   5   6   7   8   9   10   >