Updated protocol version to 1.70.0.
Some checks failed
/ ci (clang, clang++) (push) Has been cancelled
/ ci (gcc, g++) (push) Has been cancelled

This commit is contained in:
Patrick 2025-04-03 18:13:48 +02:00
parent 6464cd7bd0
commit dc0bbaaf54
9 changed files with 224 additions and 48 deletions

View File

@ -14,7 +14,7 @@
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)

View File

@ -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"

View File

@ -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) \

View File

@ -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'

View File

@ -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,

View File

@ -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"),

View File

@ -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"));

View File

@ -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,17 +315,19 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Thread,
DAP_FIELD(id, "id"),
DAP_FIELD(name, "name"));
DAP_IMPLEMENT_STRUCT_TYPEINFO(Variable,
"",
DAP_FIELD(evaluateName, "evaluateName"),
DAP_FIELD(indexedVariables, "indexedVariables"),
DAP_FIELD(memoryReference, "memoryReference"),
DAP_FIELD(name, "name"),
DAP_FIELD(namedVariables, "namedVariables"),
DAP_FIELD(presentationHint, "presentationHint"),
DAP_FIELD(type, "type"),
DAP_FIELD(value, "value"),
DAP_FIELD(variablesReference,
"variablesReference"));
DAP_IMPLEMENT_STRUCT_TYPEINFO(
Variable,
"",
DAP_FIELD(declarationLocationReference, "declarationLocationReference"),
DAP_FIELD(evaluateName, "evaluateName"),
DAP_FIELD(indexedVariables, "indexedVariables"),
DAP_FIELD(memoryReference, "memoryReference"),
DAP_FIELD(name, "name"),
DAP_FIELD(namedVariables, "namedVariables"),
DAP_FIELD(presentationHint, "presentationHint"),
DAP_FIELD(type, "type"),
DAP_FIELD(value, "value"),
DAP_FIELD(valueLocationReference, "valueLocationReference"),
DAP_FIELD(variablesReference, "variablesReference"));
} // namespace dap

View File

@ -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)
}