[Lldb-commits] [lldb] [lldb] Support specifying a language for breakpoint conditions (PR #147603)

2025-07-08 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: Semi-related: I wonder if we should have a way to set the language from within the condition expression itself. E.g. a `\language{C} a + b` prefix. That would allow us to also use those conditions from, e.g., lldb-dap where the UI only provides a way to enter a single expre

[Lldb-commits] [libcxx] [lldb] [libcxx] adds size-based `__split_buffer` representation to unstable ABI (PR #139632)

2025-07-08 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: But at least `std::vector` (i.e. what this commit here is targetting) is already ported over to C++. Instead of / In addition to modifying the example code, shouldn't this PR also update `LibCxxVector.cpp`? https://github.com/llvm/llvm-pro

[Lldb-commits] [lldb] [lldb] Update the String table offset based on the DWARF format (PR #147054)

2025-07-04 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/147054 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Improving 'variables' hover requests. (PR #146773)

2025-07-03 Thread Adrian Vogelsgesang via lldb-commits
@@ -181,7 +181,17 @@ void EvaluateRequestHandler::operator()( expression = dap.last_nonempty_var_expression; else dap.last_nonempty_var_expression = expression; +} else { + // If this isn't a REPL context, trim leading pointer/reference character

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang closed https://github.com/llvm/llvm-project/pull/141516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: Thanks for the review! > I don't know much about coroutines, but the code seems fine. in case you are interested to read more about it: In https://github.com/llvm/llvm-project/pull/142651, I updated LLVM's "Debugging C++ coroutines" tutorial https://github.com/llvm/llvm-p

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 82aa5d13eb9cc73c7e45cb3f4a9e32cd5639 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH 1/2] [lldb] Show coro_frame in `std::coroutine_handle`

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang closed https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 82aa5d13eb9cc73c7e45cb3f4a9e32cd5639 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH 1/2] [lldb] Show coro_frame in `std::coroutine_handle`

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-10 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: @labath @adrian-prantl friendly ping 🙂 https://github.com/llvm/llvm-project/pull/141516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-10 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 82aa5d13eb9cc73c7e45cb3f4a9e32cd5639 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: @ChuanqiXu9 do you want to take another look? (given that this is a NFC for Swift, and primarily changes C++ behavior) Alternatively, is it fine by you if I ship this based on @Michael137's approval? https://github.com/llvm/llvm-project/pull/141889 __

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: > The LLDB test failure seems expected. The demangled frame name changed Good catch. I updated the LLDB test expectations just now https://github.com/llvm/llvm-project/pull/141889 ___ lldb-commits mailing list lldb-commits@lists.ll

[Lldb-commits] [clang] [lldb] [llvm] [debuginfo][coro] Fix linkage name for clones of coro functions (PR #141889)

2025-06-10 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141889 >From 700c1c465ff7f29dc980356f36844a12d580 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Tue, 27 May 2025 23:50:18 + Subject: [PATCH 1/3] [debuginfo][coro] Fix linkage name for clones of

[Lldb-commits] [lldb] Add a python JIT loader class. (PR #142514)

2025-06-03 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/142514 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-03 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 06a2754bfbd434b6a957c6b252be15aac2bf8173 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [lldb] [lldb-dap] Fix disassembled ranges for `disassemble` request (PR #105446)

2025-06-03 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: superseded by #140486 https://github.com/llvm/llvm-project/pull/105446 ___ 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 disassembled ranges for `disassemble` request (PR #105446)

2025-06-03 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang closed https://github.com/llvm/llvm-project/pull/105446 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-01 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 25e1d6769bda37a5920e56a464c64af702a5652d Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-01 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-06-01 Thread Adrian Vogelsgesang via lldb-commits
@@ -141,76 +127,75 @@ lldb_private::formatters::StdlibCoroutineHandleSyntheticFrontEnd::Update() { if (frame_ptr_addr == 0 || frame_ptr_addr == LLDB_INVALID_ADDRESS) return lldb::ChildCacheState::eRefetch; - auto ast_ctx = valobj_sp->GetCompilerType().GetTypeSystem();

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 35e18fc22abfb1daff2b08413f34f258e922fd5f Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH 1/2] [lldb] Show coro_frame in `std::coroutine_handle`

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 35e18fc22abfb1daff2b08413f34f258e922fd5f Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 4132dcd234438ec710061b498b7c5778637026d5 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/141516 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: CC @ChuanqiXu9 @hokein, since I know that the both of you also looked into debuggability of C++20 coroutines earlier CC @labath @adrian-prantl as reviewers of the latest significant changes in this area (https://reviews.llvm.org/D132624, https://reviews.llvm.org/D132735, ht

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/141516 >From 733f6321bc7020281ea33dd6dad0a2409e248ccd Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Fri, 23 May 2025 01:20:46 + Subject: [PATCH] [lldb] Show coro_frame in `std::coroutine_handle` pre

[Lldb-commits] [lldb] [lldb] Show coro_frame in `std::coroutine_handle` pretty printer (PR #141516)

2025-05-26 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang created https://github.com/llvm/llvm-project/pull/141516 This commit adjusts the pretty printer for `std::corotoutine_handle` based on recent personal experiences with debugging C++20 coroutines: 1. It adds the `coro_frame` member. This member exposes the comple

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-04-05 Thread Adrian Vogelsgesang via lldb-commits
@@ -463,6 +463,8 @@ void InitializeRequestHandler::operator()( body.try_emplace("supportsDataBreakpoints", true); // The debug adapter supports the `readMemory` request. body.try_emplace("supportsReadMemoryRequest", true); + // The debug adapter supports the 'writeMemory

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-04-05 Thread Adrian Vogelsgesang via lldb-commits
@@ -394,6 +394,13 @@ class TestGetTargetBreakpointsRequestHandler : public LegacyRequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class WriteMemoryRequestHandler : public LegacyRequestHandler { vogelsgesang wrote: I w

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-04-04 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: There is another Pull Request for the same functionality #108036. The other PR seems to be outdated, though, and this PR seems to be further along (e.g. it also has test cases). CC @jennphilqc @walter-erquinigo @clayborg since you commented on the other PR and might also be

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-30 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: > Yes, but actually I think this documentation can be in rr. Agree, we should probably have the bulk of the documentation in the rr repo. Not sure if we want to put it online right away, or if we wait to wait for lldb-21 to go out the door first. (Not sure how accustomed rr

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-29 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/132783 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-29 Thread Adrian Vogelsgesang via lldb-commits
@@ -468,7 +468,23 @@ class CommandObjectProcessContinue : public CommandObjectParsed { case 'b': m_run_to_bkpt_args.AppendArgument(option_arg); m_any_bkpts_specified = true; - break; +break; + case 'F': +if (m_base_direction == l

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-29 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: We probably also want to test that * reverse-continue on a non-reverse-capable process gives a decent error message * `process continue -F` also work for non-reverse-capable processes https://github.com/llvm/llvm-project/pull/132783 ___

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-29 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: > I suppose we need to add documentation for this but I'm not sure where... Afaict, your code change should already be sufficient such that `help processor continue` also lists the new -F and -R flags. In addition, I guess we would eventually want to also document more gene

[Lldb-commits] [lldb] [lldb] Implement CLI support for reverse-continue (PR #132783)

2025-03-29 Thread Adrian Vogelsgesang via lldb-commits
@@ -744,6 +744,10 @@ let Command = "process continue" in { Arg<"BreakpointIDRange">, Desc<"Specify a breakpoint to continue to, temporarily " "ignoring other breakpoints. Can be specified more than once. " "The continue action will be done synchronously if this o

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-28 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.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] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-28 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,165 @@ +//===-- GoToTargetsRequestHandler.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][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-28 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.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][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Adrian Vogelsgesang via lldb-commits
@@ -112,3 +112,48 @@ def test_readMemory(self): # Reads at offset 0x0 fail mem = self.dap_server.request_readMemory("0x0", 0, 6) self.assertEqual(mem["success"], False) + +def test_writeMemory(self): +""" +Tests the 'writeMemory' requ

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Adrian Vogelsgesang via lldb-commits
@@ -112,3 +112,48 @@ def test_readMemory(self): # Reads at offset 0x0 fail mem = self.dap_server.request_readMemory("0x0", 0, 6) self.assertEqual(mem["success"], False) + +def test_writeMemory(self): +""" +Tests the 'writeMemory' requ

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Adrian Vogelsgesang via lldb-commits
@@ -112,3 +112,48 @@ def test_readMemory(self): # Reads at offset 0x0 fail mem = self.dap_server.request_readMemory("0x0", 0, 6) self.assertEqual(mem["success"], False) + +def test_writeMemory(self): +""" +Tests the 'writeMemory' requ

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,175 @@ +//===-- WriteMemoryRequestHandler.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][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-27 Thread Adrian Vogelsgesang via lldb-commits
@@ -112,3 +112,48 @@ def test_readMemory(self): # Reads at offset 0x0 fail mem = self.dap_server.request_readMemory("0x0", 0, 6) self.assertEqual(mem["success"], False) + +def test_writeMemory(self): +""" +Tests the 'writeMemory' requ

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-26 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: This is probably worth mentioning in the release notes, in `llvm/docs/ReleaseNotes.md` https://github.com/llvm/llvm-project/pull/131820 ___ lldb-commits mailing list lldb-commits@lists.llvm.org ht

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-25 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/131404 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,11 @@ +%extend lldb::SBLock { +#ifdef SWIGPYTHON +%pythoncode %{ +def __enter__(self): +return self + +def __exit__(self, exc_type, exc_value, traceback): +self.Unlock() vogelsgesang wrote: Sounds good. If we

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

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -113,6 +113,20 @@ class ExceptionInfoRequestHandler : public RequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class GoToRequestHandler : public RequestHandler { +public: + using RequestHandler::RequestHandler; + static llvm::String

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

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/130503 ___ 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-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -113,6 +113,20 @@ class ExceptionInfoRequestHandler : public RequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class GoToRequestHandler : public RequestHandler { vogelsgesang wrote: @da-viper for your Pull Request, I

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

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/130503 ___ 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-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -113,6 +113,20 @@ class ExceptionInfoRequestHandler : public RequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class GoToRequestHandler : public RequestHandler { vogelsgesang wrote: Good point. Currently, we are usi

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

2025-03-20 Thread Adrian Vogelsgesang 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] [llvm] [lldb][lldb-dap] Implement jump to cursor (PR #130503)

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -113,6 +113,20 @@ class ExceptionInfoRequestHandler : public RequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class GoToRequestHandler : public RequestHandler { vogelsgesang wrote: please rebase on `main`, and make

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,147 @@ +//===-- WriteMemoryRequestHandler.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:

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,46 @@ +//===-- SBLock.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] Expose the Target API lock through the SB API (PR #131404)

2025-03-20 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,11 @@ +%extend lldb::SBLock { +#ifdef SWIGPYTHON +%pythoncode %{ +def __enter__(self): +return self + +def __exit__(self, exc_type, exc_value, traceback): +self.Unlock() vogelsgesang wrote: It's a bit unfortu

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,142 @@ +//===-- WriteMemoryRequestHandler.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: A

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: The one remaining question seems to be: Should we also support (and test) this from Python? Also see comments in the RFC https://github.com/llvm/llvm-project/pull/131404 ___ lldb-commits mailing list lldb-commits@lists.llvm.org htt

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -394,6 +394,13 @@ class TestGetTargetBreakpointsRequestHandler : public LegacyRequestHandler { void operator()(const llvm::json::Object &request) const override; }; +class WriteMemoryRequestHandler : public LegacyRequestHandler { +public: + using LegacyRequestHandler::L

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

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -96,7 +115,7 @@ Expected> Transport::Read() { return createStringError( formatv("invalid content length {0}", *raw_length).str()); - Expected raw_json = ReadFull(*input, length); vogelsgesang wrote: we should probably only apply a timeout befo

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

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang 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

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

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang 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

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

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -27,6 +27,7 @@ def test_default(self): lines = output.splitlines() self.assertIn(program, lines[0], "make sure program path is in first argument") +@skipIfWindows vogelsgesang wrote: why? Did this work previously and was now broken by

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

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -463,6 +463,8 @@ void InitializeRequestHandler::operator()( body.try_emplace("supportsDataBreakpoints", true); // The debug adapter supports the `readMemory` request. body.try_emplace("supportsReadMemoryRequest", true); + // The debug adapter supports the `cancel` req

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

2025-03-19 Thread Adrian Vogelsgesang 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][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,142 @@ +//===-- WriteMemoryRequestHandler.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: A

[Lldb-commits] [lldb] [lldb][lldb-dap] Added support for "WriteMemory" request. (PR #131820)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,142 @@ +//===-- WriteMemoryRequestHandler.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: A

[Lldb-commits] [lldb] [lldb-dap] Waiting for the test binary to exit prior to dumping logs. (PR #131917)

2025-03-19 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang approved this pull request. https://github.com/llvm/llvm-project/pull/131917 ___ 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-03-18 Thread Adrian Vogelsgesang 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] Ensure logging statements are written as a single chunk. (PR #131916)

2025-03-18 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang approved this pull request. https://github.com/llvm/llvm-project/pull/131916 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Ensure logging statements are written as a single chunk. (PR #131916)

2025-03-18 Thread Adrian Vogelsgesang via lldb-commits
@@ -14,11 +14,11 @@ #ifndef LLDB_TOOLS_LLDB_DAP_TRANSPORT_H #define LLDB_TOOLS_LLDB_DAP_TRANSPORT_H +#include "DAPLog.h" vogelsgesang wrote: is a forward declaration sufficient? https://github.com/llvm/llvm-project/pull/131916 ___

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

2025-03-18 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited 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] Adding support for well typed events. (PR #130104)

2025-03-18 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited 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] Adding support for well typed events. (PR #130104)

2025-03-18 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,76 @@ +//===-- ProtocolEvents.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-03-18 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,57 @@ +//===-- EventHandler.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] Expose the Target API lock through the SB API (PR #131404)

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
@@ -1692,6 +1692,20 @@ class Target : public std::enable_shared_from_this, } }; +/// The private implementation backing SBLock. +struct APILock { + APILock(std::recursive_mutex &mutex) : lock(mutex) {} + std::lock_guard lock; +}; + +/// The private implementation used by

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
@@ -65,7 +66,7 @@ DAP::DAP(std::string name, llvm::StringRef path, std::ofstream *log, lldb::IOObjectSP input, lldb::IOObjectSP output, ReplMode repl_mode, std::vector pre_init_commands) : name(std::move(name)), debug_adapter_path(path), log(log), -

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
@@ -663,58 +671,65 @@ void DAP::SetTarget(const lldb::SBTarget target) { } bool DAP::HandleObject(const protocol::Message &M) { - // FIXME: Directly handle `Message` instead of serializing to JSON. - llvm::json::Value v = toJSON(M); - llvm::json::Object object = *v.getAsObj

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
@@ -248,6 +246,7 @@ struct DAP { // Serialize the JSON value into a string and send the JSON packet to // the "out" stream. void SendJSON(const llvm::json::Value &json); + void Send(const protocol::Message &message); vogelsgesang wrote: ```suggestion

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang commented: just a very cursory review. I will review this more closely as soon as the preparatory commits landed. Those "stacked PRs" are a bit hard to review https://github.com/llvm/llvm-project/pull/130169 ___ lldb-co

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang 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

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

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/130090 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb-dap] Add process picker command to VS Code extension (PR #128943)

2025-03-15 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,42 @@ +import * as path from "path"; +import * as vscode from "vscode"; +import { createProcessTree } from "../process-tree"; + +interface ProcessQuickPick extends vscode.QuickPickItem { + processId: number; +} + +/** + * Prompts the user to select a running process. +

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -30,216 +30,170 @@ namespace lldb_dap::protocol { // MARK: Base Protocol -// "Request": { -// "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { -// "type": "object", -// "description": "A client or debug adapter initiated request.", -// "properties":

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -6,8 +6,9 @@ // //===--===// -#include "RequestHandler.h" +#include "Handler/RequestHandler.h" #include "DAP.h" +#include "Handler/ResponseHandler.h" vogelsgesang wrote: ah, and this was

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -946,6 +946,10 @@ class LLDB_API SBTarget { /// An error if a Trace already exists or the trace couldn't be created. lldb::SBTrace CreateTrace(SBError &error); +#ifndef SWIG + lldb::SBLock GetAPILock() const; vogelsgesang wrote: `Get` sounds a bit

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -7,6 +7,7 @@ //===--===// #include "lldb/API/SBTarget.h" +#include "lldb/API/SBLock.h" vogelsgesang wrote: duplicated input of this header. Also included below https://github.com/llvm/ll

[Lldb-commits] [lldb] [lldb] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,40 @@ +//===-- SBLock.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] Expose the Target API lock through the SB API (PR #131404)

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -1692,6 +1692,20 @@ class Target : public std::enable_shared_from_this, } }; +/// The private implementation backing SBLock. +struct APILock { + APILock(std::recursive_mutex &mutex) : lock(mutex) {} + std::lock_guard lock; +}; + +/// The private implementation used by

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -57,235 +68,288 @@ class RequestHandler { DAP &dap; }; -class AttachRequestHandler : public RequestHandler { -public: - using RequestHandler::RequestHandler; +/// Base class for handling DAP requests. Handlers should declare their +/// arguments and response body types l

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -6,8 +6,9 @@ // //===--===// -#include "RequestHandler.h" +#include "Handler/RequestHandler.h" #include "DAP.h" +#include "Handler/ResponseHandler.h" vogelsgesang wrote: why do we need t

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -30,216 +30,197 @@ namespace lldb_dap::protocol { // MARK: Base Protocol -// "Request": { -// "allOf": [ { "$ref": "#/definitions/ProtocolMessage" }, { -// "type": "object", -// "description": "A client or debug adapter initiated request.", -// "properties":

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

2025-03-14 Thread Adrian Vogelsgesang via lldb-commits
@@ -152,6 +153,8 @@ struct Response { bool fromJSON(const llvm::json::Value &, Response &, llvm::json::Path); llvm::json::Value toJSON(const Response &); +using VoidResponseBody = std::nullptr_t; vogelsgesang wrote: `std::monostate` would probably be more idi

  1   2   3   4   5   6   >