Compare commits
11 Commits
0f943b3357
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| dc0bbaaf54 | |||
|
|
6464cd7bd0 | ||
|
|
40461f0f95 | ||
|
|
4954832054 | ||
|
|
3c3c32a059 | ||
|
|
d01c822bf0 | ||
|
|
a43b6c36e8 | ||
|
|
167b131a66 | ||
|
|
82beeea910 | ||
|
|
9fd09d6dce | ||
|
|
c69444ed76 |
4
.github/workflows/main.yml
vendored
4
.github/workflows/main.yml
vendored
@@ -42,7 +42,7 @@ jobs:
|
||||
cmake --build .
|
||||
DESTDIR=../out cmake --install .
|
||||
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: cppdap
|
||||
name: cppdap-${{ matrix.CC }}
|
||||
path: out/usr/local/
|
||||
@@ -12,9 +12,9 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
cmake_minimum_required(VERSION 3.22)
|
||||
|
||||
project(cppdap VERSION 1.65.0 LANGUAGES CXX C)
|
||||
project(cppdap VERSION 1.70.0 LANGUAGES CXX C)
|
||||
|
||||
set (CMAKE_CXX_STANDARD 11)
|
||||
|
||||
@@ -298,21 +298,19 @@ if(CPPDAP_BUILD_TESTS)
|
||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||
find_package(GTest REQUIRED)
|
||||
else()
|
||||
list(APPEND DAP_TEST_LIST
|
||||
${CPPDAP_GOOGLETEST_DIR}/googletest/src/gtest-all.cc
|
||||
)
|
||||
|
||||
set(DAP_TEST_INCLUDE_DIR
|
||||
${CPPDAP_GOOGLETEST_DIR}/googlemock/include/
|
||||
${CPPDAP_GOOGLETEST_DIR}/googletest/
|
||||
${CPPDAP_GOOGLETEST_DIR}/googletest/include/
|
||||
)
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
set(INSTALL_GTEST OFF CACHE BOOL "" FORCE)
|
||||
add_subdirectory(${CPPDAP_GOOGLETEST_DIR})
|
||||
# googletest has -Werror=maybe-uninitialized problems.
|
||||
# Disable all warnings in googletest code.
|
||||
target_compile_options(gtest PRIVATE -w)
|
||||
# gmock has -Werror=deprecated-copy problems.
|
||||
target_compile_options(gmock PRIVATE -w)
|
||||
endif()
|
||||
|
||||
add_executable(cppdap-unittests ${DAP_TEST_LIST})
|
||||
add_test(NAME cppdap-unittests COMMAND cppdap-unittests)
|
||||
|
||||
target_include_directories(cppdap-unittests PUBLIC ${DAP_TEST_INCLUDE_DIR} )
|
||||
set_target_properties(cppdap-unittests PROPERTIES
|
||||
FOLDER "Tests"
|
||||
)
|
||||
@@ -326,7 +324,7 @@ if(CPPDAP_BUILD_TESTS)
|
||||
if(CPPDAP_USE_EXTERNAL_GTEST_PACKAGE)
|
||||
target_link_libraries(cppdap-unittests PRIVATE cppdap GTest::gtest)
|
||||
else()
|
||||
target_link_libraries(cppdap-unittests PRIVATE cppdap)
|
||||
target_link_libraries(cppdap-unittests PRIVATE cppdap gtest gmock)
|
||||
endif()
|
||||
endif(CPPDAP_BUILD_TESTS)
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
# Copyright 2020 The Marl Authors.
|
||||
# Copyright 2020 Google LLC
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
|
||||
@@ -20,6 +20,7 @@
|
||||
"args"
|
||||
"argsCanBeInterpretedByShell"
|
||||
"arguments"
|
||||
"asAddress"
|
||||
"attach"
|
||||
"attachForSuspendedLaunch"
|
||||
"attributeName"
|
||||
@@ -32,6 +33,7 @@
|
||||
"breakpointLocations"
|
||||
"breakpointModes"
|
||||
"breakpoints"
|
||||
"bytes"
|
||||
"bytesWritten"
|
||||
"canPersist"
|
||||
"canRestart"
|
||||
@@ -72,6 +74,7 @@
|
||||
"dataBreakpointInfo"
|
||||
"dataId"
|
||||
"dateTimeStamp"
|
||||
"declarationLocationReference"
|
||||
"deemphasize"
|
||||
"default"
|
||||
"description"
|
||||
@@ -161,6 +164,8 @@
|
||||
"locale"
|
||||
"locals"
|
||||
"location"
|
||||
"locationReference"
|
||||
"locations"
|
||||
"logMessage"
|
||||
"memory"
|
||||
"memoryReference"
|
||||
@@ -226,6 +231,7 @@
|
||||
"restart"
|
||||
"restartFrame"
|
||||
"result"
|
||||
"returnValue"
|
||||
"reverseContinue"
|
||||
"runInTerminal"
|
||||
"scopes"
|
||||
@@ -275,6 +281,7 @@
|
||||
"supportSuspendDebuggee"
|
||||
"supportTerminateDebuggee"
|
||||
"supportedChecksumAlgorithms"
|
||||
"supportsANSIStyling"
|
||||
"supportsArgsCanBeInterpretedByShell"
|
||||
"supportsBreakpointLocationsRequest"
|
||||
"supportsCancelRequest"
|
||||
@@ -283,6 +290,7 @@
|
||||
"supportsCondition"
|
||||
"supportsConditionalBreakpoints"
|
||||
"supportsConfigurationDoneRequest"
|
||||
"supportsDataBreakpointBytes"
|
||||
"supportsDataBreakpoints"
|
||||
"supportsDelayedStackTraceLoading"
|
||||
"supportsDisassembleRequest"
|
||||
@@ -350,6 +358,7 @@
|
||||
"urlLabel"
|
||||
"userUnhandled"
|
||||
"value"
|
||||
"valueLocationReference"
|
||||
"variable"
|
||||
"variables"
|
||||
"variablesReference"
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#ifndef dap_fuzzer_h
|
||||
#define dap_fuzzer_h
|
||||
@@ -40,6 +40,7 @@
|
||||
DAP_REQUEST(dap::InitializeRequest, dap::InitializeResponse) \
|
||||
DAP_REQUEST(dap::LaunchRequest, dap::LaunchResponse) \
|
||||
DAP_REQUEST(dap::LoadedSourcesRequest, dap::LoadedSourcesResponse) \
|
||||
DAP_REQUEST(dap::LocationsRequest, dap::LocationsResponse) \
|
||||
DAP_REQUEST(dap::ModulesRequest, dap::ModulesResponse) \
|
||||
DAP_REQUEST(dap::NextRequest, dap::NextResponse) \
|
||||
DAP_REQUEST(dap::PauseRequest, dap::PauseResponse) \
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <stdint.h>
|
||||
|
||||
namespace dap {
|
||||
class ReaderWriter;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#ifndef dap_protocol_h
|
||||
#define dap_protocol_h
|
||||
@@ -364,6 +364,9 @@ struct Capabilities {
|
||||
optional<boolean> supportTerminateDebuggee;
|
||||
// Checksum algorithms supported by the debug adapter.
|
||||
optional<array<ChecksumAlgorithm>> supportedChecksumAlgorithms;
|
||||
// The debug adapter supports ANSI escape sequences in styling of
|
||||
// `OutputEvent.output` and `Variable.value` fields.
|
||||
optional<boolean> supportsANSIStyling;
|
||||
// The debug adapter supports the `breakpointLocations` request.
|
||||
optional<boolean> supportsBreakpointLocationsRequest;
|
||||
// The debug adapter supports the `cancel` request.
|
||||
@@ -377,6 +380,9 @@ struct Capabilities {
|
||||
optional<boolean> supportsConditionalBreakpoints;
|
||||
// The debug adapter supports the `configurationDone` request.
|
||||
optional<boolean> supportsConfigurationDoneRequest;
|
||||
// The debug adapter supports the `asAddress` and `bytes` fields in the
|
||||
// `dataBreakpointInfo` request.
|
||||
optional<boolean> supportsDataBreakpointBytes;
|
||||
// The debug adapter supports data breakpoints.
|
||||
optional<boolean> supportsDataBreakpoints;
|
||||
// The debug adapter supports the delayed loading of parts of the stack, which
|
||||
@@ -564,8 +570,8 @@ DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneRequest);
|
||||
|
||||
// Response to `continue` request.
|
||||
struct ContinueResponse : public Response {
|
||||
// The value true (or a missing property) signals to the client that all
|
||||
// threads have been resumed. The value false indicates that not all threads
|
||||
// If omitted or set to `true`, this response signals to the client that all
|
||||
// threads have been resumed. The value `false` indicates that not all threads
|
||||
// were resumed.
|
||||
optional<boolean> allThreadsContinued;
|
||||
};
|
||||
@@ -596,8 +602,9 @@ DAP_DECLARE_STRUCT_TYPEINFO(ContinueRequest);
|
||||
// `continue`. It is only necessary to send a `continued` event if there was no
|
||||
// previous request that implied this.
|
||||
struct ContinuedEvent : public Event {
|
||||
// If `allThreadsContinued` is true, a debug adapter can announce that all
|
||||
// threads have continued.
|
||||
// If omitted or set to `true`, this event signals to the client that all
|
||||
// threads have been resumed. The value `false` indicates that not all threads
|
||||
// were resumed.
|
||||
optional<boolean> allThreadsContinued;
|
||||
// The thread which was continued.
|
||||
integer threadId;
|
||||
@@ -639,6 +646,20 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointInfoResponse);
|
||||
// corresponding capability `supportsDataBreakpoints` is true.
|
||||
struct DataBreakpointInfoRequest : public Request {
|
||||
using Response = DataBreakpointInfoResponse;
|
||||
// If `true`, the `name` is a memory address and the debugger should interpret
|
||||
// it as a decimal value, or hex value if it is prefixed with `0x`.
|
||||
//
|
||||
// Clients may set this property only if the `supportsDataBreakpointBytes`
|
||||
// capability is true.
|
||||
optional<boolean> asAddress;
|
||||
// If specified, a debug adapter should return information for the range of
|
||||
// memory extending `bytes` number of bytes from the address or variable
|
||||
// specified by `name`. Breakpoints set using the resulting data ID should
|
||||
// pause on data access anywhere within that range.
|
||||
//
|
||||
// Clients may set this property only if the `supportsDataBreakpointBytes`
|
||||
// capability is true.
|
||||
optional<integer> bytes;
|
||||
// When `name` is an expression, evaluate it in the scope of this stack frame.
|
||||
// If not specified, the expression is evaluated in the global scope. When
|
||||
// `variablesReference` is specified, this property has no effect.
|
||||
@@ -647,7 +668,8 @@ struct DataBreakpointInfoRequest : public Request {
|
||||
// `breakpointModes` the debug adapter advertised in its `Capabilities`.
|
||||
optional<string> mode;
|
||||
// The name of the variable's child to obtain data breakpoint information for.
|
||||
// If `variablesReference` isn't specified, this can be an expression.
|
||||
// If `variablesReference` isn't specified, this can be an expression, or an
|
||||
// address if `asAddress` is also true.
|
||||
string name;
|
||||
// Reference to the variable container if the data breakpoint is requested for
|
||||
// a child of the container. The `variablesReference` must have been obtained
|
||||
@@ -860,6 +882,14 @@ struct EvaluateResponse : public Response {
|
||||
// This attribute should only be returned by a debug adapter if the
|
||||
// corresponding capability `supportsVariableType` is true.
|
||||
optional<string> type;
|
||||
// A reference that allows the client to request the location where the
|
||||
// returned value is declared. For example, if a function pointer is returned,
|
||||
// the adapter may be able to look up the function's location. This should be
|
||||
// present only if the adapter is likely to be able to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> valueLocationReference;
|
||||
// If `variablesReference` is > 0, the evaluate result is structured and its
|
||||
// children can be retrieved by passing `variablesReference` to the
|
||||
// `variables` request as long as execution remains suspended. See 'Lifetime
|
||||
@@ -877,10 +907,16 @@ struct ValueFormat {
|
||||
|
||||
DAP_DECLARE_STRUCT_TYPEINFO(ValueFormat);
|
||||
|
||||
// Evaluates the given expression in the context of the topmost stack frame.
|
||||
// Evaluates the given expression in the context of a stack frame.
|
||||
// The expression has access to any variables and arguments that are in scope.
|
||||
struct EvaluateRequest : public Request {
|
||||
using Response = EvaluateResponse;
|
||||
// The contextual column where the expression should be evaluated. This may be
|
||||
// provided if `line` is also provided.
|
||||
//
|
||||
// It is measured in UTF-16 code units and the client capability
|
||||
// `columnsStartAt1` determines whether it is 0- or 1-based.
|
||||
optional<integer> column;
|
||||
// The context in which the evaluate request is used.
|
||||
//
|
||||
// May be one of the following enumeration values:
|
||||
@@ -895,6 +931,13 @@ struct EvaluateRequest : public Request {
|
||||
// Evaluate the expression in the scope of this stack frame. If not specified,
|
||||
// the expression is evaluated in the global scope.
|
||||
optional<integer> frameId;
|
||||
// The contextual line where the expression should be evaluated. In the
|
||||
// 'hover' context, this should be set to the start of the expression being
|
||||
// hovered.
|
||||
optional<integer> line;
|
||||
// The contextual source in which the `line` is found. This must be provided
|
||||
// if `line` is provided.
|
||||
optional<Source> source;
|
||||
};
|
||||
|
||||
DAP_DECLARE_STRUCT_TYPEINFO(EvaluateRequest);
|
||||
@@ -1057,6 +1100,9 @@ struct InitializeResponse : public Response {
|
||||
optional<boolean> supportTerminateDebuggee;
|
||||
// Checksum algorithms supported by the debug adapter.
|
||||
optional<array<ChecksumAlgorithm>> supportedChecksumAlgorithms;
|
||||
// The debug adapter supports ANSI escape sequences in styling of
|
||||
// `OutputEvent.output` and `Variable.value` fields.
|
||||
optional<boolean> supportsANSIStyling;
|
||||
// The debug adapter supports the `breakpointLocations` request.
|
||||
optional<boolean> supportsBreakpointLocationsRequest;
|
||||
// The debug adapter supports the `cancel` request.
|
||||
@@ -1070,6 +1116,9 @@ struct InitializeResponse : public Response {
|
||||
optional<boolean> supportsConditionalBreakpoints;
|
||||
// The debug adapter supports the `configurationDone` request.
|
||||
optional<boolean> supportsConfigurationDoneRequest;
|
||||
// The debug adapter supports the `asAddress` and `bytes` fields in the
|
||||
// `dataBreakpointInfo` request.
|
||||
optional<boolean> supportsDataBreakpointBytes;
|
||||
// The debug adapter supports data breakpoints.
|
||||
optional<boolean> supportsDataBreakpoints;
|
||||
// The debug adapter supports the delayed loading of parts of the stack, which
|
||||
@@ -1171,6 +1220,10 @@ struct InitializeRequest : public Request {
|
||||
// May be one of the following enumeration values:
|
||||
// 'path', 'uri'
|
||||
optional<string> pathFormat;
|
||||
// The client will interpret ANSI escape sequences in the display of
|
||||
// `OutputEvent.output` and `Variable.value` fields when
|
||||
// `Capabilities.supportsANSIStyling` is also enabled.
|
||||
optional<boolean> supportsANSIStyling;
|
||||
// Client supports the `argsCanBeInterpretedByShell` attribute on the
|
||||
// `runInTerminal` request.
|
||||
optional<boolean> supportsArgsCanBeInterpretedByShell;
|
||||
@@ -1296,6 +1349,40 @@ struct LoadedSourcesRequest : public Request {
|
||||
|
||||
DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesRequest);
|
||||
|
||||
// Response to `locations` request.
|
||||
struct LocationsResponse : public Response {
|
||||
// Position of the location within the `line`. It is measured in UTF-16 code
|
||||
// units and the client capability `columnsStartAt1` determines whether it is
|
||||
// 0- or 1-based. If no column is given, the first position in the start line
|
||||
// is assumed.
|
||||
optional<integer> column;
|
||||
// End position of the location within `endLine`, present if the location
|
||||
// refers to a range. It is measured in UTF-16 code units and the client
|
||||
// capability `columnsStartAt1` determines whether it is 0- or 1-based.
|
||||
optional<integer> endColumn;
|
||||
// End line of the location, present if the location refers to a range. The
|
||||
// client capability `linesStartAt1` determines whether it is 0- or 1-based.
|
||||
optional<integer> endLine;
|
||||
// The line number of the location. The client capability `linesStartAt1`
|
||||
// determines whether it is 0- or 1-based.
|
||||
integer line;
|
||||
// The source containing the location; either `source.path` or
|
||||
// `source.sourceReference` must be specified.
|
||||
Source source;
|
||||
};
|
||||
|
||||
DAP_DECLARE_STRUCT_TYPEINFO(LocationsResponse);
|
||||
|
||||
// Looks up information about a location reference previously returned by the
|
||||
// debug adapter.
|
||||
struct LocationsRequest : public Request {
|
||||
using Response = LocationsResponse;
|
||||
// Location reference to resolve.
|
||||
integer locationReference;
|
||||
};
|
||||
|
||||
DAP_DECLARE_STRUCT_TYPEINFO(LocationsRequest);
|
||||
|
||||
// This event indicates that some memory range has been updated. It should only
|
||||
// be sent if the corresponding capability `supportsMemoryEvent` is true.
|
||||
// Clients typically react to the event by re-issuing a `readMemory` request if
|
||||
@@ -1458,7 +1545,23 @@ struct OutputEvent : public Event {
|
||||
optional<string> group;
|
||||
// The source location's line where the output was produced.
|
||||
optional<integer> line;
|
||||
// A reference that allows the client to request the location where the new
|
||||
// value is declared. For example, if the logged value is function pointer,
|
||||
// the adapter may be able to look up the function's location. This should be
|
||||
// present only if the adapter is likely to be able to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> locationReference;
|
||||
// The output to report.
|
||||
//
|
||||
// ANSI escape sequences may be used to influence text color and styling if
|
||||
// `supportsANSIStyling` is present in both the adapter's `Capabilities` and
|
||||
// the client's `InitializeRequestArguments`. A client may strip any
|
||||
// unrecognized ANSI sequences.
|
||||
//
|
||||
// If the `supportsANSIStyling` capabilities are not both true, then the
|
||||
// client should display the output literally.
|
||||
string output;
|
||||
// The source location where the output was produced.
|
||||
optional<Source> source;
|
||||
@@ -1505,8 +1608,9 @@ struct ProcessEvent : public Event {
|
||||
// Must be one of the following enumeration values:
|
||||
// 'launch', 'attach', 'attachForSuspendedLaunch'
|
||||
optional<string> startMethod;
|
||||
// The system process id of the debugged process. This property is missing for
|
||||
// non-system processes.
|
||||
// The process ID of the debugged process, as assigned by the operating
|
||||
// system. This property should be omitted for logical processes that do not
|
||||
// map to operating system processes on the machine.
|
||||
optional<integer> systemProcessId;
|
||||
};
|
||||
|
||||
@@ -1763,7 +1867,7 @@ struct Scope {
|
||||
// missing, the scope is shown with a generic UI.
|
||||
//
|
||||
// May be one of the following enumeration values:
|
||||
// 'arguments', 'locals', 'registers'
|
||||
// 'arguments', 'locals', 'registers', 'returnValue'
|
||||
optional<string> presentationHint;
|
||||
// The source for this scope.
|
||||
optional<Source> source;
|
||||
@@ -2028,6 +2132,14 @@ struct SetExpressionResponse : public Response {
|
||||
optional<string> type;
|
||||
// The new value of the expression.
|
||||
string value;
|
||||
// A reference that allows the client to request the location where the new
|
||||
// value is declared. For example, if the new value is function pointer, the
|
||||
// adapter may be able to look up the function's location. This should be
|
||||
// present only if the adapter is likely to be able to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> valueLocationReference;
|
||||
// If `variablesReference` is > 0, the evaluate result is structured and its
|
||||
// children can be retrieved by passing `variablesReference` to the
|
||||
// `variables` request as long as execution remains suspended. See 'Lifetime
|
||||
@@ -2170,10 +2282,22 @@ struct SetVariableResponse : public Response {
|
||||
optional<string> type;
|
||||
// The new value of the variable.
|
||||
string value;
|
||||
// A reference that allows the client to request the location where the new
|
||||
// value is declared. For example, if the new value is function pointer, the
|
||||
// adapter may be able to look up the function's location. This should be
|
||||
// present only if the adapter is likely to be able to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> valueLocationReference;
|
||||
// If `variablesReference` is > 0, the new value is structured and its
|
||||
// children can be retrieved by passing `variablesReference` to the
|
||||
// `variables` request as long as execution remains suspended. See 'Lifetime
|
||||
// of Object References' in the Overview section for details.
|
||||
//
|
||||
// If this property is included in the response, any `variablesReference`
|
||||
// previously associated with the updated variable, and those of its children,
|
||||
// are no longer valid.
|
||||
optional<integer> variablesReference;
|
||||
};
|
||||
|
||||
@@ -2226,11 +2350,11 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceRequest);
|
||||
|
||||
// A Stackframe contains the source location.
|
||||
struct StackFrame {
|
||||
// Indicates whether this frame can be restarted with the `restart` request.
|
||||
// Clients should only use this if the debug adapter supports the `restart`
|
||||
// request and the corresponding capability `supportsRestartRequest` is true.
|
||||
// If a debug adapter has this capability, then `canRestart` defaults to
|
||||
// `true` if the property is absent.
|
||||
// Indicates whether this frame can be restarted with the `restartFrame`
|
||||
// request. Clients should only use this if the debug adapter supports the
|
||||
// `restart` request and the corresponding capability `supportsRestartFrame`
|
||||
// is true. If a debug adapter has this capability, then `canRestart` defaults
|
||||
// to `true` if the property is absent.
|
||||
optional<boolean> canRestart;
|
||||
// Start position of the range covered by the stack frame. It is measured in
|
||||
// UTF-16 code units and the client capability `columnsStartAt1` determines
|
||||
@@ -2321,9 +2445,10 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackFrameFormat);
|
||||
// indication that the end of the stack has been reached.
|
||||
struct StackTraceRequest : public Request {
|
||||
using Response = StackTraceResponse;
|
||||
// Specifies details on how to format the stack frames.
|
||||
// The attribute is only honored by a debug adapter if the corresponding
|
||||
// capability `supportsValueFormattingOptions` is true.
|
||||
// Specifies details on how to format the returned `StackFrame.name`. The
|
||||
// debug adapter may format requested details in any way that would make sense
|
||||
// to a developer. The attribute is only honored by a debug adapter if the
|
||||
// corresponding capability `supportsValueFormattingOptions` is true.
|
||||
optional<StackFrameFormat> format;
|
||||
// The maximum number of frames to return. If levels is not specified or 0,
|
||||
// all frames are returned.
|
||||
@@ -2646,6 +2771,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadsRequest);
|
||||
// `namedVariables` and `indexedVariables` attributes. The client can use this
|
||||
// information to present the children in a paged UI and fetch them in chunks.
|
||||
struct Variable {
|
||||
// A reference that allows the client to request the location where the
|
||||
// variable is declared. This should be present only if the adapter is likely
|
||||
// to be able to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> declarationLocationReference;
|
||||
// The evaluatable name of this variable which can be passed to the `evaluate`
|
||||
// request to fetch the variable's value.
|
||||
optional<string> evaluateName;
|
||||
@@ -2681,6 +2813,15 @@ struct Variable {
|
||||
// its children are not yet visible. An empty string can be used if no value
|
||||
// should be shown in the UI.
|
||||
string value;
|
||||
// A reference that allows the client to request the location where the
|
||||
// variable's value is declared. For example, if the variable contains a
|
||||
// function pointer, the adapter may be able to look up the function's
|
||||
// location. This should be present only if the adapter is likely to be able
|
||||
// to resolve the location.
|
||||
//
|
||||
// This reference shares the same lifetime as the `variablesReference`. See
|
||||
// 'Lifetime of Object References' in the Overview section for details.
|
||||
optional<integer> valueLocationReference;
|
||||
// If `variablesReference` is > 0, the variable is structured and its children
|
||||
// can be retrieved by passing `variablesReference` to the `variables` request
|
||||
// as long as execution remains suspended. See 'Lifetime of Object References'
|
||||
|
||||
@@ -20,8 +20,6 @@ SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd )"
|
||||
ROOT_DIR="$( cd "${SCRIPT_DIR}/../.." >/dev/null 2>&1 && pwd )"
|
||||
|
||||
docker run --rm -i \
|
||||
--volume "${ROOT_DIR}:${ROOT_DIR}" \
|
||||
--volume "${KOKORO_ARTIFACTS_DIR}:/mnt/artifacts" \
|
||||
--volume "${ROOT_DIR}:${ROOT_DIR}:ro" \
|
||||
--workdir "${ROOT_DIR}" \
|
||||
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
|
||||
"gcr.io/shaderc-build/radial-build:latest"
|
||||
us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/license-checker
|
||||
@@ -1,19 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Copyright 2020 The Marl Authors.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e # Fail on any error.
|
||||
|
||||
license-checker
|
||||
@@ -1,4 +1,4 @@
|
||||
# Format: //devtools/kokoro/config/proto/build.proto
|
||||
|
||||
build_file: "cppdap/kokoro/license-check/presubmit.sh"
|
||||
build_file: "cppdap/kokoro/license-check/build.sh"
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ git config --global --add safe.directory '*'
|
||||
git submodule update --init
|
||||
|
||||
if [ "$BUILD_SYSTEM" == "cmake" ]; then
|
||||
using cmake-3.17.2
|
||||
using gcc-9
|
||||
using cmake-3.31.2
|
||||
using gcc-13
|
||||
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
@@ -29,4 +29,4 @@ docker run --rm -i \
|
||||
--env BUILD_TARGET_ARCH=$BUILD_TARGET_ARCH \
|
||||
--env BUILD_SANITIZER=$BUILD_SANITIZER \
|
||||
--entrypoint "${SCRIPT_DIR}/presubmit-docker.sh" \
|
||||
"gcr.io/shaderc-build/radial-build:latest"
|
||||
us-east4-docker.pkg.dev/shaderc-build/radial-docker/ubuntu-24.04-amd64/cpp-builder
|
||||
|
||||
@@ -17,7 +17,7 @@ REM limitations under the License.
|
||||
SETLOCAL ENABLEDELAYEDEXPANSION
|
||||
|
||||
SET BUILD_ROOT=%cd%
|
||||
SET PATH=C:\python36;C:\Program Files\cmake-3.23.1-windows-x86_64\bin;%PATH%
|
||||
SET PATH=C:\python312;C:\cmake-3.31.2\bin;%PATH%
|
||||
SET SRC=%cd%\github\cppdap
|
||||
|
||||
cd %SRC%
|
||||
@@ -26,7 +26,6 @@ if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
git submodule update --init
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
|
||||
SET MSBUILD="C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild"
|
||||
SET CONFIG=Release
|
||||
|
||||
mkdir %SRC%\build
|
||||
@@ -34,11 +33,11 @@ cd %SRC%\build
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
|
||||
IF /I "%BUILD_SYSTEM%"=="cmake" (
|
||||
cmake .. -G "%BUILD_GENERATOR%" "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
|
||||
cmake .. -G "%BUILD_GENERATOR%" -A %BUILD_TARGET_ARCH% "-DCPPDAP_BUILD_TESTS=1" "-DCPPDAP_BUILD_EXAMPLES=1" "-DCPPDAP_WARNINGS_AS_ERRORS=1"
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
%MSBUILD% /p:Configuration=%CONFIG% cppdap.sln
|
||||
cmake --build . --config %CONFIG%
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
Release\cppdap-unittests.exe
|
||||
%CONFIG%\cppdap-unittests.exe
|
||||
if !ERRORLEVEL! neq 0 exit !ERRORLEVEL!
|
||||
) ELSE (
|
||||
echo "Unknown build system: %BUILD_SYSTEM%"
|
||||
|
||||
@@ -10,7 +10,7 @@ env_vars {
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_GENERATOR"
|
||||
value: "Visual Studio 15 2017 Win64"
|
||||
value: "Visual Studio 17 2022"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
@@ -10,10 +10,10 @@ env_vars {
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_GENERATOR"
|
||||
value: "Visual Studio 15 2017"
|
||||
value: "Visual Studio 17 2022"
|
||||
}
|
||||
|
||||
env_vars {
|
||||
key: "BUILD_TARGET_ARCH"
|
||||
value: "x86"
|
||||
value: "Win32"
|
||||
}
|
||||
@@ -8,6 +8,7 @@
|
||||
"exclude": [
|
||||
".clang-format",
|
||||
".gitattributes",
|
||||
".github/workflows/main.yml",
|
||||
".gitignore",
|
||||
".gitmodules",
|
||||
".vscode/*.json",
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#include "dap/protocol.h"
|
||||
|
||||
@@ -71,6 +71,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(OutputEvent,
|
||||
DAP_FIELD(data, "data"),
|
||||
DAP_FIELD(group, "group"),
|
||||
DAP_FIELD(line, "line"),
|
||||
DAP_FIELD(locationReference, "locationReference"),
|
||||
DAP_FIELD(output, "output"),
|
||||
DAP_FIELD(source, "source"),
|
||||
DAP_FIELD(variablesReference,
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#include "dap/protocol.h"
|
||||
|
||||
@@ -54,6 +54,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinueRequest,
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoRequest,
|
||||
"dataBreakpointInfo",
|
||||
DAP_FIELD(asAddress, "asAddress"),
|
||||
DAP_FIELD(bytes, "bytes"),
|
||||
DAP_FIELD(frameId, "frameId"),
|
||||
DAP_FIELD(mode, "mode"),
|
||||
DAP_FIELD(name, "name"),
|
||||
@@ -77,10 +79,13 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DisconnectRequest,
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateRequest,
|
||||
"evaluate",
|
||||
DAP_FIELD(column, "column"),
|
||||
DAP_FIELD(context, "context"),
|
||||
DAP_FIELD(expression, "expression"),
|
||||
DAP_FIELD(format, "format"),
|
||||
DAP_FIELD(frameId, "frameId"));
|
||||
DAP_FIELD(frameId, "frameId"),
|
||||
DAP_FIELD(line, "line"),
|
||||
DAP_FIELD(source, "source"));
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoRequest,
|
||||
"exceptionInfo",
|
||||
@@ -107,6 +112,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
DAP_FIELD(linesStartAt1, "linesStartAt1"),
|
||||
DAP_FIELD(locale, "locale"),
|
||||
DAP_FIELD(pathFormat, "pathFormat"),
|
||||
DAP_FIELD(supportsANSIStyling, "supportsANSIStyling"),
|
||||
DAP_FIELD(supportsArgsCanBeInterpretedByShell,
|
||||
"supportsArgsCanBeInterpretedByShell"),
|
||||
DAP_FIELD(supportsInvalidatedEvent, "supportsInvalidatedEvent"),
|
||||
@@ -125,6 +131,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(LaunchRequest,
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesRequest, "loadedSources");
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(LocationsRequest,
|
||||
"locations",
|
||||
DAP_FIELD(locationReference,
|
||||
"locationReference"));
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesRequest,
|
||||
"modules",
|
||||
DAP_FIELD(moduleCount, "moduleCount"),
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#include "dap/protocol.h"
|
||||
|
||||
@@ -63,6 +63,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateResponse,
|
||||
DAP_FIELD(presentationHint, "presentationHint"),
|
||||
DAP_FIELD(result, "result"),
|
||||
DAP_FIELD(type, "type"),
|
||||
DAP_FIELD(valueLocationReference,
|
||||
"valueLocationReference"),
|
||||
DAP_FIELD(variablesReference,
|
||||
"variablesReference"));
|
||||
|
||||
@@ -89,6 +91,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
DAP_FIELD(supportSuspendDebuggee, "supportSuspendDebuggee"),
|
||||
DAP_FIELD(supportTerminateDebuggee, "supportTerminateDebuggee"),
|
||||
DAP_FIELD(supportedChecksumAlgorithms, "supportedChecksumAlgorithms"),
|
||||
DAP_FIELD(supportsANSIStyling, "supportsANSIStyling"),
|
||||
DAP_FIELD(supportsBreakpointLocationsRequest,
|
||||
"supportsBreakpointLocationsRequest"),
|
||||
DAP_FIELD(supportsCancelRequest, "supportsCancelRequest"),
|
||||
@@ -97,6 +100,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
DAP_FIELD(supportsConditionalBreakpoints, "supportsConditionalBreakpoints"),
|
||||
DAP_FIELD(supportsConfigurationDoneRequest,
|
||||
"supportsConfigurationDoneRequest"),
|
||||
DAP_FIELD(supportsDataBreakpointBytes, "supportsDataBreakpointBytes"),
|
||||
DAP_FIELD(supportsDataBreakpoints, "supportsDataBreakpoints"),
|
||||
DAP_FIELD(supportsDelayedStackTraceLoading,
|
||||
"supportsDelayedStackTraceLoading"),
|
||||
@@ -135,6 +139,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesResponse,
|
||||
"",
|
||||
DAP_FIELD(sources, "sources"));
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(LocationsResponse,
|
||||
"",
|
||||
DAP_FIELD(column, "column"),
|
||||
DAP_FIELD(endColumn, "endColumn"),
|
||||
DAP_FIELD(endLine, "endLine"),
|
||||
DAP_FIELD(line, "line"),
|
||||
DAP_FIELD(source, "source"));
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesResponse,
|
||||
"",
|
||||
DAP_FIELD(modules, "modules"),
|
||||
@@ -183,6 +195,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse,
|
||||
DAP_FIELD(presentationHint, "presentationHint"),
|
||||
DAP_FIELD(type, "type"),
|
||||
DAP_FIELD(value, "value"),
|
||||
DAP_FIELD(valueLocationReference,
|
||||
"valueLocationReference"),
|
||||
DAP_FIELD(variablesReference,
|
||||
"variablesReference"));
|
||||
|
||||
@@ -201,6 +215,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse,
|
||||
DAP_FIELD(namedVariables, "namedVariables"),
|
||||
DAP_FIELD(type, "type"),
|
||||
DAP_FIELD(value, "value"),
|
||||
DAP_FIELD(valueLocationReference,
|
||||
"valueLocationReference"),
|
||||
DAP_FIELD(variablesReference,
|
||||
"variablesReference"));
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
// Generated with protocol_gen.go -- do not edit this file.
|
||||
// go run scripts/protocol_gen/protocol_gen.go
|
||||
//
|
||||
// DAP version 1.65.0
|
||||
// DAP version 1.70.0
|
||||
|
||||
#include "dap/protocol.h"
|
||||
|
||||
@@ -95,6 +95,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
DAP_FIELD(supportSuspendDebuggee, "supportSuspendDebuggee"),
|
||||
DAP_FIELD(supportTerminateDebuggee, "supportTerminateDebuggee"),
|
||||
DAP_FIELD(supportedChecksumAlgorithms, "supportedChecksumAlgorithms"),
|
||||
DAP_FIELD(supportsANSIStyling, "supportsANSIStyling"),
|
||||
DAP_FIELD(supportsBreakpointLocationsRequest,
|
||||
"supportsBreakpointLocationsRequest"),
|
||||
DAP_FIELD(supportsCancelRequest, "supportsCancelRequest"),
|
||||
@@ -103,6 +104,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
DAP_FIELD(supportsConditionalBreakpoints, "supportsConditionalBreakpoints"),
|
||||
DAP_FIELD(supportsConfigurationDoneRequest,
|
||||
"supportsConfigurationDoneRequest"),
|
||||
DAP_FIELD(supportsDataBreakpointBytes, "supportsDataBreakpointBytes"),
|
||||
DAP_FIELD(supportsDataBreakpoints, "supportsDataBreakpoints"),
|
||||
DAP_FIELD(supportsDelayedStackTraceLoading,
|
||||
"supportsDelayedStackTraceLoading"),
|
||||
@@ -313,8 +315,10 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Thread,
|
||||
DAP_FIELD(id, "id"),
|
||||
DAP_FIELD(name, "name"));
|
||||
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(Variable,
|
||||
DAP_IMPLEMENT_STRUCT_TYPEINFO(
|
||||
Variable,
|
||||
"",
|
||||
DAP_FIELD(declarationLocationReference, "declarationLocationReference"),
|
||||
DAP_FIELD(evaluateName, "evaluateName"),
|
||||
DAP_FIELD(indexedVariables, "indexedVariables"),
|
||||
DAP_FIELD(memoryReference, "memoryReference"),
|
||||
@@ -323,7 +327,7 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Variable,
|
||||
DAP_FIELD(presentationHint, "presentationHint"),
|
||||
DAP_FIELD(type, "type"),
|
||||
DAP_FIELD(value, "value"),
|
||||
DAP_FIELD(variablesReference,
|
||||
"variablesReference"));
|
||||
DAP_FIELD(valueLocationReference, "valueLocationReference"),
|
||||
DAP_FIELD(variablesReference, "variablesReference"));
|
||||
|
||||
} // namespace dap
|
||||
|
||||
@@ -220,7 +220,8 @@ bool RapidSerializer::serialize(const dap::any& v) {
|
||||
return serialize(v.get<dap::object>());
|
||||
} else if (v.is<dap::null>()) {
|
||||
} else {
|
||||
// reachable if array or custom serialized type is nested inside other dap::object
|
||||
// reachable if array or custom serialized type is nested inside other
|
||||
// dap::object
|
||||
auto type = get_any_type(v);
|
||||
auto value = get_any_val(v);
|
||||
if (type && value) {
|
||||
|
||||
2
third_party/googletest
vendored
2
third_party/googletest
vendored
Submodule third_party/googletest updated: 0a03480824...f3c355f9dd
@@ -34,8 +34,8 @@ import (
|
||||
)
|
||||
|
||||
const (
|
||||
protocolURL = "https://raw.githubusercontent.com/microsoft/vscode-debugadapter-node/master/debugProtocol.json"
|
||||
packageURL = "https://raw.githubusercontent.com/microsoft/vscode-debugadapter-node/master/protocol/package.json"
|
||||
protocolURL = "https://microsoft.github.io/debug-adapter-protocol/debugAdapterProtocol.json"
|
||||
protocolVersion = "1.70.0"
|
||||
|
||||
versionTag = "${version}"
|
||||
commonPrologue = `// Copyright 2019 Google LLC
|
||||
@@ -782,24 +782,17 @@ type cppFiles map[cppTargetFile]*os.File
|
||||
// protocol types from the schema, writes the types to the C++ files, then runs
|
||||
// clang-format on each.
|
||||
func run() error {
|
||||
pkg := struct {
|
||||
Version string `json:"version"`
|
||||
}{}
|
||||
if err := loadJSONFile(packageURL, &pkg); err != nil {
|
||||
return fmt.Errorf("Failed to load JSON file from '%v': %w", packageURL, err)
|
||||
}
|
||||
|
||||
protocol := root{}
|
||||
if err := loadJSONFile(protocolURL, &protocol); err != nil {
|
||||
return fmt.Errorf("Failed to load JSON file from '%v': %w", protocolURL, err)
|
||||
}
|
||||
|
||||
hPath, cppPaths, cMakeListsPath, fuzzerhPath, fuzzerDictPath := outputPaths()
|
||||
if err := emitFiles(&protocol, hPath, cppPaths, fuzzerhPath, fuzzerDictPath, pkg.Version); err != nil {
|
||||
if err := emitFiles(&protocol, hPath, cppPaths, fuzzerhPath, fuzzerDictPath, protocolVersion); err != nil {
|
||||
return fmt.Errorf("Failed to emit files: %w", err)
|
||||
}
|
||||
|
||||
if err := updateCMakePackageVersion(cMakeListsPath, pkg.Version); err != nil {
|
||||
if err := updateCMakePackageVersion(cMakeListsPath, protocolVersion); err != nil {
|
||||
return fmt.Errorf("Failed to update CMakeLists.txt: %w", err)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user