[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

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-13 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang closed https://github.com/llvm/llvm-project/pull/125843 ___ 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] Implement jump to cursor (PR #130503)

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

2025-03-13 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,138 @@ +""" +Test lldb-dap gotoTarget request +""" + +from typing import Dict, Any +from unittest import SkipTest + +from lldbsuite.test.lldbtest import line_number +import lldbdap_testcase +import os + + +class TestDAP_gotoTargets(lldbdap_testcase.DAPTestCaseBase): +

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

2025-03-13 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,138 @@ +""" +Test lldb-dap gotoTarget request +""" + +from typing import Dict, Any +from unittest import SkipTest + +from lldbsuite.test.lldbtest import line_number +import lldbdap_testcase +import os + + +class TestDAP_gotoTargets(lldbdap_testcase.DAPTestCaseBase): +

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

2025-03-13 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,138 @@ +""" +Test lldb-dap gotoTarget request +""" + +from typing import Dict, Any +from unittest import SkipTest + +from lldbsuite.test.lldbtest import line_number +import lldbdap_testcase +import os + + +class TestDAP_gotoTargets(lldbdap_testcase.DAPTestCaseBase): +

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

2025-03-13 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,138 @@ +""" +Test lldb-dap gotoTarget request +""" + +from typing import Dict, Any +from unittest import SkipTest + +from lldbsuite.test.lldbtest import line_number +import lldbdap_testcase +import os + + +class TestDAP_gotoTargets(lldbdap_testcase.DAPTestCaseBase): +

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

2025-03-13 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-13 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: What is your overall plan for this PR? I assume the first step is to get buy-in from all reviewers into the new structure for our JSON types. But what comes after? Are you planning to update this PR to cover all JSON types / requests / responses? Are you planning to land t

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

2025-03-13 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-13 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-13 Thread Adrian Vogelsgesang via lldb-commits
@@ -240,6 +240,137 @@ using Message = std::variant; bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path); llvm::json::Value toJSON(const Message &); +// MARK: Types + +// "Source": { +// "type": "object", +// "description": "A `Source` is a descriptor for

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: @ashgti @walter-erquinigo could you take another look at this PR? Afaict, all comments should be addressed and this PR is (hopefully) ready to be merged https://github.com/llvm/llvm-project/pull/125843 ___ lldb-commits mailing list

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

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
@@ -240,6 +240,137 @@ using Message = std::variant; bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path); llvm::json::Value toJSON(const Message &); +// MARK: Types + +// "Source": { +// "type": "object", +// "description": "A `Source` is a descriptor for

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

2025-03-12 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] Support vscode launch URLs (PR #125843)

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,37 @@ +import * as vscode from "vscode"; + +export class LaunchUriHandler implements vscode.UriHandler { +async handleUri(uri: vscode.Uri) { +try { +const params = new URLSearchParams(uri.query); +if (uri.path == '/launch/config') { +

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,37 @@ +import * as vscode from "vscode"; + +export class LaunchUriHandler implements vscode.UriHandler { +async handleUri(uri: vscode.Uri) { +try { +const params = new URLSearchParams(uri.query); +if (uri.path == '/launch/config') { -

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/125843 >From 48e900c6a8bd24c7cbee057eb0d96b9f0b2b4f84 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Wed, 5 Feb 2025 10:11:38 + Subject: [PATCH 1/4] [lldb-dap] Support vscode launch URLs This commit

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

2025-03-12 Thread Adrian Vogelsgesang via lldb-commits
@@ -240,6 +240,137 @@ using Message = std::variant; bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path); llvm::json::Value toJSON(const Message &); +// MARK: Types + +// "Source": { +// "type": "object", +// "description": "A `Source` is a descriptor for

[Lldb-commits] [lldb] [lldb][lldb-dap] setVariable request should send the correct response (PR #130773)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: @da-viper do you have commit access by now? https://github.com/llvm/llvm-project/pull/130773 ___ 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] setVariable request should send the correct response (PR #130773)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang approved this pull request. https://github.com/llvm/llvm-project/pull/130773 ___ 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-11 Thread Adrian Vogelsgesang via lldb-commits
vogelsgesang wrote: > should we also have feature flags for things like this in lldb-dap? IMO, `lldb-dap` itself should exit with an error code in case of unsupported command line options. We might want to use a dedicated exit code for that, in order to differentiate it from other errors, wher

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

2025-03-11 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] Refactoring IOStream into Transport handler. (PR #130026)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang edited https://github.com/llvm/llvm-project/pull/130026 ___ 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 IOStream into Transport handler. (PR #130026)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
@@ -722,40 +683,9 @@ void DAP::SetTarget(const lldb::SBTarget target) { } } -PacketStatus DAP::GetNextObject(llvm::json::Object &object) { - std::string json = ReadJSON(); - if (json.empty()) -return PacketStatus::EndOfFile; - - llvm::StringRef json_sref(json); - llv

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

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
@@ -240,6 +240,137 @@ using Message = std::variant; bool fromJSON(const llvm::json::Value &, Message &, llvm::json::Path); llvm::json::Value toJSON(const Message &); +// MARK: Types + +// "Source": { +// "type": "object", +// "description": "A `Source` is a descriptor for

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

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,103 @@ +//===-- 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-dap] Updating RequestHandler to encode/decode arguments and response. (PR #130090)

2025-03-11 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] Support vscode launch URLs (PR #125843)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,37 @@ +import * as vscode from "vscode"; + +export class LaunchUriHandler implements vscode.UriHandler { +async handleUri(uri: vscode.Uri) { +try { +const params = new URLSearchParams(uri.query); +if (uri.path == '/launch/config') { -

[Lldb-commits] [lldb] [lldb-dap] Support vscode launch URLs (PR #125843)

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
https://github.com/vogelsgesang updated https://github.com/llvm/llvm-project/pull/125843 >From 48e900c6a8bd24c7cbee057eb0d96b9f0b2b4f84 Mon Sep 17 00:00:00 2001 From: Adrian Vogelsgesang Date: Wed, 5 Feb 2025 10:11:38 + Subject: [PATCH 1/3] [lldb-dap] Support vscode launch URLs This commit

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

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

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

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

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

2025-03-11 Thread Adrian Vogelsgesang via lldb-commits
@@ -0,0 +1,11 @@ + +int main() { + + int var_1 = 10; + + var_1 = 20; // breakpoint 1 + + int var_2 = 40; // goto 1 + + return 0; +} vogelsgesang wrote: missing trailing new line https://github.com/llvm/llvm-project/pull/130503 ___

  1   2   3   4   5   6   >