@@ -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
@@ -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
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
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
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
@@ -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
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
___
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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
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
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
@@ -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
@@ -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
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
@@ -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
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
@@ -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
@@ -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.
@@ -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
@@ -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:
@@ -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
@@ -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
@@ -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
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
@@ -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
@@ -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
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
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
@@ -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
@@ -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
@@ -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",
+//
@@ -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
@@ -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
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
@@ -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",
+//
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
@@ -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
___
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
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
@@ -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
@@ -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
@@ -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
@@ -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),
-
@@ -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
@@ -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
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
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
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
@@ -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.
+
@@ -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":
@@ -6,8 +6,9 @@
//
//===--===//
-#include "RequestHandler.h"
+#include "Handler/RequestHandler.h"
#include "DAP.h"
+#include "Handler/ResponseHandler.h"
vogelsgesang wrote:
ah, and this was
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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":
@@ -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
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
@@ -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.
@@ -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):
+
@@ -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):
+
@@ -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):
+
@@ -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):
+
@@ -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":
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
@@ -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":
@@ -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
@@ -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
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
@@ -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
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
@@ -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') {
+
@@ -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') {
-
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
@@ -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
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
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
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
@@ -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
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
@@ -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
@@ -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
@@ -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.
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
@@ -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') {
-
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
@@ -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.
@@ -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.
@@ -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:
@@ -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 - 100 of 565 matches
Mail list logo