Commit 9d3f5c8f by Ben Clayton

clang: Enable -Weverything, fix all warnings

This change fixes the following warnings: ``` -Wc++98-compat-extra-semi -Wc++98-compat-local-type-template-args -Wc++98-compat-pedantic -Wc++98-compat -Wcomma -Wdeprecated-copy-dtor -Wexit-time-destructors -Wextra-semi-stmt -Wextra-semi -Wfloat-conversion -Wfloat-equal -Wformat-nonliteral -Wglobal-constructors -Winconsistent-missing-destructor-override -Wnon-virtual-dtor -Wold-style-cast -Wpadded -Wreturn-std-move-in-c++11 -Wshadow-field-in-constructor -Wshadow-uncaptured-local -Wshift-sign-overflow -Wsign-conversion -Wundef -Wunreachable-code-return -Wused-but-marked-unused -Wweak-vtables -Wzero-as-null-pointer-constant ```
parent bb3dbcd2
...@@ -78,6 +78,7 @@ set(CPPDAP_LIST ...@@ -78,6 +78,7 @@ set(CPPDAP_LIST
${CPPDAP_SRC_DIR}/protocol_types.cpp ${CPPDAP_SRC_DIR}/protocol_types.cpp
${CPPDAP_SRC_DIR}/session.cpp ${CPPDAP_SRC_DIR}/session.cpp
${CPPDAP_SRC_DIR}/socket.cpp ${CPPDAP_SRC_DIR}/socket.cpp
${CPPDAP_SRC_DIR}/typeinfo.cpp
${CPPDAP_SRC_DIR}/typeof.cpp ${CPPDAP_SRC_DIR}/typeof.cpp
) )
......
...@@ -89,7 +89,7 @@ class future { ...@@ -89,7 +89,7 @@ class future {
}; };
template <typename T> template <typename T>
future<T>::future(const std::shared_ptr<State>& state) : state(state) {} future<T>::future(const std::shared_ptr<State>& s) : state(s) {}
template <typename T> template <typename T>
bool future<T>::valid() const { bool future<T>::valid() const {
......
...@@ -37,10 +37,7 @@ struct Event {}; ...@@ -37,10 +37,7 @@ struct Event {};
// Response to 'attach' request. This is just an acknowledgement, so no body // Response to 'attach' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct AttachResponse : public Response { struct AttachResponse : public Response {};
AttachResponse();
~AttachResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(AttachResponse); DAP_DECLARE_STRUCT_TYPEINFO(AttachResponse);
...@@ -49,10 +46,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(AttachResponse); ...@@ -49,10 +46,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(AttachResponse);
// specific, the arguments for this request are not part of this specification. // specific, the arguments for this request are not part of this specification.
struct AttachRequest : public Request { struct AttachRequest : public Request {
using Response = AttachResponse; using Response = AttachResponse;
AttachRequest();
~AttachRequest();
// Optional data from the previous, restarted session. // Optional data from the previous, restarted session.
// The data is sent as the 'restart' attribute of the 'terminated' event. // The data is sent as the 'restart' attribute of the 'terminated' event.
// The client should leave the data intact. // The client should leave the data intact.
...@@ -63,18 +56,12 @@ struct AttachRequest : public Request { ...@@ -63,18 +56,12 @@ struct AttachRequest : public Request {
DAP_DECLARE_STRUCT_TYPEINFO(AttachRequest); DAP_DECLARE_STRUCT_TYPEINFO(AttachRequest);
// Names of checksum algorithms that may be supported by a debug adapter. // Names of checksum algorithms that may be supported by a debug adapter.
struct ChecksumAlgorithm { struct ChecksumAlgorithm {};
ChecksumAlgorithm();
~ChecksumAlgorithm();
};
DAP_DECLARE_STRUCT_TYPEINFO(ChecksumAlgorithm); DAP_DECLARE_STRUCT_TYPEINFO(ChecksumAlgorithm);
// The checksum of an item calculated by the specified algorithm. // The checksum of an item calculated by the specified algorithm.
struct Checksum { struct Checksum {
Checksum();
~Checksum();
// The algorithm used to calculate this checksum. // The algorithm used to calculate this checksum.
ChecksumAlgorithm algorithm; ChecksumAlgorithm algorithm;
// Value of the checksum. // Value of the checksum.
...@@ -87,9 +74,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Checksum); ...@@ -87,9 +74,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Checksum);
// It is returned from the debug adapter as part of a StackFrame and it is used // It is returned from the debug adapter as part of a StackFrame and it is used
// by clients when specifying breakpoints. // by clients when specifying breakpoints.
struct Source { struct Source {
Source();
~Source();
// Optional data that a debug adapter might want to loop through the client. // Optional data that a debug adapter might want to loop through the client.
// The client should leave the data intact and persist it across sessions. The // The client should leave the data intact and persist it across sessions. The
// client should not interpret the data. // client should not interpret the data.
...@@ -130,9 +114,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Source); ...@@ -130,9 +114,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Source);
// Information about a Breakpoint created in setBreakpoints, // Information about a Breakpoint created in setBreakpoints,
// setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints. // setFunctionBreakpoints, setInstructionBreakpoints, or setDataBreakpoints.
struct Breakpoint { struct Breakpoint {
Breakpoint();
~Breakpoint();
// An optional start column of the actual range covered by the breakpoint. // An optional start column of the actual range covered by the breakpoint.
optional<integer> column; optional<integer> column;
// An optional end column of the actual range covered by the breakpoint. // An optional end column of the actual range covered by the breakpoint.
...@@ -166,9 +147,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Breakpoint); ...@@ -166,9 +147,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Breakpoint);
// The event indicates that some information about a breakpoint has changed. // The event indicates that some information about a breakpoint has changed.
struct BreakpointEvent : public Event { struct BreakpointEvent : public Event {
BreakpointEvent();
~BreakpointEvent();
// The 'id' attribute is used to find the target breakpoint and the other // The 'id' attribute is used to find the target breakpoint and the other
// attributes are used as the new values. // attributes are used as the new values.
Breakpoint breakpoint; Breakpoint breakpoint;
...@@ -184,9 +162,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointEvent); ...@@ -184,9 +162,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointEvent);
// Properties of a breakpoint location returned from the 'breakpointLocations' // Properties of a breakpoint location returned from the 'breakpointLocations'
// request. // request.
struct BreakpointLocation { struct BreakpointLocation {
BreakpointLocation();
~BreakpointLocation();
// Optional start column of breakpoint location. // Optional start column of breakpoint location.
optional<integer> column; optional<integer> column;
// Optional end column of breakpoint location if the location covers a range. // Optional end column of breakpoint location if the location covers a range.
...@@ -202,9 +177,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocation); ...@@ -202,9 +177,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocation);
// Response to 'breakpointLocations' request. // Response to 'breakpointLocations' request.
// Contains possible locations for source breakpoints. // Contains possible locations for source breakpoints.
struct BreakpointLocationsResponse : public Response { struct BreakpointLocationsResponse : public Response {
BreakpointLocationsResponse();
~BreakpointLocationsResponse();
// Sorted set of possible breakpoint locations. // Sorted set of possible breakpoint locations.
array<BreakpointLocation> breakpoints; array<BreakpointLocation> breakpoints;
}; };
...@@ -216,10 +188,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocationsResponse); ...@@ -216,10 +188,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocationsResponse);
// capability 'supportsBreakpointLocationsRequest' is true. // capability 'supportsBreakpointLocationsRequest' is true.
struct BreakpointLocationsRequest : public Request { struct BreakpointLocationsRequest : public Request {
using Response = BreakpointLocationsResponse; using Response = BreakpointLocationsResponse;
BreakpointLocationsRequest();
~BreakpointLocationsRequest();
// Optional start column of range to search possible breakpoint locations in. // Optional start column of range to search possible breakpoint locations in.
// If no start column is given, the first column in the start line is assumed. // If no start column is given, the first column in the start line is assumed.
optional<integer> column; optional<integer> column;
...@@ -242,10 +210,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocationsRequest); ...@@ -242,10 +210,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(BreakpointLocationsRequest);
// Response to 'cancel' request. This is just an acknowledgement, so no body // Response to 'cancel' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct CancelResponse : public Response { struct CancelResponse : public Response {};
CancelResponse();
~CancelResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(CancelResponse); DAP_DECLARE_STRUCT_TYPEINFO(CancelResponse);
...@@ -270,10 +235,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CancelResponse); ...@@ -270,10 +235,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CancelResponse);
// sending the 'cancel' request. // sending the 'cancel' request.
struct CancelRequest : public Request { struct CancelRequest : public Request {
using Response = CancelResponse; using Response = CancelResponse;
CancelRequest();
~CancelRequest();
// The ID (attribute 'progressId') of the progress to cancel. If missing no // The ID (attribute 'progressId') of the progress to cancel. If missing no
// progress is cancelled. Both a 'requestId' and a 'progressId' can be // progress is cancelled. Both a 'requestId' and a 'progressId' can be
// specified in one request. // specified in one request.
...@@ -290,9 +251,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CancelRequest); ...@@ -290,9 +251,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CancelRequest);
// ModulesView, how to format it, and what the column's label should be. It is // ModulesView, how to format it, and what the column's label should be. It is
// only used if the underlying UI actually supports this level of customization. // only used if the underlying UI actually supports this level of customization.
struct ColumnDescriptor { struct ColumnDescriptor {
ColumnDescriptor();
~ColumnDescriptor();
// Name of the attribute rendered in this column. // Name of the attribute rendered in this column.
string attributeName; string attributeName;
// Format to use for the rendered values in this column. TBD how the format // Format to use for the rendered values in this column. TBD how the format
...@@ -314,9 +272,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ColumnDescriptor); ...@@ -314,9 +272,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ColumnDescriptor);
// An ExceptionBreakpointsFilter is shown in the UI as an option for configuring // An ExceptionBreakpointsFilter is shown in the UI as an option for configuring
// how exceptions are dealt with. // how exceptions are dealt with.
struct ExceptionBreakpointsFilter { struct ExceptionBreakpointsFilter {
ExceptionBreakpointsFilter();
~ExceptionBreakpointsFilter();
// Initial value of the filter. If not specified a value 'false' is assumed. // Initial value of the filter. If not specified a value 'false' is assumed.
optional<boolean> def; optional<boolean> def;
// The internal ID of the filter. This value is passed to the // The internal ID of the filter. This value is passed to the
...@@ -330,9 +285,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionBreakpointsFilter); ...@@ -330,9 +285,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionBreakpointsFilter);
// Information about the capabilities of a debug adapter. // Information about the capabilities of a debug adapter.
struct Capabilities { struct Capabilities {
Capabilities();
~Capabilities();
// The set of additional module information exposed by the debug adapter. // The set of additional module information exposed by the debug adapter.
optional<array<ColumnDescriptor>> additionalModuleColumns; optional<array<ColumnDescriptor>> additionalModuleColumns;
// The set of characters that should trigger completion in a REPL. If not // The set of characters that should trigger completion in a REPL. If not
...@@ -430,9 +382,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Capabilities); ...@@ -430,9 +382,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Capabilities);
// guarantees. Only changed capabilities need to be included, all other // guarantees. Only changed capabilities need to be included, all other
// capabilities keep their values. // capabilities keep their values.
struct CapabilitiesEvent : public Event { struct CapabilitiesEvent : public Event {
CapabilitiesEvent();
~CapabilitiesEvent();
// The set of updated capabilities. // The set of updated capabilities.
Capabilities capabilities; Capabilities capabilities;
}; };
...@@ -441,18 +390,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(CapabilitiesEvent); ...@@ -441,18 +390,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(CapabilitiesEvent);
// Some predefined types for the CompletionItem. Please note that not all // Some predefined types for the CompletionItem. Please note that not all
// clients have specific icons for all of them. // clients have specific icons for all of them.
struct CompletionItemType { struct CompletionItemType {};
CompletionItemType();
~CompletionItemType();
};
DAP_DECLARE_STRUCT_TYPEINFO(CompletionItemType); DAP_DECLARE_STRUCT_TYPEINFO(CompletionItemType);
// CompletionItems are the suggestions returned from the CompletionsRequest. // CompletionItems are the suggestions returned from the CompletionsRequest.
struct CompletionItem { struct CompletionItem {
CompletionItem();
~CompletionItem();
// The label of this completion item. By default this is also the text that is // The label of this completion item. By default this is also the text that is
// inserted when selecting this completion. // inserted when selecting this completion.
string label; string label;
...@@ -487,9 +430,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionItem); ...@@ -487,9 +430,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionItem);
// Response to 'completions' request. // Response to 'completions' request.
struct CompletionsResponse : public Response { struct CompletionsResponse : public Response {
CompletionsResponse();
~CompletionsResponse();
// The possible completions for . // The possible completions for .
array<CompletionItem> targets; array<CompletionItem> targets;
}; };
...@@ -501,10 +441,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionsResponse); ...@@ -501,10 +441,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionsResponse);
// 'supportsCompletionsRequest' is true. // 'supportsCompletionsRequest' is true.
struct CompletionsRequest : public Request { struct CompletionsRequest : public Request {
using Response = CompletionsResponse; using Response = CompletionsResponse;
CompletionsRequest();
~CompletionsRequest();
// The character position for which to determine the completion proposals. // The character position for which to determine the completion proposals.
integer column; integer column;
// Returns completions in the scope of this stack frame. If not specified, the // Returns completions in the scope of this stack frame. If not specified, the
...@@ -522,10 +458,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionsRequest); ...@@ -522,10 +458,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(CompletionsRequest);
// Response to 'configurationDone' request. This is just an acknowledgement, so // Response to 'configurationDone' request. This is just an acknowledgement, so
// no body field is required. // no body field is required.
struct ConfigurationDoneResponse : public Response { struct ConfigurationDoneResponse : public Response {};
ConfigurationDoneResponse();
~ConfigurationDoneResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneResponse); DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneResponse);
...@@ -536,18 +469,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneResponse); ...@@ -536,18 +469,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneResponse);
// 'supportsConfigurationDoneRequest' is true. // 'supportsConfigurationDoneRequest' is true.
struct ConfigurationDoneRequest : public Request { struct ConfigurationDoneRequest : public Request {
using Response = ConfigurationDoneResponse; using Response = ConfigurationDoneResponse;
ConfigurationDoneRequest();
~ConfigurationDoneRequest();
}; };
DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneRequest); DAP_DECLARE_STRUCT_TYPEINFO(ConfigurationDoneRequest);
// Response to 'continue' request. // Response to 'continue' request.
struct ContinueResponse : public Response { struct ContinueResponse : public Response {
ContinueResponse();
~ContinueResponse();
// If true, the 'continue' request has ignored the specified thread and // If true, the 'continue' request has ignored the specified thread and
// continued all threads instead. If this attribute is missing a value of // continued all threads instead. If this attribute is missing a value of
// 'true' is assumed for backward compatibility. // 'true' is assumed for backward compatibility.
...@@ -559,10 +486,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ContinueResponse); ...@@ -559,10 +486,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ContinueResponse);
// The request starts the debuggee to run again. // The request starts the debuggee to run again.
struct ContinueRequest : public Request { struct ContinueRequest : public Request {
using Response = ContinueResponse; using Response = ContinueResponse;
ContinueRequest();
~ContinueRequest();
// Continue execution for the specified thread (if possible). // Continue execution for the specified thread (if possible).
// If the backend cannot continue on a single thread but will continue on all // If the backend cannot continue on a single thread but will continue on all
// threads, it should set the 'allThreadsContinued' attribute in the response // threads, it should set the 'allThreadsContinued' attribute in the response
...@@ -578,9 +501,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ContinueRequest); ...@@ -578,9 +501,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ContinueRequest);
// 'continue'. It is only necessary to send a 'continued' event if there was no // 'continue'. It is only necessary to send a 'continued' event if there was no
// previous request that implied this. // previous request that implied this.
struct ContinuedEvent : public Event { struct ContinuedEvent : public Event {
ContinuedEvent();
~ContinuedEvent();
// If 'allThreadsContinued' is true, a debug adapter can announce that all // If 'allThreadsContinued' is true, a debug adapter can announce that all
// threads have continued. // threads have continued.
optional<boolean> allThreadsContinued; optional<boolean> allThreadsContinued;
...@@ -591,18 +511,12 @@ struct ContinuedEvent : public Event { ...@@ -591,18 +511,12 @@ struct ContinuedEvent : public Event {
DAP_DECLARE_STRUCT_TYPEINFO(ContinuedEvent); DAP_DECLARE_STRUCT_TYPEINFO(ContinuedEvent);
// This enumeration defines all possible access types for data breakpoints. // This enumeration defines all possible access types for data breakpoints.
struct DataBreakpointAccessType { struct DataBreakpointAccessType {};
DataBreakpointAccessType();
~DataBreakpointAccessType();
};
DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointAccessType); DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointAccessType);
// Response to 'dataBreakpointInfo' request. // Response to 'dataBreakpointInfo' request.
struct DataBreakpointInfoResponse : public Response { struct DataBreakpointInfoResponse : public Response {
DataBreakpointInfoResponse();
~DataBreakpointInfoResponse();
// Optional attribute listing the available access types for a potential data // Optional attribute listing the available access types for a potential data
// breakpoint. A UI frontend could surface this information. // breakpoint. A UI frontend could surface this information.
optional<array<DataBreakpointAccessType>> accessTypes; optional<array<DataBreakpointAccessType>> accessTypes;
...@@ -625,10 +539,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointInfoResponse); ...@@ -625,10 +539,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointInfoResponse);
// capability 'supportsDataBreakpoints' is true. // capability 'supportsDataBreakpoints' is true.
struct DataBreakpointInfoRequest : public Request { struct DataBreakpointInfoRequest : public Request {
using Response = DataBreakpointInfoResponse; using Response = DataBreakpointInfoResponse;
DataBreakpointInfoRequest();
~DataBreakpointInfoRequest();
// The name of the Variable's child to obtain data breakpoint information for. // The name of the Variable's child to obtain data breakpoint information for.
// If variableReference isn’t provided, this can be an expression. // If variableReference isn’t provided, this can be an expression.
string name; string name;
...@@ -641,9 +551,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointInfoRequest); ...@@ -641,9 +551,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpointInfoRequest);
// Represents a single disassembled instruction. // Represents a single disassembled instruction.
struct DisassembledInstruction { struct DisassembledInstruction {
DisassembledInstruction();
~DisassembledInstruction();
// The address of the instruction. Treated as a hex value if prefixed with // The address of the instruction. Treated as a hex value if prefixed with
// '0x', or as a decimal value otherwise. // '0x', or as a decimal value otherwise.
string address; string address;
...@@ -676,9 +583,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembledInstruction); ...@@ -676,9 +583,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembledInstruction);
// Response to 'disassemble' request. // Response to 'disassemble' request.
struct DisassembleResponse : public Response { struct DisassembleResponse : public Response {
DisassembleResponse();
~DisassembleResponse();
// The list of disassembled instructions. // The list of disassembled instructions.
array<DisassembledInstruction> instructions; array<DisassembledInstruction> instructions;
}; };
...@@ -690,10 +594,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembleResponse); ...@@ -690,10 +594,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembleResponse);
// 'supportsDisassembleRequest' is true. // 'supportsDisassembleRequest' is true.
struct DisassembleRequest : public Request { struct DisassembleRequest : public Request {
using Response = DisassembleResponse; using Response = DisassembleResponse;
DisassembleRequest();
~DisassembleRequest();
// Number of instructions to disassemble starting at the specified location // Number of instructions to disassemble starting at the specified location
// and offset. An adapter must return exactly this number of instructions - // and offset. An adapter must return exactly this number of instructions -
// any unavailable instructions should be replaced with an // any unavailable instructions should be replaced with an
...@@ -717,10 +617,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembleRequest); ...@@ -717,10 +617,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisassembleRequest);
// Response to 'disconnect' request. This is just an acknowledgement, so no body // Response to 'disconnect' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct DisconnectResponse : public Response { struct DisconnectResponse : public Response {};
DisconnectResponse();
~DisconnectResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(DisconnectResponse); DAP_DECLARE_STRUCT_TYPEINFO(DisconnectResponse);
...@@ -733,10 +630,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisconnectResponse); ...@@ -733,10 +630,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisconnectResponse);
// 'terminateDebuggee' argument (if supported by the debug adapter). // 'terminateDebuggee' argument (if supported by the debug adapter).
struct DisconnectRequest : public Request { struct DisconnectRequest : public Request {
using Response = DisconnectResponse; using Response = DisconnectResponse;
DisconnectRequest();
~DisconnectRequest();
// A value of true indicates that this 'disconnect' request is part of a // A value of true indicates that this 'disconnect' request is part of a
// restart sequence. // restart sequence.
optional<boolean> restart; optional<boolean> restart;
...@@ -751,9 +644,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisconnectRequest); ...@@ -751,9 +644,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DisconnectRequest);
// A structured message object. Used to return errors from requests. // A structured message object. Used to return errors from requests.
struct Message { struct Message {
Message();
~Message();
// A format string for the message. Embedded variables have the form '{name}'. // A format string for the message. Embedded variables have the form '{name}'.
// If variable name starts with an underscore character, the variable does not // If variable name starts with an underscore character, the variable does not
// contain user data (PII) and can be safely used for telemetry purposes. // contain user data (PII) and can be safely used for telemetry purposes.
...@@ -779,9 +669,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Message); ...@@ -779,9 +669,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Message);
// On error (whenever 'success' is false), the body can provide more details. // On error (whenever 'success' is false), the body can provide more details.
struct ErrorResponse : public Response { struct ErrorResponse : public Response {
ErrorResponse();
~ErrorResponse();
// An optional, structured error message. // An optional, structured error message.
optional<Message> error; optional<Message> error;
}; };
...@@ -791,9 +678,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ErrorResponse); ...@@ -791,9 +678,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ErrorResponse);
// Optional properties of a variable that can be used to determine how to render // Optional properties of a variable that can be used to determine how to render
// the variable in the UI. // the variable in the UI.
struct VariablePresentationHint { struct VariablePresentationHint {
VariablePresentationHint();
~VariablePresentationHint();
// Set of attributes represented as an array of strings. Before introducing // Set of attributes represented as an array of strings. Before introducing
// additional values, try to use the listed values. // additional values, try to use the listed values.
optional<array<string>> attributes; optional<array<string>> attributes;
...@@ -816,9 +700,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(VariablePresentationHint); ...@@ -816,9 +700,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(VariablePresentationHint);
// Response to 'evaluate' request. // Response to 'evaluate' request.
struct EvaluateResponse : public Response { struct EvaluateResponse : public Response {
EvaluateResponse();
~EvaluateResponse();
// The number of indexed child variables. // The number of indexed child variables.
// The client can use this optional information to present the variables in a // The client can use this optional information to present the variables in a
// paged UI and fetch them in chunks. The value should be less than or equal // paged UI and fetch them in chunks. The value should be less than or equal
...@@ -856,9 +737,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(EvaluateResponse); ...@@ -856,9 +737,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(EvaluateResponse);
// Provides formatting information for a value. // Provides formatting information for a value.
struct ValueFormat { struct ValueFormat {
ValueFormat();
~ValueFormat();
// Display the value in hex. // Display the value in hex.
optional<boolean> hex; optional<boolean> hex;
}; };
...@@ -869,10 +747,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ValueFormat); ...@@ -869,10 +747,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ValueFormat);
// The expression has access to any variables and arguments that are in scope. // The expression has access to any variables and arguments that are in scope.
struct EvaluateRequest : public Request { struct EvaluateRequest : public Request {
using Response = EvaluateResponse; using Response = EvaluateResponse;
EvaluateRequest();
~EvaluateRequest();
// The context in which the evaluate request is run. // The context in which the evaluate request is run.
// //
// May be one of the following enumeration values: // May be one of the following enumeration values:
...@@ -895,18 +769,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(EvaluateRequest); ...@@ -895,18 +769,12 @@ DAP_DECLARE_STRUCT_TYPEINFO(EvaluateRequest);
// should result in a break. never: never breaks, always: always breaks, // should result in a break. never: never breaks, always: always breaks,
// unhandled: breaks when exception unhandled, // unhandled: breaks when exception unhandled,
// userUnhandled: breaks if the exception is not handled by user code. // userUnhandled: breaks if the exception is not handled by user code.
struct ExceptionBreakMode { struct ExceptionBreakMode {};
ExceptionBreakMode();
~ExceptionBreakMode();
};
DAP_DECLARE_STRUCT_TYPEINFO(ExceptionBreakMode); DAP_DECLARE_STRUCT_TYPEINFO(ExceptionBreakMode);
// Detailed information about an exception that has occurred. // Detailed information about an exception that has occurred.
struct ExceptionDetails { struct ExceptionDetails {
ExceptionDetails();
~ExceptionDetails();
// Optional expression that can be evaluated in the current scope to obtain // Optional expression that can be evaluated in the current scope to obtain
// the exception object. // the exception object.
optional<string> evaluateName; optional<string> evaluateName;
...@@ -926,9 +794,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionDetails); ...@@ -926,9 +794,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionDetails);
// Response to 'exceptionInfo' request. // Response to 'exceptionInfo' request.
struct ExceptionInfoResponse : public Response { struct ExceptionInfoResponse : public Response {
ExceptionInfoResponse();
~ExceptionInfoResponse();
// Mode that caused the exception notification to be raised. // Mode that caused the exception notification to be raised.
ExceptionBreakMode breakMode; ExceptionBreakMode breakMode;
// Descriptive text for the exception provided by the debug adapter. // Descriptive text for the exception provided by the debug adapter.
...@@ -946,10 +811,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionInfoResponse); ...@@ -946,10 +811,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionInfoResponse);
// 'supportsExceptionInfoRequest' is true. // 'supportsExceptionInfoRequest' is true.
struct ExceptionInfoRequest : public Request { struct ExceptionInfoRequest : public Request {
using Response = ExceptionInfoResponse; using Response = ExceptionInfoResponse;
ExceptionInfoRequest();
~ExceptionInfoRequest();
// Thread for which exception information should be retrieved. // Thread for which exception information should be retrieved.
integer threadId; integer threadId;
}; };
...@@ -958,9 +819,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionInfoRequest); ...@@ -958,9 +819,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionInfoRequest);
// The event indicates that the debuggee has exited and returns its exit code. // The event indicates that the debuggee has exited and returns its exit code.
struct ExitedEvent : public Event { struct ExitedEvent : public Event {
ExitedEvent();
~ExitedEvent();
// The exit code returned from the debuggee. // The exit code returned from the debuggee.
integer exitCode; integer exitCode;
}; };
...@@ -969,10 +827,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExitedEvent); ...@@ -969,10 +827,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExitedEvent);
// Response to 'goto' request. This is just an acknowledgement, so no body field // Response to 'goto' request. This is just an acknowledgement, so no body field
// is required. // is required.
struct GotoResponse : public Response { struct GotoResponse : public Response {};
GotoResponse();
~GotoResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(GotoResponse); DAP_DECLARE_STRUCT_TYPEINFO(GotoResponse);
...@@ -985,10 +840,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoResponse); ...@@ -985,10 +840,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoResponse);
// targets exist that can be passed as arguments). // targets exist that can be passed as arguments).
struct GotoRequest : public Request { struct GotoRequest : public Request {
using Response = GotoResponse; using Response = GotoResponse;
GotoRequest();
~GotoRequest();
// The location where the debuggee will continue to run. // The location where the debuggee will continue to run.
integer targetId; integer targetId;
// Set the goto target for this thread. // Set the goto target for this thread.
...@@ -1001,9 +852,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoRequest); ...@@ -1001,9 +852,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoRequest);
// 'goto' request. The possible goto targets can be determined via the // 'goto' request. The possible goto targets can be determined via the
// 'gotoTargets' request. // 'gotoTargets' request.
struct GotoTarget { struct GotoTarget {
GotoTarget();
~GotoTarget();
// An optional column of the goto target. // An optional column of the goto target.
optional<integer> column; optional<integer> column;
// An optional end column of the range covered by the goto target. // An optional end column of the range covered by the goto target.
...@@ -1025,9 +873,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTarget); ...@@ -1025,9 +873,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTarget);
// Response to 'gotoTargets' request. // Response to 'gotoTargets' request.
struct GotoTargetsResponse : public Response { struct GotoTargetsResponse : public Response {
GotoTargetsResponse();
~GotoTargetsResponse();
// The possible goto targets of the specified location. // The possible goto targets of the specified location.
array<GotoTarget> targets; array<GotoTarget> targets;
}; };
...@@ -1040,10 +885,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTargetsResponse); ...@@ -1040,10 +885,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTargetsResponse);
// true. // true.
struct GotoTargetsRequest : public Request { struct GotoTargetsRequest : public Request {
using Response = GotoTargetsResponse; using Response = GotoTargetsResponse;
GotoTargetsRequest();
~GotoTargetsRequest();
// An optional column location for which the goto targets are determined. // An optional column location for which the goto targets are determined.
optional<integer> column; optional<integer> column;
// The line location for which the goto targets are determined. // The line location for which the goto targets are determined.
...@@ -1056,9 +897,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTargetsRequest); ...@@ -1056,9 +897,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(GotoTargetsRequest);
// Response to 'initialize' request. // Response to 'initialize' request.
struct InitializeResponse : public Response { struct InitializeResponse : public Response {
InitializeResponse();
~InitializeResponse();
// The set of additional module information exposed by the debug adapter. // The set of additional module information exposed by the debug adapter.
optional<array<ColumnDescriptor>> additionalModuleColumns; optional<array<ColumnDescriptor>> additionalModuleColumns;
// The set of characters that should trigger completion in a REPL. If not // The set of characters that should trigger completion in a REPL. If not
...@@ -1158,10 +996,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(InitializeResponse); ...@@ -1158,10 +996,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(InitializeResponse);
// only be sent once. // only be sent once.
struct InitializeRequest : public Request { struct InitializeRequest : public Request {
using Response = InitializeResponse; using Response = InitializeResponse;
InitializeRequest();
~InitializeRequest();
// The ID of the debug adapter. // The ID of the debug adapter.
string adapterID; string adapterID;
// The ID of the (frontend) client using this adapter. // The ID of the (frontend) client using this adapter.
...@@ -1211,19 +1045,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(InitializeRequest); ...@@ -1211,19 +1045,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(InitializeRequest);
// - frontend sends other future configuration requests // - frontend sends other future configuration requests
// - frontend sends one 'configurationDone' request to indicate the end of the // - frontend sends one 'configurationDone' request to indicate the end of the
// configuration. // configuration.
struct InitializedEvent : public Event { struct InitializedEvent : public Event {};
InitializedEvent();
~InitializedEvent();
};
DAP_DECLARE_STRUCT_TYPEINFO(InitializedEvent); DAP_DECLARE_STRUCT_TYPEINFO(InitializedEvent);
// Response to 'launch' request. This is just an acknowledgement, so no body // Response to 'launch' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct LaunchResponse : public Response { struct LaunchResponse : public Response {};
LaunchResponse();
~LaunchResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(LaunchResponse); DAP_DECLARE_STRUCT_TYPEINFO(LaunchResponse);
...@@ -1233,10 +1061,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LaunchResponse); ...@@ -1233,10 +1061,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LaunchResponse);
// this specification. // this specification.
struct LaunchRequest : public Request { struct LaunchRequest : public Request {
using Response = LaunchResponse; using Response = LaunchResponse;
LaunchRequest();
~LaunchRequest();
// Optional data from the previous, restarted session. // Optional data from the previous, restarted session.
// The data is sent as the 'restart' attribute of the 'terminated' event. // The data is sent as the 'restart' attribute of the 'terminated' event.
// The client should leave the data intact. // The client should leave the data intact.
...@@ -1252,9 +1076,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LaunchRequest); ...@@ -1252,9 +1076,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LaunchRequest);
// The event indicates that some source has been added, changed, or removed from // The event indicates that some source has been added, changed, or removed from
// the set of all loaded sources. // the set of all loaded sources.
struct LoadedSourceEvent : public Event { struct LoadedSourceEvent : public Event {
LoadedSourceEvent();
~LoadedSourceEvent();
// The reason for the event. // The reason for the event.
// //
// Must be one of the following enumeration values: // Must be one of the following enumeration values:
...@@ -1268,9 +1089,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourceEvent); ...@@ -1268,9 +1089,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourceEvent);
// Response to 'loadedSources' request. // Response to 'loadedSources' request.
struct LoadedSourcesResponse : public Response { struct LoadedSourcesResponse : public Response {
LoadedSourcesResponse();
~LoadedSourcesResponse();
// Set of loaded sources. // Set of loaded sources.
array<Source> sources; array<Source> sources;
}; };
...@@ -1282,9 +1100,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesResponse); ...@@ -1282,9 +1100,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesResponse);
// 'supportsLoadedSourcesRequest' is true. // 'supportsLoadedSourcesRequest' is true.
struct LoadedSourcesRequest : public Request { struct LoadedSourcesRequest : public Request {
using Response = LoadedSourcesResponse; using Response = LoadedSourcesResponse;
LoadedSourcesRequest();
~LoadedSourcesRequest();
}; };
DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesRequest); DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesRequest);
...@@ -1302,9 +1117,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesRequest); ...@@ -1302,9 +1117,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(LoadedSourcesRequest);
// 'recommended' list below first, and only introduce new attributes if nothing // 'recommended' list below first, and only introduce new attributes if nothing
// appropriate could be found. // appropriate could be found.
struct Module { struct Module {
Module();
~Module();
// Address range covered by this module. // Address range covered by this module.
optional<string> addressRange; optional<string> addressRange;
// Module created or modified. // Module created or modified.
...@@ -1339,9 +1151,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Module); ...@@ -1339,9 +1151,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Module);
// The event indicates that some information about a module has changed. // The event indicates that some information about a module has changed.
struct ModuleEvent : public Event { struct ModuleEvent : public Event {
ModuleEvent();
~ModuleEvent();
// The new, changed, or removed module. In case of 'removed' only the module // The new, changed, or removed module. In case of 'removed' only the module
// id is used. // id is used.
Module module; Module module;
...@@ -1356,9 +1165,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModuleEvent); ...@@ -1356,9 +1165,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModuleEvent);
// Response to 'modules' request. // Response to 'modules' request.
struct ModulesResponse : public Response { struct ModulesResponse : public Response {
ModulesResponse();
~ModulesResponse();
// All modules or range of modules. // All modules or range of modules.
array<Module> modules; array<Module> modules;
// The total number of modules available. // The total number of modules available.
...@@ -1373,10 +1179,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModulesResponse); ...@@ -1373,10 +1179,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModulesResponse);
// true. // true.
struct ModulesRequest : public Request { struct ModulesRequest : public Request {
using Response = ModulesResponse; using Response = ModulesResponse;
ModulesRequest();
~ModulesRequest();
// The number of modules to return. If moduleCount is not specified or 0, all // The number of modules to return. If moduleCount is not specified or 0, all
// modules are returned. // modules are returned.
optional<integer> moduleCount; optional<integer> moduleCount;
...@@ -1388,19 +1190,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModulesRequest); ...@@ -1388,19 +1190,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(ModulesRequest);
// Response to 'next' request. This is just an acknowledgement, so no body field // Response to 'next' request. This is just an acknowledgement, so no body field
// is required. // is required.
struct NextResponse : public Response { struct NextResponse : public Response {};
NextResponse();
~NextResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(NextResponse); DAP_DECLARE_STRUCT_TYPEINFO(NextResponse);
// The granularity of one 'step' in the stepping requests 'next', 'stepIn', // The granularity of one 'step' in the stepping requests 'next', 'stepIn',
// 'stepOut', and 'stepBack'. // 'stepOut', and 'stepBack'.
struct SteppingGranularity { struct SteppingGranularity {};
SteppingGranularity();
~SteppingGranularity();
};
DAP_DECLARE_STRUCT_TYPEINFO(SteppingGranularity); DAP_DECLARE_STRUCT_TYPEINFO(SteppingGranularity);
...@@ -1409,10 +1205,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SteppingGranularity); ...@@ -1409,10 +1205,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SteppingGranularity);
// reason 'step') after the step has completed. // reason 'step') after the step has completed.
struct NextRequest : public Request { struct NextRequest : public Request {
using Response = NextResponse; using Response = NextResponse;
NextRequest();
~NextRequest();
// Optional granularity to step. If no granularity is specified, a granularity // Optional granularity to step. If no granularity is specified, a granularity
// of 'statement' is assumed. // of 'statement' is assumed.
optional<SteppingGranularity> granularity; optional<SteppingGranularity> granularity;
...@@ -1424,9 +1216,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(NextRequest); ...@@ -1424,9 +1216,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(NextRequest);
// The event indicates that the target has produced some output. // The event indicates that the target has produced some output.
struct OutputEvent : public Event { struct OutputEvent : public Event {
OutputEvent();
~OutputEvent();
// The output category. If not specified, 'console' is assumed. // The output category. If not specified, 'console' is assumed.
// //
// May be one of the following enumeration values: // May be one of the following enumeration values:
...@@ -1460,10 +1249,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(OutputEvent); ...@@ -1460,10 +1249,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(OutputEvent);
// Response to 'pause' request. This is just an acknowledgement, so no body // Response to 'pause' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct PauseResponse : public Response { struct PauseResponse : public Response {};
PauseResponse();
~PauseResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(PauseResponse); DAP_DECLARE_STRUCT_TYPEINFO(PauseResponse);
...@@ -1472,10 +1258,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(PauseResponse); ...@@ -1472,10 +1258,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(PauseResponse);
// reason 'pause') after the thread has been paused successfully. // reason 'pause') after the thread has been paused successfully.
struct PauseRequest : public Request { struct PauseRequest : public Request {
using Response = PauseResponse; using Response = PauseResponse;
PauseRequest();
~PauseRequest();
// Pause execution for this thread. // Pause execution for this thread.
integer threadId; integer threadId;
}; };
...@@ -1485,9 +1267,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(PauseRequest); ...@@ -1485,9 +1267,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(PauseRequest);
// The event indicates that the debugger has begun debugging a new process. // The event indicates that the debugger has begun debugging a new process.
// Either one that it has launched, or one that it has attached to. // Either one that it has launched, or one that it has attached to.
struct ProcessEvent : public Event { struct ProcessEvent : public Event {
ProcessEvent();
~ProcessEvent();
// If true, the process is running on the same computer as the debug adapter. // If true, the process is running on the same computer as the debug adapter.
optional<boolean> isLocalProcess; optional<boolean> isLocalProcess;
// The logical name of the process. This is usually the full path to process's // The logical name of the process. This is usually the full path to process's
...@@ -1513,9 +1292,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProcessEvent); ...@@ -1513,9 +1292,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProcessEvent);
// true for the 'supportsProgressReporting' capability of the 'initialize' // true for the 'supportsProgressReporting' capability of the 'initialize'
// request. // request.
struct ProgressEndEvent : public Event { struct ProgressEndEvent : public Event {
ProgressEndEvent();
~ProgressEndEvent();
// Optional, more detailed progress message. If omitted, the previous message // Optional, more detailed progress message. If omitted, the previous message
// (if any) is used. // (if any) is used.
optional<string> message; optional<string> message;
...@@ -1532,9 +1308,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressEndEvent); ...@@ -1532,9 +1308,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressEndEvent);
// has passed the value true for the 'supportsProgressReporting' capability of // has passed the value true for the 'supportsProgressReporting' capability of
// the 'initialize' request. // the 'initialize' request.
struct ProgressStartEvent : public Event { struct ProgressStartEvent : public Event {
ProgressStartEvent();
~ProgressStartEvent();
// If true, the request that reports progress may be canceled with a 'cancel' // If true, the request that reports progress may be canceled with a 'cancel'
// request. So this property basically controls whether the client should use // request. So this property basically controls whether the client should use
// UX that supports cancellation. Clients that don't support cancellation are // UX that supports cancellation. Clients that don't support cancellation are
...@@ -1569,9 +1342,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressStartEvent); ...@@ -1569,9 +1342,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressStartEvent);
// the value true for the 'supportsProgressReporting' capability of the // the value true for the 'supportsProgressReporting' capability of the
// 'initialize' request. // 'initialize' request.
struct ProgressUpdateEvent : public Event { struct ProgressUpdateEvent : public Event {
ProgressUpdateEvent();
~ProgressUpdateEvent();
// Optional, more detailed progress message. If omitted, the previous message // Optional, more detailed progress message. If omitted, the previous message
// (if any) is used. // (if any) is used.
optional<string> message; optional<string> message;
...@@ -1586,9 +1356,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressUpdateEvent); ...@@ -1586,9 +1356,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ProgressUpdateEvent);
// Response to 'readMemory' request. // Response to 'readMemory' request.
struct ReadMemoryResponse : public Response { struct ReadMemoryResponse : public Response {
ReadMemoryResponse();
~ReadMemoryResponse();
// The address of the first byte of data returned. // The address of the first byte of data returned.
// Treated as a hex value if prefixed with '0x', or as a decimal value // Treated as a hex value if prefixed with '0x', or as a decimal value
// otherwise. // otherwise.
...@@ -1608,10 +1375,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReadMemoryResponse); ...@@ -1608,10 +1375,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReadMemoryResponse);
// 'supportsReadMemoryRequest' is true. // 'supportsReadMemoryRequest' is true.
struct ReadMemoryRequest : public Request { struct ReadMemoryRequest : public Request {
using Response = ReadMemoryResponse; using Response = ReadMemoryResponse;
ReadMemoryRequest();
~ReadMemoryRequest();
// Number of bytes to read at the specified location and offset. // Number of bytes to read at the specified location and offset.
integer count; integer count;
// Memory reference to the base location from which data should be read. // Memory reference to the base location from which data should be read.
...@@ -1625,10 +1388,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReadMemoryRequest); ...@@ -1625,10 +1388,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReadMemoryRequest);
// Response to 'restartFrame' request. This is just an acknowledgement, so no // Response to 'restartFrame' request. This is just an acknowledgement, so no
// body field is required. // body field is required.
struct RestartFrameResponse : public Response { struct RestartFrameResponse : public Response {};
RestartFrameResponse();
~RestartFrameResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameResponse); DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameResponse);
...@@ -1638,10 +1398,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameResponse); ...@@ -1638,10 +1398,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameResponse);
// this request if the capability 'supportsRestartFrame' is true. // this request if the capability 'supportsRestartFrame' is true.
struct RestartFrameRequest : public Request { struct RestartFrameRequest : public Request {
using Response = RestartFrameResponse; using Response = RestartFrameResponse;
RestartFrameRequest();
~RestartFrameRequest();
// Restart this stackframe. // Restart this stackframe.
integer frameId; integer frameId;
}; };
...@@ -1650,10 +1406,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameRequest); ...@@ -1650,10 +1406,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartFrameRequest);
// Response to 'restart' request. This is just an acknowledgement, so no body // Response to 'restart' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct RestartResponse : public Response { struct RestartResponse : public Response {};
RestartResponse();
~RestartResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(RestartResponse); DAP_DECLARE_STRUCT_TYPEINFO(RestartResponse);
...@@ -1663,19 +1416,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartResponse); ...@@ -1663,19 +1416,13 @@ DAP_DECLARE_STRUCT_TYPEINFO(RestartResponse);
// the debug adapter first and then launching it anew. // the debug adapter first and then launching it anew.
struct RestartRequest : public Request { struct RestartRequest : public Request {
using Response = RestartResponse; using Response = RestartResponse;
RestartRequest();
~RestartRequest();
}; };
DAP_DECLARE_STRUCT_TYPEINFO(RestartRequest); DAP_DECLARE_STRUCT_TYPEINFO(RestartRequest);
// Response to 'reverseContinue' request. This is just an acknowledgement, so no // Response to 'reverseContinue' request. This is just an acknowledgement, so no
// body field is required. // body field is required.
struct ReverseContinueResponse : public Response { struct ReverseContinueResponse : public Response {};
ReverseContinueResponse();
~ReverseContinueResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueResponse); DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueResponse);
...@@ -1684,10 +1431,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueResponse); ...@@ -1684,10 +1431,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueResponse);
// true. // true.
struct ReverseContinueRequest : public Request { struct ReverseContinueRequest : public Request {
using Response = ReverseContinueResponse; using Response = ReverseContinueResponse;
ReverseContinueRequest();
~ReverseContinueRequest();
// Execute 'reverseContinue' for this thread. // Execute 'reverseContinue' for this thread.
integer threadId; integer threadId;
}; };
...@@ -1696,9 +1439,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueRequest); ...@@ -1696,9 +1439,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ReverseContinueRequest);
// Response to 'runInTerminal' request. // Response to 'runInTerminal' request.
struct RunInTerminalResponse : public Response { struct RunInTerminalResponse : public Response {
RunInTerminalResponse();
~RunInTerminalResponse();
// The process ID. The value should be less than or equal to 2147483647 (2^31 // The process ID. The value should be less than or equal to 2147483647 (2^31
// - 1). // - 1).
optional<integer> processId; optional<integer> processId;
...@@ -1716,10 +1456,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RunInTerminalResponse); ...@@ -1716,10 +1456,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RunInTerminalResponse);
// capability of the 'initialize' request. // capability of the 'initialize' request.
struct RunInTerminalRequest : public Request { struct RunInTerminalRequest : public Request {
using Response = RunInTerminalResponse; using Response = RunInTerminalResponse;
RunInTerminalRequest();
~RunInTerminalRequest();
// List of arguments. The first argument is the command to run. // List of arguments. The first argument is the command to run.
array<string> args; array<string> args;
// Working directory of the command. // Working directory of the command.
...@@ -1741,9 +1477,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RunInTerminalRequest); ...@@ -1741,9 +1477,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(RunInTerminalRequest);
// A Scope is a named container for variables. Optionally a scope can map to a // A Scope is a named container for variables. Optionally a scope can map to a
// source or a range within a source. // source or a range within a source.
struct Scope { struct Scope {
Scope();
~Scope();
// Optional start column of the range covered by this scope. // Optional start column of the range covered by this scope.
optional<integer> column; optional<integer> column;
// Optional end column of the range covered by this scope. // Optional end column of the range covered by this scope.
...@@ -1783,9 +1516,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Scope); ...@@ -1783,9 +1516,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Scope);
// Response to 'scopes' request. // Response to 'scopes' request.
struct ScopesResponse : public Response { struct ScopesResponse : public Response {
ScopesResponse();
~ScopesResponse();
// The scopes of the stackframe. If the array has length zero, there are no // The scopes of the stackframe. If the array has length zero, there are no
// scopes available. // scopes available.
array<Scope> scopes; array<Scope> scopes;
...@@ -1796,10 +1526,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ScopesResponse); ...@@ -1796,10 +1526,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ScopesResponse);
// The request returns the variable scopes for a given stackframe ID. // The request returns the variable scopes for a given stackframe ID.
struct ScopesRequest : public Request { struct ScopesRequest : public Request {
using Response = ScopesResponse; using Response = ScopesResponse;
ScopesRequest();
~ScopesRequest();
// Retrieve the scopes for this stackframe. // Retrieve the scopes for this stackframe.
integer frameId; integer frameId;
}; };
...@@ -1812,9 +1538,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ScopesRequest); ...@@ -1812,9 +1538,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ScopesRequest);
// verified. The breakpoints returned are in the same order as the elements of // verified. The breakpoints returned are in the same order as the elements of
// the 'breakpoints' (or the deprecated 'lines') array in the arguments. // the 'breakpoints' (or the deprecated 'lines') array in the arguments.
struct SetBreakpointsResponse : public Response { struct SetBreakpointsResponse : public Response {
SetBreakpointsResponse();
~SetBreakpointsResponse();
// Information about the breakpoints. // Information about the breakpoints.
// The array elements are in the same order as the elements of the // The array elements are in the same order as the elements of the
// 'breakpoints' (or the deprecated 'lines') array in the arguments. // 'breakpoints' (or the deprecated 'lines') array in the arguments.
...@@ -1825,9 +1548,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetBreakpointsResponse); ...@@ -1825,9 +1548,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetBreakpointsResponse);
// Properties of a breakpoint or logpoint passed to the setBreakpoints request. // Properties of a breakpoint or logpoint passed to the setBreakpoints request.
struct SourceBreakpoint { struct SourceBreakpoint {
SourceBreakpoint();
~SourceBreakpoint();
// An optional source column of the breakpoint. // An optional source column of the breakpoint.
optional<integer> column; optional<integer> column;
// An optional expression for conditional breakpoints. // An optional expression for conditional breakpoints.
...@@ -1856,10 +1576,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceBreakpoint); ...@@ -1856,10 +1576,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceBreakpoint);
// 'breakpoint') is generated. // 'breakpoint') is generated.
struct SetBreakpointsRequest : public Request { struct SetBreakpointsRequest : public Request {
using Response = SetBreakpointsResponse; using Response = SetBreakpointsResponse;
SetBreakpointsRequest();
~SetBreakpointsRequest();
// The code locations of the breakpoints. // The code locations of the breakpoints.
optional<array<SourceBreakpoint>> breakpoints; optional<array<SourceBreakpoint>> breakpoints;
// Deprecated: The code locations of the breakpoints. // Deprecated: The code locations of the breakpoints.
...@@ -1877,9 +1593,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetBreakpointsRequest); ...@@ -1877,9 +1593,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetBreakpointsRequest);
// Response to 'setDataBreakpoints' request. // Response to 'setDataBreakpoints' request.
// Returned is information about each breakpoint created by this request. // Returned is information about each breakpoint created by this request.
struct SetDataBreakpointsResponse : public Response { struct SetDataBreakpointsResponse : public Response {
SetDataBreakpointsResponse();
~SetDataBreakpointsResponse();
// Information about the data breakpoints. The array elements correspond to // Information about the data breakpoints. The array elements correspond to
// the elements of the input argument 'breakpoints' array. // the elements of the input argument 'breakpoints' array.
array<Breakpoint> breakpoints; array<Breakpoint> breakpoints;
...@@ -1889,9 +1602,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetDataBreakpointsResponse); ...@@ -1889,9 +1602,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetDataBreakpointsResponse);
// Properties of a data breakpoint passed to the setDataBreakpoints request. // Properties of a data breakpoint passed to the setDataBreakpoints request.
struct DataBreakpoint { struct DataBreakpoint {
DataBreakpoint();
~DataBreakpoint();
// The access type of the data. // The access type of the data.
optional<DataBreakpointAccessType> accessType; optional<DataBreakpointAccessType> accessType;
// An optional expression for conditional breakpoints. // An optional expression for conditional breakpoints.
...@@ -1913,10 +1623,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpoint); ...@@ -1913,10 +1623,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(DataBreakpoint);
// capability 'supportsDataBreakpoints' is true. // capability 'supportsDataBreakpoints' is true.
struct SetDataBreakpointsRequest : public Request { struct SetDataBreakpointsRequest : public Request {
using Response = SetDataBreakpointsResponse; using Response = SetDataBreakpointsResponse;
SetDataBreakpointsRequest();
~SetDataBreakpointsRequest();
// The contents of this array replaces all existing data breakpoints. An empty // The contents of this array replaces all existing data breakpoints. An empty
// array clears all data breakpoints. // array clears all data breakpoints.
array<DataBreakpoint> breakpoints; array<DataBreakpoint> breakpoints;
...@@ -1926,10 +1632,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetDataBreakpointsRequest); ...@@ -1926,10 +1632,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetDataBreakpointsRequest);
// Response to 'setExceptionBreakpoints' request. This is just an // Response to 'setExceptionBreakpoints' request. This is just an
// acknowledgement, so no body field is required. // acknowledgement, so no body field is required.
struct SetExceptionBreakpointsResponse : public Response { struct SetExceptionBreakpointsResponse : public Response {};
SetExceptionBreakpointsResponse();
~SetExceptionBreakpointsResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse); DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse);
...@@ -1938,9 +1641,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse); ...@@ -1938,9 +1641,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse);
// one name, it matches the names provided if 'negate' is false or missing or it // one name, it matches the names provided if 'negate' is false or missing or it
// matches anything except the names provided if 'negate' is true. // matches anything except the names provided if 'negate' is true.
struct ExceptionPathSegment { struct ExceptionPathSegment {
ExceptionPathSegment();
~ExceptionPathSegment();
// Depending on the value of 'negate' the names that should match or not // Depending on the value of 'negate' the names that should match or not
// match. // match.
array<string> names; array<string> names;
...@@ -1953,9 +1653,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionPathSegment); ...@@ -1953,9 +1653,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionPathSegment);
// An ExceptionOptions assigns configuration options to a set of exceptions. // An ExceptionOptions assigns configuration options to a set of exceptions.
struct ExceptionOptions { struct ExceptionOptions {
ExceptionOptions();
~ExceptionOptions();
// Condition when a thrown exception should result in a break. // Condition when a thrown exception should result in a break.
ExceptionBreakMode breakMode; ExceptionBreakMode breakMode;
// A path that selects a single or multiple exceptions in a tree. If 'path' is // A path that selects a single or multiple exceptions in a tree. If 'path' is
...@@ -1972,10 +1669,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionOptions); ...@@ -1972,10 +1669,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ExceptionOptions);
// 'exceptionBreakpointFilters' returns one or more filters. // 'exceptionBreakpointFilters' returns one or more filters.
struct SetExceptionBreakpointsRequest : public Request { struct SetExceptionBreakpointsRequest : public Request {
using Response = SetExceptionBreakpointsResponse; using Response = SetExceptionBreakpointsResponse;
SetExceptionBreakpointsRequest();
~SetExceptionBreakpointsRequest();
// Configuration options for selected exceptions. // Configuration options for selected exceptions.
// The attribute is only honored by a debug adapter if the capability // The attribute is only honored by a debug adapter if the capability
// 'supportsExceptionOptions' is true. // 'supportsExceptionOptions' is true.
...@@ -1989,9 +1682,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsRequest); ...@@ -1989,9 +1682,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExceptionBreakpointsRequest);
// Response to 'setExpression' request. // Response to 'setExpression' request.
struct SetExpressionResponse : public Response { struct SetExpressionResponse : public Response {
SetExpressionResponse();
~SetExpressionResponse();
// The number of indexed child variables. // The number of indexed child variables.
// The client can use this optional information to present the variables in a // The client can use this optional information to present the variables in a
// paged UI and fetch them in chunks. The value should be less than or equal // paged UI and fetch them in chunks. The value should be less than or equal
...@@ -2027,10 +1717,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExpressionResponse); ...@@ -2027,10 +1717,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExpressionResponse);
// true. // true.
struct SetExpressionRequest : public Request { struct SetExpressionRequest : public Request {
using Response = SetExpressionResponse; using Response = SetExpressionResponse;
SetExpressionRequest();
~SetExpressionRequest();
// The l-value expression to assign to. // The l-value expression to assign to.
string expression; string expression;
// Specifies how the resulting value should be formatted. // Specifies how the resulting value should be formatted.
...@@ -2047,9 +1733,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExpressionRequest); ...@@ -2047,9 +1733,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetExpressionRequest);
// Response to 'setFunctionBreakpoints' request. // Response to 'setFunctionBreakpoints' request.
// Returned is information about each breakpoint created by this request. // Returned is information about each breakpoint created by this request.
struct SetFunctionBreakpointsResponse : public Response { struct SetFunctionBreakpointsResponse : public Response {
SetFunctionBreakpointsResponse();
~SetFunctionBreakpointsResponse();
// Information about the breakpoints. The array elements correspond to the // Information about the breakpoints. The array elements correspond to the
// elements of the 'breakpoints' array. // elements of the 'breakpoints' array.
array<Breakpoint> breakpoints; array<Breakpoint> breakpoints;
...@@ -2059,9 +1742,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetFunctionBreakpointsResponse); ...@@ -2059,9 +1742,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetFunctionBreakpointsResponse);
// Properties of a breakpoint passed to the setFunctionBreakpoints request. // Properties of a breakpoint passed to the setFunctionBreakpoints request.
struct FunctionBreakpoint { struct FunctionBreakpoint {
FunctionBreakpoint();
~FunctionBreakpoint();
// An optional expression for conditional breakpoints. // An optional expression for conditional breakpoints.
// It is only honored by a debug adapter if the capability // It is only honored by a debug adapter if the capability
// 'supportsConditionalBreakpoints' is true. // 'supportsConditionalBreakpoints' is true.
...@@ -2084,10 +1764,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(FunctionBreakpoint); ...@@ -2084,10 +1764,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(FunctionBreakpoint);
// capability 'supportsFunctionBreakpoints' is true. // capability 'supportsFunctionBreakpoints' is true.
struct SetFunctionBreakpointsRequest : public Request { struct SetFunctionBreakpointsRequest : public Request {
using Response = SetFunctionBreakpointsResponse; using Response = SetFunctionBreakpointsResponse;
SetFunctionBreakpointsRequest();
~SetFunctionBreakpointsRequest();
// The function names of the breakpoints. // The function names of the breakpoints.
array<FunctionBreakpoint> breakpoints; array<FunctionBreakpoint> breakpoints;
}; };
...@@ -2096,9 +1772,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetFunctionBreakpointsRequest); ...@@ -2096,9 +1772,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetFunctionBreakpointsRequest);
// Response to 'setInstructionBreakpoints' request // Response to 'setInstructionBreakpoints' request
struct SetInstructionBreakpointsResponse : public Response { struct SetInstructionBreakpointsResponse : public Response {
SetInstructionBreakpointsResponse();
~SetInstructionBreakpointsResponse();
// Information about the breakpoints. The array elements correspond to the // Information about the breakpoints. The array elements correspond to the
// elements of the 'breakpoints' array. // elements of the 'breakpoints' array.
array<Breakpoint> breakpoints; array<Breakpoint> breakpoints;
...@@ -2108,9 +1781,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetInstructionBreakpointsResponse); ...@@ -2108,9 +1781,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetInstructionBreakpointsResponse);
// Properties of a breakpoint passed to the setInstructionBreakpoints request // Properties of a breakpoint passed to the setInstructionBreakpoints request
struct InstructionBreakpoint { struct InstructionBreakpoint {
InstructionBreakpoint();
~InstructionBreakpoint();
// An optional expression for conditional breakpoints. // An optional expression for conditional breakpoints.
// It is only honored by a debug adapter if the capability // It is only honored by a debug adapter if the capability
// 'supportsConditionalBreakpoints' is true. // 'supportsConditionalBreakpoints' is true.
...@@ -2139,10 +1809,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(InstructionBreakpoint); ...@@ -2139,10 +1809,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(InstructionBreakpoint);
// 'supportsInstructionBreakpoints' is true. // 'supportsInstructionBreakpoints' is true.
struct SetInstructionBreakpointsRequest : public Request { struct SetInstructionBreakpointsRequest : public Request {
using Response = SetInstructionBreakpointsResponse; using Response = SetInstructionBreakpointsResponse;
SetInstructionBreakpointsRequest();
~SetInstructionBreakpointsRequest();
// The instruction references of the breakpoints // The instruction references of the breakpoints
array<InstructionBreakpoint> breakpoints; array<InstructionBreakpoint> breakpoints;
}; };
...@@ -2151,9 +1817,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetInstructionBreakpointsRequest); ...@@ -2151,9 +1817,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetInstructionBreakpointsRequest);
// Response to 'setVariable' request. // Response to 'setVariable' request.
struct SetVariableResponse : public Response { struct SetVariableResponse : public Response {
SetVariableResponse();
~SetVariableResponse();
// The number of indexed child variables. // The number of indexed child variables.
// The client can use this optional information to present the variables in a // The client can use this optional information to present the variables in a
// paged UI and fetch them in chunks. The value should be less than or equal // paged UI and fetch them in chunks. The value should be less than or equal
...@@ -2182,10 +1845,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetVariableResponse); ...@@ -2182,10 +1845,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetVariableResponse);
// 'supportsSetVariable' is true. // 'supportsSetVariable' is true.
struct SetVariableRequest : public Request { struct SetVariableRequest : public Request {
using Response = SetVariableResponse; using Response = SetVariableResponse;
SetVariableRequest();
~SetVariableRequest();
// Specifies details on how to format the response value. // Specifies details on how to format the response value.
optional<ValueFormat> format; optional<ValueFormat> format;
// The name of the variable in the container. // The name of the variable in the container.
...@@ -2200,9 +1859,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetVariableRequest); ...@@ -2200,9 +1859,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SetVariableRequest);
// Response to 'source' request. // Response to 'source' request.
struct SourceResponse : public Response { struct SourceResponse : public Response {
SourceResponse();
~SourceResponse();
// Content of the source reference. // Content of the source reference.
string content; string content;
// Optional content type (mime type) of the source. // Optional content type (mime type) of the source.
...@@ -2214,10 +1870,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceResponse); ...@@ -2214,10 +1870,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceResponse);
// The request retrieves the source code for a given source reference. // The request retrieves the source code for a given source reference.
struct SourceRequest : public Request { struct SourceRequest : public Request {
using Response = SourceResponse; using Response = SourceResponse;
SourceRequest();
~SourceRequest();
// Specifies the source content to load. Either source.path or // Specifies the source content to load. Either source.path or
// source.sourceReference must be specified. // source.sourceReference must be specified.
optional<Source> source; optional<Source> source;
...@@ -2231,9 +1883,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceRequest); ...@@ -2231,9 +1883,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(SourceRequest);
// A Stackframe contains the source location. // A Stackframe contains the source location.
struct StackFrame { struct StackFrame {
StackFrame();
~StackFrame();
// The column within the line. If source is null or doesn't exist, column is 0 // The column within the line. If source is null or doesn't exist, column is 0
// and must be ignored. // and must be ignored.
integer column; integer column;
...@@ -2271,9 +1920,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackFrame); ...@@ -2271,9 +1920,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackFrame);
// Response to 'stackTrace' request. // Response to 'stackTrace' request.
struct StackTraceResponse : public Response { struct StackTraceResponse : public Response {
StackTraceResponse();
~StackTraceResponse();
// The frames of the stackframe. If the array has length zero, there are no // The frames of the stackframe. If the array has length zero, there are no
// stackframes available. This means that there is no location information // stackframes available. This means that there is no location information
// available. // available.
...@@ -2286,9 +1932,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackTraceResponse); ...@@ -2286,9 +1932,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackTraceResponse);
// Provides formatting information for a stack frame. // Provides formatting information for a stack frame.
struct StackFrameFormat : public ValueFormat { struct StackFrameFormat : public ValueFormat {
StackFrameFormat();
~StackFrameFormat();
// Includes all stack frames, including those the debug adapter might // Includes all stack frames, including those the debug adapter might
// otherwise hide. // otherwise hide.
optional<boolean> includeAll; optional<boolean> includeAll;
...@@ -2311,10 +1954,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackFrameFormat); ...@@ -2311,10 +1954,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackFrameFormat);
// The request returns a stacktrace from the current execution state. // The request returns a stacktrace from the current execution state.
struct StackTraceRequest : public Request { struct StackTraceRequest : public Request {
using Response = StackTraceResponse; using Response = StackTraceResponse;
StackTraceRequest();
~StackTraceRequest();
// Specifies details on how to format the stack frames. // Specifies details on how to format the stack frames.
// The attribute is only honored by a debug adapter if the capability // The attribute is only honored by a debug adapter if the capability
// 'supportsValueFormattingOptions' is true. // 'supportsValueFormattingOptions' is true.
...@@ -2332,10 +1971,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackTraceRequest); ...@@ -2332,10 +1971,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StackTraceRequest);
// Response to 'stepBack' request. This is just an acknowledgement, so no body // Response to 'stepBack' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct StepBackResponse : public Response { struct StepBackResponse : public Response {};
StepBackResponse();
~StepBackResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(StepBackResponse); DAP_DECLARE_STRUCT_TYPEINFO(StepBackResponse);
...@@ -2345,10 +1981,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepBackResponse); ...@@ -2345,10 +1981,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepBackResponse);
// request if the capability 'supportsStepBack' is true. // request if the capability 'supportsStepBack' is true.
struct StepBackRequest : public Request { struct StepBackRequest : public Request {
using Response = StepBackResponse; using Response = StepBackResponse;
StepBackRequest();
~StepBackRequest();
// Optional granularity to step. If no granularity is specified, a granularity // Optional granularity to step. If no granularity is specified, a granularity
// of 'statement' is assumed. // of 'statement' is assumed.
optional<SteppingGranularity> granularity; optional<SteppingGranularity> granularity;
...@@ -2360,10 +1992,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepBackRequest); ...@@ -2360,10 +1992,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepBackRequest);
// Response to 'stepIn' request. This is just an acknowledgement, so no body // Response to 'stepIn' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct StepInResponse : public Response { struct StepInResponse : public Response {};
StepInResponse();
~StepInResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(StepInResponse); DAP_DECLARE_STRUCT_TYPEINFO(StepInResponse);
...@@ -2377,10 +2006,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInResponse); ...@@ -2377,10 +2006,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInResponse);
// retrieved via the 'stepInTargets' request. // retrieved via the 'stepInTargets' request.
struct StepInRequest : public Request { struct StepInRequest : public Request {
using Response = StepInResponse; using Response = StepInResponse;
StepInRequest();
~StepInRequest();
// Optional granularity to step. If no granularity is specified, a granularity // Optional granularity to step. If no granularity is specified, a granularity
// of 'statement' is assumed. // of 'statement' is assumed.
optional<SteppingGranularity> granularity; optional<SteppingGranularity> granularity;
...@@ -2395,9 +2020,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInRequest); ...@@ -2395,9 +2020,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInRequest);
// A StepInTarget can be used in the 'stepIn' request and determines into which // A StepInTarget can be used in the 'stepIn' request and determines into which
// single target the stepIn request should step. // single target the stepIn request should step.
struct StepInTarget { struct StepInTarget {
StepInTarget();
~StepInTarget();
// Unique identifier for a stepIn target. // Unique identifier for a stepIn target.
integer id; integer id;
// The name of the stepIn target (shown in the UI). // The name of the stepIn target (shown in the UI).
...@@ -2408,9 +2030,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTarget); ...@@ -2408,9 +2030,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTarget);
// Response to 'stepInTargets' request. // Response to 'stepInTargets' request.
struct StepInTargetsResponse : public Response { struct StepInTargetsResponse : public Response {
StepInTargetsResponse();
~StepInTargetsResponse();
// The possible stepIn targets of the specified source location. // The possible stepIn targets of the specified source location.
array<StepInTarget> targets; array<StepInTarget> targets;
}; };
...@@ -2424,10 +2043,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTargetsResponse); ...@@ -2424,10 +2043,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTargetsResponse);
// 'supportsStepInTargetsRequest' is true. // 'supportsStepInTargetsRequest' is true.
struct StepInTargetsRequest : public Request { struct StepInTargetsRequest : public Request {
using Response = StepInTargetsResponse; using Response = StepInTargetsResponse;
StepInTargetsRequest();
~StepInTargetsRequest();
// The stack frame for which to retrieve the possible stepIn targets. // The stack frame for which to retrieve the possible stepIn targets.
integer frameId; integer frameId;
}; };
...@@ -2436,10 +2051,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTargetsRequest); ...@@ -2436,10 +2051,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepInTargetsRequest);
// Response to 'stepOut' request. This is just an acknowledgement, so no body // Response to 'stepOut' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct StepOutResponse : public Response { struct StepOutResponse : public Response {};
StepOutResponse();
~StepOutResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(StepOutResponse); DAP_DECLARE_STRUCT_TYPEINFO(StepOutResponse);
...@@ -2448,10 +2060,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepOutResponse); ...@@ -2448,10 +2060,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepOutResponse);
// reason 'step') after the step has completed. // reason 'step') after the step has completed.
struct StepOutRequest : public Request { struct StepOutRequest : public Request {
using Response = StepOutResponse; using Response = StepOutResponse;
StepOutRequest();
~StepOutRequest();
// Optional granularity to step. If no granularity is specified, a granularity // Optional granularity to step. If no granularity is specified, a granularity
// of 'statement' is assumed. // of 'statement' is assumed.
optional<SteppingGranularity> granularity; optional<SteppingGranularity> granularity;
...@@ -2465,9 +2073,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepOutRequest); ...@@ -2465,9 +2073,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(StepOutRequest);
// some condition. This can be caused by a break point previously set, a // some condition. This can be caused by a break point previously set, a
// stepping request has completed, by executing a debugger statement etc. // stepping request has completed, by executing a debugger statement etc.
struct StoppedEvent : public Event { struct StoppedEvent : public Event {
StoppedEvent();
~StoppedEvent();
// If 'allThreadsStopped' is true, a debug adapter can announce that all // If 'allThreadsStopped' is true, a debug adapter can announce that all
// threads have stopped. // threads have stopped.
// - The client should use this information to enable that all threads can be // - The client should use this information to enable that all threads can be
...@@ -2500,10 +2105,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StoppedEvent); ...@@ -2500,10 +2105,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(StoppedEvent);
// Response to 'terminate' request. This is just an acknowledgement, so no body // Response to 'terminate' request. This is just an acknowledgement, so no body
// field is required. // field is required.
struct TerminateResponse : public Response { struct TerminateResponse : public Response {};
TerminateResponse();
~TerminateResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(TerminateResponse); DAP_DECLARE_STRUCT_TYPEINFO(TerminateResponse);
...@@ -2512,10 +2114,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateResponse); ...@@ -2512,10 +2114,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateResponse);
// call this request if the capability 'supportsTerminateRequest' is true. // call this request if the capability 'supportsTerminateRequest' is true.
struct TerminateRequest : public Request { struct TerminateRequest : public Request {
using Response = TerminateResponse; using Response = TerminateResponse;
TerminateRequest();
~TerminateRequest();
// A value of true indicates that this 'terminate' request is part of a // A value of true indicates that this 'terminate' request is part of a
// restart sequence. // restart sequence.
optional<boolean> restart; optional<boolean> restart;
...@@ -2525,10 +2123,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateRequest); ...@@ -2525,10 +2123,7 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateRequest);
// Response to 'terminateThreads' request. This is just an acknowledgement, so // Response to 'terminateThreads' request. This is just an acknowledgement, so
// no body field is required. // no body field is required.
struct TerminateThreadsResponse : public Response { struct TerminateThreadsResponse : public Response {};
TerminateThreadsResponse();
~TerminateThreadsResponse();
};
DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsResponse); DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsResponse);
...@@ -2537,10 +2132,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsResponse); ...@@ -2537,10 +2132,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsResponse);
// 'supportsTerminateThreadsRequest' is true. // 'supportsTerminateThreadsRequest' is true.
struct TerminateThreadsRequest : public Request { struct TerminateThreadsRequest : public Request {
using Response = TerminateThreadsResponse; using Response = TerminateThreadsResponse;
TerminateThreadsRequest();
~TerminateThreadsRequest();
// Ids of threads to be terminated. // Ids of threads to be terminated.
optional<array<integer>> threadIds; optional<array<integer>> threadIds;
}; };
...@@ -2550,9 +2141,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsRequest); ...@@ -2550,9 +2141,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminateThreadsRequest);
// The event indicates that debugging of the debuggee has terminated. This does // The event indicates that debugging of the debuggee has terminated. This does
// **not** mean that the debuggee itself has exited. // **not** mean that the debuggee itself has exited.
struct TerminatedEvent : public Event { struct TerminatedEvent : public Event {
TerminatedEvent();
~TerminatedEvent();
// A debug adapter may set 'restart' to true (or to an arbitrary object) to // A debug adapter may set 'restart' to true (or to an arbitrary object) to
// request that the front end restarts the session. The value is not // request that the front end restarts the session. The value is not
// interpreted by the client and passed unmodified as an attribute '__restart' // interpreted by the client and passed unmodified as an attribute '__restart'
...@@ -2565,9 +2153,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminatedEvent); ...@@ -2565,9 +2153,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(TerminatedEvent);
// The event indicates that a thread has started or exited. // The event indicates that a thread has started or exited.
struct ThreadEvent : public Event { struct ThreadEvent : public Event {
ThreadEvent();
~ThreadEvent();
// The reason for the event. // The reason for the event.
// //
// May be one of the following enumeration values: // May be one of the following enumeration values:
...@@ -2581,9 +2166,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadEvent); ...@@ -2581,9 +2166,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadEvent);
// A Thread // A Thread
struct Thread { struct Thread {
Thread();
~Thread();
// Unique identifier for the thread. // Unique identifier for the thread.
integer id; integer id;
// A name of the thread. // A name of the thread.
...@@ -2594,9 +2176,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Thread); ...@@ -2594,9 +2176,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Thread);
// Response to 'threads' request. // Response to 'threads' request.
struct ThreadsResponse : public Response { struct ThreadsResponse : public Response {
ThreadsResponse();
~ThreadsResponse();
// All threads. // All threads.
array<Thread> threads; array<Thread> threads;
}; };
...@@ -2606,9 +2185,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadsResponse); ...@@ -2606,9 +2185,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadsResponse);
// The request retrieves a list of all threads. // The request retrieves a list of all threads.
struct ThreadsRequest : public Request { struct ThreadsRequest : public Request {
using Response = ThreadsResponse; using Response = ThreadsResponse;
ThreadsRequest();
~ThreadsRequest();
}; };
DAP_DECLARE_STRUCT_TYPEINFO(ThreadsRequest); DAP_DECLARE_STRUCT_TYPEINFO(ThreadsRequest);
...@@ -2624,9 +2200,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadsRequest); ...@@ -2624,9 +2200,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(ThreadsRequest);
// 'indexedVariables' attributes. The client can use this optional information // 'indexedVariables' attributes. The client can use this optional information
// to present the children in a paged UI and fetch them in chunks. // to present the children in a paged UI and fetch them in chunks.
struct Variable { struct Variable {
Variable();
~Variable();
// Optional evaluatable name of this variable which can be passed to the // Optional evaluatable name of this variable which can be passed to the
// 'EvaluateRequest' to fetch the variable's value. // 'EvaluateRequest' to fetch the variable's value.
optional<string> evaluateName; optional<string> evaluateName;
...@@ -2665,9 +2238,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Variable); ...@@ -2665,9 +2238,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(Variable);
// Response to 'variables' request. // Response to 'variables' request.
struct VariablesResponse : public Response { struct VariablesResponse : public Response {
VariablesResponse();
~VariablesResponse();
// All (or a range) of variables for the given variable reference. // All (or a range) of variables for the given variable reference.
array<Variable> variables; array<Variable> variables;
}; };
...@@ -2679,10 +2249,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(VariablesResponse); ...@@ -2679,10 +2249,6 @@ DAP_DECLARE_STRUCT_TYPEINFO(VariablesResponse);
// or indexed children. // or indexed children.
struct VariablesRequest : public Request { struct VariablesRequest : public Request {
using Response = VariablesResponse; using Response = VariablesResponse;
VariablesRequest();
~VariablesRequest();
// The number of variables to return. If count is missing or 0, all variables // The number of variables to return. If count is missing or 0, all variables
// are returned. // are returned.
optional<integer> count; optional<integer> count;
......
...@@ -38,6 +38,8 @@ struct Field { ...@@ -38,6 +38,8 @@ struct Field {
// Methods that return a bool use this to indicate success. // Methods that return a bool use this to indicate success.
class Deserializer { class Deserializer {
public: public:
virtual ~Deserializer() = default;
// deserialization methods for simple data types. // deserialization methods for simple data types.
// If the stored object is not of the correct type, then these function will // If the stored object is not of the correct type, then these function will
// return false. // return false.
...@@ -104,7 +106,7 @@ bool Deserializer::deserialize(dap::optional<T>* opt) const { ...@@ -104,7 +106,7 @@ bool Deserializer::deserialize(dap::optional<T>* opt) const {
T v; T v;
if (deserialize(&v)) { if (deserialize(&v)) {
*opt = v; *opt = v;
}; }
return true; return true;
} }
...@@ -132,6 +134,8 @@ class FieldSerializer; ...@@ -132,6 +134,8 @@ class FieldSerializer;
// Methods that return a bool use this to indicate success. // Methods that return a bool use this to indicate success.
class Serializer { class Serializer {
public: public:
virtual ~Serializer() = default;
// serialization methods for simple data types. // serialization methods for simple data types.
virtual bool serialize(boolean) = 0; virtual bool serialize(boolean) = 0;
virtual bool serialize(integer) = 0; virtual bool serialize(integer) = 0;
...@@ -215,6 +219,8 @@ class FieldSerializer { ...@@ -215,6 +219,8 @@ class FieldSerializer {
template <typename T> template <typename T>
using IsSerializeFunc = std::is_convertible<T, SerializeFunc>; using IsSerializeFunc = std::is_convertible<T, SerializeFunc>;
virtual ~FieldSerializer() = default;
// field() encodes a field to the struct object referenced by this Serializer. // field() encodes a field to the struct object referenced by this Serializer.
// The SerializeFunc will be called with a Serializer used to encode the // The SerializeFunc will be called with a Serializer used to encode the
// field's data. // field's data.
......
...@@ -98,14 +98,13 @@ struct ResponseOrError { ...@@ -98,14 +98,13 @@ struct ResponseOrError {
}; };
template <typename T> template <typename T>
ResponseOrError<T>::ResponseOrError(const T& response) : response(response) {} ResponseOrError<T>::ResponseOrError(const T& resp) : response(resp) {}
template <typename T> template <typename T>
ResponseOrError<T>::ResponseOrError(T&& response) ResponseOrError<T>::ResponseOrError(T&& resp) : response(std::move(resp)) {}
: response(std::move(response)) {}
template <typename T> template <typename T>
ResponseOrError<T>::ResponseOrError(const Error& error) : error(error) {} ResponseOrError<T>::ResponseOrError(const Error& err) : error(err) {}
template <typename T> template <typename T>
ResponseOrError<T>::ResponseOrError(Error&& error) : error(std::move(error)) {} ResponseOrError<T>::ResponseOrError(Error&& err) : error(std::move(err)) {}
template <typename T> template <typename T>
ResponseOrError<T>::ResponseOrError(const ResponseOrError& other) ResponseOrError<T>::ResponseOrError(const ResponseOrError& other)
: response(other.response), error(other.error) {} : response(other.response), error(other.error) {}
...@@ -148,7 +147,7 @@ class Session { ...@@ -148,7 +147,7 @@ class Session {
using ArgTy = typename detail::ArgTy<F>::type; using ArgTy = typename detail::ArgTy<F>::type;
public: public:
virtual ~Session() = default; virtual ~Session();
// ErrorHandler is the type of callback function used for reporting protocol // ErrorHandler is the type of callback function used for reporting protocol
// errors. // errors.
......
...@@ -28,6 +28,7 @@ class Serializer; ...@@ -28,6 +28,7 @@ class Serializer;
// types. TypeInfo is used by the serialization system to encode and decode DAP // types. TypeInfo is used by the serialization system to encode and decode DAP
// requests, responses, events and structs. // requests, responses, events and structs.
struct TypeInfo { struct TypeInfo {
virtual ~TypeInfo();
virtual std::string name() const = 0; virtual std::string name() const = 0;
virtual size_t size() const = 0; virtual size_t size() const = 0;
virtual size_t alignment() const = 0; virtual size_t alignment() const = 0;
......
...@@ -26,7 +26,7 @@ namespace dap { ...@@ -26,7 +26,7 @@ namespace dap {
// template type T. // template type T.
template <typename T> template <typename T>
struct BasicTypeInfo : public TypeInfo { struct BasicTypeInfo : public TypeInfo {
BasicTypeInfo(const std::string& name) : name_(name) {} constexpr BasicTypeInfo(std::string&& name) : name_(std::move(name)) {}
// TypeInfo compliance // TypeInfo compliance
inline std::string name() const { return name_; } inline std::string name() const { return name_; }
...@@ -88,6 +88,15 @@ struct TypeOf<null> { ...@@ -88,6 +88,15 @@ struct TypeOf<null> {
static const TypeInfo* type(); static const TypeInfo* type();
}; };
// TypeOf for template types requires dynamic generation of type information,
// triggering the clang -Wexit-time-destructors warning.
// TODO(bclayton): See if there's a way to avoid this, without requiring manual
// instantiation of each type.
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wexit-time-destructors"
#endif // __clang__
template <typename T> template <typename T>
struct TypeOf<array<T>> { struct TypeOf<array<T>> {
static inline const TypeInfo* type() { static inline const TypeInfo* type() {
...@@ -114,6 +123,10 @@ struct TypeOf<optional<T>> { ...@@ -114,6 +123,10 @@ struct TypeOf<optional<T>> {
} }
}; };
#ifdef __clang__
#pragma clang diagnostic pop
#endif // __clang__
// DAP_OFFSETOF() macro is a generalization of the offsetof() macro defined in // DAP_OFFSETOF() macro is a generalization of the offsetof() macro defined in
// <cstddef>. It evaluates to the offset of the given field, with fewer // <cstddef>. It evaluates to the offset of the given field, with fewer
// restrictions than offsetof(). We cast the address '32' and subtract it again, // restrictions than offsetof(). We cast the address '32' and subtract it again,
......
...@@ -72,7 +72,7 @@ variant<T0, Types...>::variant() : value(T0()) {} ...@@ -72,7 +72,7 @@ variant<T0, Types...>::variant() : value(T0()) {}
template <typename T0, typename... Types> template <typename T0, typename... Types>
template <typename T> template <typename T>
variant<T0, Types...>::variant(const T& value) : value(value) { variant<T0, Types...>::variant(const T& v) : value(v) {
static_assert(accepts<T>(), "variant does not accept template type T"); static_assert(accepts<T>(), "variant does not accept template type T");
} }
......
...@@ -21,53 +21,37 @@ ...@@ -21,53 +21,37 @@
namespace dap { namespace dap {
BreakpointEvent::BreakpointEvent() = default;
BreakpointEvent::~BreakpointEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointEvent,
"breakpoint", "breakpoint",
DAP_FIELD(breakpoint, "breakpoint"), DAP_FIELD(breakpoint, "breakpoint"),
DAP_FIELD(reason, "reason")); DAP_FIELD(reason, "reason"));
CapabilitiesEvent::CapabilitiesEvent() = default;
CapabilitiesEvent::~CapabilitiesEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CapabilitiesEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(CapabilitiesEvent,
"capabilities", "capabilities",
DAP_FIELD(capabilities, "capabilities")); DAP_FIELD(capabilities, "capabilities"));
ContinuedEvent::ContinuedEvent() = default;
ContinuedEvent::~ContinuedEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinuedEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinuedEvent,
"continued", "continued",
DAP_FIELD(allThreadsContinued, DAP_FIELD(allThreadsContinued,
"allThreadsContinued"), "allThreadsContinued"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
ExitedEvent::ExitedEvent() = default;
ExitedEvent::~ExitedEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExitedEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExitedEvent,
"exited", "exited",
DAP_FIELD(exitCode, "exitCode")); DAP_FIELD(exitCode, "exitCode"));
InitializedEvent::InitializedEvent() = default;
InitializedEvent::~InitializedEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(InitializedEvent, "initialized"); DAP_IMPLEMENT_STRUCT_TYPEINFO(InitializedEvent, "initialized");
LoadedSourceEvent::LoadedSourceEvent() = default;
LoadedSourceEvent::~LoadedSourceEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourceEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourceEvent,
"loadedSource", "loadedSource",
DAP_FIELD(reason, "reason"), DAP_FIELD(reason, "reason"),
DAP_FIELD(source, "source")); DAP_FIELD(source, "source"));
ModuleEvent::ModuleEvent() = default;
ModuleEvent::~ModuleEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ModuleEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ModuleEvent,
"module", "module",
DAP_FIELD(module, "module"), DAP_FIELD(module, "module"),
DAP_FIELD(reason, "reason")); DAP_FIELD(reason, "reason"));
OutputEvent::OutputEvent() = default;
OutputEvent::~OutputEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(OutputEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(OutputEvent,
"output", "output",
DAP_FIELD(category, "category"), DAP_FIELD(category, "category"),
...@@ -80,8 +64,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(OutputEvent, ...@@ -80,8 +64,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(OutputEvent,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
ProcessEvent::ProcessEvent() = default;
ProcessEvent::~ProcessEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ProcessEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ProcessEvent,
"process", "process",
DAP_FIELD(isLocalProcess, "isLocalProcess"), DAP_FIELD(isLocalProcess, "isLocalProcess"),
...@@ -90,15 +72,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ProcessEvent, ...@@ -90,15 +72,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ProcessEvent,
DAP_FIELD(startMethod, "startMethod"), DAP_FIELD(startMethod, "startMethod"),
DAP_FIELD(systemProcessId, "systemProcessId")); DAP_FIELD(systemProcessId, "systemProcessId"));
ProgressEndEvent::ProgressEndEvent() = default;
ProgressEndEvent::~ProgressEndEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressEndEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressEndEvent,
"progressEnd", "progressEnd",
DAP_FIELD(message, "message"), DAP_FIELD(message, "message"),
DAP_FIELD(progressId, "progressId")); DAP_FIELD(progressId, "progressId"));
ProgressStartEvent::ProgressStartEvent() = default;
ProgressStartEvent::~ProgressStartEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressStartEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressStartEvent,
"progressStart", "progressStart",
DAP_FIELD(cancellable, "cancellable"), DAP_FIELD(cancellable, "cancellable"),
...@@ -108,16 +86,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressStartEvent, ...@@ -108,16 +86,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressStartEvent,
DAP_FIELD(requestId, "requestId"), DAP_FIELD(requestId, "requestId"),
DAP_FIELD(title, "title")); DAP_FIELD(title, "title"));
ProgressUpdateEvent::ProgressUpdateEvent() = default;
ProgressUpdateEvent::~ProgressUpdateEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressUpdateEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ProgressUpdateEvent,
"progressUpdate", "progressUpdate",
DAP_FIELD(message, "message"), DAP_FIELD(message, "message"),
DAP_FIELD(percentage, "percentage"), DAP_FIELD(percentage, "percentage"),
DAP_FIELD(progressId, "progressId")); DAP_FIELD(progressId, "progressId"));
StoppedEvent::StoppedEvent() = default;
StoppedEvent::~StoppedEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StoppedEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(StoppedEvent,
"stopped", "stopped",
DAP_FIELD(allThreadsStopped, "allThreadsStopped"), DAP_FIELD(allThreadsStopped, "allThreadsStopped"),
...@@ -127,14 +101,10 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StoppedEvent, ...@@ -127,14 +101,10 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StoppedEvent,
DAP_FIELD(text, "text"), DAP_FIELD(text, "text"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
TerminatedEvent::TerminatedEvent() = default;
TerminatedEvent::~TerminatedEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminatedEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminatedEvent,
"terminated", "terminated",
DAP_FIELD(restart, "restart")); DAP_FIELD(restart, "restart"));
ThreadEvent::ThreadEvent() = default;
ThreadEvent::~ThreadEvent() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadEvent, DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadEvent,
"thread", "thread",
DAP_FIELD(reason, "reason"), DAP_FIELD(reason, "reason"),
......
...@@ -21,14 +21,10 @@ ...@@ -21,14 +21,10 @@
namespace dap { namespace dap {
AttachRequest::AttachRequest() = default;
AttachRequest::~AttachRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(AttachRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(AttachRequest,
"attach", "attach",
DAP_FIELD(restart, "__restart")); DAP_FIELD(restart, "__restart"));
BreakpointLocationsRequest::BreakpointLocationsRequest() = default;
BreakpointLocationsRequest::~BreakpointLocationsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsRequest,
"breakpointLocations", "breakpointLocations",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -37,15 +33,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsRequest, ...@@ -37,15 +33,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsRequest,
DAP_FIELD(line, "line"), DAP_FIELD(line, "line"),
DAP_FIELD(source, "source")); DAP_FIELD(source, "source"));
CancelRequest::CancelRequest() = default;
CancelRequest::~CancelRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CancelRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(CancelRequest,
"cancel", "cancel",
DAP_FIELD(progressId, "progressId"), DAP_FIELD(progressId, "progressId"),
DAP_FIELD(requestId, "requestId")); DAP_FIELD(requestId, "requestId"));
CompletionsRequest::CompletionsRequest() = default;
CompletionsRequest::~CompletionsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsRequest,
"completions", "completions",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -53,26 +45,18 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsRequest, ...@@ -53,26 +45,18 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsRequest,
DAP_FIELD(line, "line"), DAP_FIELD(line, "line"),
DAP_FIELD(text, "text")); DAP_FIELD(text, "text"));
ConfigurationDoneRequest::ConfigurationDoneRequest() = default;
ConfigurationDoneRequest::~ConfigurationDoneRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ConfigurationDoneRequest, "configurationDone"); DAP_IMPLEMENT_STRUCT_TYPEINFO(ConfigurationDoneRequest, "configurationDone");
ContinueRequest::ContinueRequest() = default;
ContinueRequest::~ContinueRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinueRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinueRequest,
"continue", "continue",
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
DataBreakpointInfoRequest::DataBreakpointInfoRequest() = default;
DataBreakpointInfoRequest::~DataBreakpointInfoRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoRequest,
"dataBreakpointInfo", "dataBreakpointInfo",
DAP_FIELD(name, "name"), DAP_FIELD(name, "name"),
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
DisassembleRequest::DisassembleRequest() = default;
DisassembleRequest::~DisassembleRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleRequest,
"disassemble", "disassemble",
DAP_FIELD(instructionCount, "instructionCount"), DAP_FIELD(instructionCount, "instructionCount"),
...@@ -81,16 +65,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleRequest, ...@@ -81,16 +65,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleRequest,
DAP_FIELD(offset, "offset"), DAP_FIELD(offset, "offset"),
DAP_FIELD(resolveSymbols, "resolveSymbols")); DAP_FIELD(resolveSymbols, "resolveSymbols"));
DisconnectRequest::DisconnectRequest() = default;
DisconnectRequest::~DisconnectRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DisconnectRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(DisconnectRequest,
"disconnect", "disconnect",
DAP_FIELD(restart, "restart"), DAP_FIELD(restart, "restart"),
DAP_FIELD(terminateDebuggee, DAP_FIELD(terminateDebuggee,
"terminateDebuggee")); "terminateDebuggee"));
EvaluateRequest::EvaluateRequest() = default;
EvaluateRequest::~EvaluateRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateRequest,
"evaluate", "evaluate",
DAP_FIELD(context, "context"), DAP_FIELD(context, "context"),
...@@ -98,29 +78,21 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateRequest, ...@@ -98,29 +78,21 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateRequest,
DAP_FIELD(format, "format"), DAP_FIELD(format, "format"),
DAP_FIELD(frameId, "frameId")); DAP_FIELD(frameId, "frameId"));
ExceptionInfoRequest::ExceptionInfoRequest() = default;
ExceptionInfoRequest::~ExceptionInfoRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoRequest,
"exceptionInfo", "exceptionInfo",
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
GotoRequest::GotoRequest() = default;
GotoRequest::~GotoRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoRequest,
"goto", "goto",
DAP_FIELD(targetId, "targetId"), DAP_FIELD(targetId, "targetId"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
GotoTargetsRequest::GotoTargetsRequest() = default;
GotoTargetsRequest::~GotoTargetsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTargetsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTargetsRequest,
"gotoTargets", "gotoTargets",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
DAP_FIELD(line, "line"), DAP_FIELD(line, "line"),
DAP_FIELD(source, "source")); DAP_FIELD(source, "source"));
InitializeRequest::InitializeRequest() = default;
InitializeRequest::~InitializeRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO( DAP_IMPLEMENT_STRUCT_TYPEINFO(
InitializeRequest, InitializeRequest,
"initialize", "initialize",
...@@ -137,63 +109,43 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO( ...@@ -137,63 +109,43 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
DAP_FIELD(supportsVariablePaging, "supportsVariablePaging"), DAP_FIELD(supportsVariablePaging, "supportsVariablePaging"),
DAP_FIELD(supportsVariableType, "supportsVariableType")); DAP_FIELD(supportsVariableType, "supportsVariableType"));
LaunchRequest::LaunchRequest() = default;
LaunchRequest::~LaunchRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(LaunchRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(LaunchRequest,
"launch", "launch",
DAP_FIELD(restart, "__restart"), DAP_FIELD(restart, "__restart"),
DAP_FIELD(noDebug, "noDebug")); DAP_FIELD(noDebug, "noDebug"));
LoadedSourcesRequest::LoadedSourcesRequest() = default;
LoadedSourcesRequest::~LoadedSourcesRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesRequest, "loadedSources"); DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesRequest, "loadedSources");
ModulesRequest::ModulesRequest() = default;
ModulesRequest::~ModulesRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesRequest,
"modules", "modules",
DAP_FIELD(moduleCount, "moduleCount"), DAP_FIELD(moduleCount, "moduleCount"),
DAP_FIELD(startModule, "startModule")); DAP_FIELD(startModule, "startModule"));
NextRequest::NextRequest() = default;
NextRequest::~NextRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(NextRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(NextRequest,
"next", "next",
DAP_FIELD(granularity, "granularity"), DAP_FIELD(granularity, "granularity"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
PauseRequest::PauseRequest() = default;
PauseRequest::~PauseRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(PauseRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(PauseRequest,
"pause", "pause",
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
ReadMemoryRequest::ReadMemoryRequest() = default;
ReadMemoryRequest::~ReadMemoryRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ReadMemoryRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ReadMemoryRequest,
"readMemory", "readMemory",
DAP_FIELD(count, "count"), DAP_FIELD(count, "count"),
DAP_FIELD(memoryReference, "memoryReference"), DAP_FIELD(memoryReference, "memoryReference"),
DAP_FIELD(offset, "offset")); DAP_FIELD(offset, "offset"));
RestartFrameRequest::RestartFrameRequest() = default;
RestartFrameRequest::~RestartFrameRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartFrameRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartFrameRequest,
"restartFrame", "restartFrame",
DAP_FIELD(frameId, "frameId")); DAP_FIELD(frameId, "frameId"));
RestartRequest::RestartRequest() = default;
RestartRequest::~RestartRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartRequest, "restart"); DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartRequest, "restart");
ReverseContinueRequest::ReverseContinueRequest() = default;
ReverseContinueRequest::~ReverseContinueRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ReverseContinueRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ReverseContinueRequest,
"reverseContinue", "reverseContinue",
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
RunInTerminalRequest::RunInTerminalRequest() = default;
RunInTerminalRequest::~RunInTerminalRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalRequest,
"runInTerminal", "runInTerminal",
DAP_FIELD(args, "args"), DAP_FIELD(args, "args"),
...@@ -202,14 +154,10 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalRequest, ...@@ -202,14 +154,10 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalRequest,
DAP_FIELD(kind, "kind"), DAP_FIELD(kind, "kind"),
DAP_FIELD(title, "title")); DAP_FIELD(title, "title"));
ScopesRequest::ScopesRequest() = default;
ScopesRequest::~ScopesRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ScopesRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(ScopesRequest,
"scopes", "scopes",
DAP_FIELD(frameId, "frameId")); DAP_FIELD(frameId, "frameId"));
SetBreakpointsRequest::SetBreakpointsRequest() = default;
SetBreakpointsRequest::~SetBreakpointsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsRequest,
"setBreakpoints", "setBreakpoints",
DAP_FIELD(breakpoints, "breakpoints"), DAP_FIELD(breakpoints, "breakpoints"),
...@@ -217,21 +165,15 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsRequest, ...@@ -217,21 +165,15 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsRequest,
DAP_FIELD(source, "source"), DAP_FIELD(source, "source"),
DAP_FIELD(sourceModified, "sourceModified")); DAP_FIELD(sourceModified, "sourceModified"));
SetDataBreakpointsRequest::SetDataBreakpointsRequest() = default;
SetDataBreakpointsRequest::~SetDataBreakpointsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetDataBreakpointsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetDataBreakpointsRequest,
"setDataBreakpoints", "setDataBreakpoints",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetExceptionBreakpointsRequest::SetExceptionBreakpointsRequest() = default;
SetExceptionBreakpointsRequest::~SetExceptionBreakpointsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExceptionBreakpointsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExceptionBreakpointsRequest,
"setExceptionBreakpoints", "setExceptionBreakpoints",
DAP_FIELD(exceptionOptions, "exceptionOptions"), DAP_FIELD(exceptionOptions, "exceptionOptions"),
DAP_FIELD(filters, "filters")); DAP_FIELD(filters, "filters"));
SetExpressionRequest::SetExpressionRequest() = default;
SetExpressionRequest::~SetExpressionRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionRequest,
"setExpression", "setExpression",
DAP_FIELD(expression, "expression"), DAP_FIELD(expression, "expression"),
...@@ -239,20 +181,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionRequest, ...@@ -239,20 +181,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionRequest,
DAP_FIELD(frameId, "frameId"), DAP_FIELD(frameId, "frameId"),
DAP_FIELD(value, "value")); DAP_FIELD(value, "value"));
SetFunctionBreakpointsRequest::SetFunctionBreakpointsRequest() = default;
SetFunctionBreakpointsRequest::~SetFunctionBreakpointsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetFunctionBreakpointsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetFunctionBreakpointsRequest,
"setFunctionBreakpoints", "setFunctionBreakpoints",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetInstructionBreakpointsRequest::SetInstructionBreakpointsRequest() = default;
SetInstructionBreakpointsRequest::~SetInstructionBreakpointsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetInstructionBreakpointsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetInstructionBreakpointsRequest,
"setInstructionBreakpoints", "setInstructionBreakpoints",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetVariableRequest::SetVariableRequest() = default;
SetVariableRequest::~SetVariableRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableRequest,
"setVariable", "setVariable",
DAP_FIELD(format, "format"), DAP_FIELD(format, "format"),
...@@ -261,15 +197,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableRequest, ...@@ -261,15 +197,11 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableRequest,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
SourceRequest::SourceRequest() = default;
SourceRequest::~SourceRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceRequest,
"source", "source",
DAP_FIELD(source, "source"), DAP_FIELD(source, "source"),
DAP_FIELD(sourceReference, "sourceReference")); DAP_FIELD(sourceReference, "sourceReference"));
StackTraceRequest::StackTraceRequest() = default;
StackTraceRequest::~StackTraceRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceRequest,
"stackTrace", "stackTrace",
DAP_FIELD(format, "format"), DAP_FIELD(format, "format"),
...@@ -277,52 +209,36 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceRequest, ...@@ -277,52 +209,36 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceRequest,
DAP_FIELD(startFrame, "startFrame"), DAP_FIELD(startFrame, "startFrame"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
StepBackRequest::StepBackRequest() = default;
StepBackRequest::~StepBackRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepBackRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepBackRequest,
"stepBack", "stepBack",
DAP_FIELD(granularity, "granularity"), DAP_FIELD(granularity, "granularity"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
StepInRequest::StepInRequest() = default;
StepInRequest::~StepInRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInRequest,
"stepIn", "stepIn",
DAP_FIELD(granularity, "granularity"), DAP_FIELD(granularity, "granularity"),
DAP_FIELD(targetId, "targetId"), DAP_FIELD(targetId, "targetId"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
StepInTargetsRequest::StepInTargetsRequest() = default;
StepInTargetsRequest::~StepInTargetsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTargetsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTargetsRequest,
"stepInTargets", "stepInTargets",
DAP_FIELD(frameId, "frameId")); DAP_FIELD(frameId, "frameId"));
StepOutRequest::StepOutRequest() = default;
StepOutRequest::~StepOutRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepOutRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepOutRequest,
"stepOut", "stepOut",
DAP_FIELD(granularity, "granularity"), DAP_FIELD(granularity, "granularity"),
DAP_FIELD(threadId, "threadId")); DAP_FIELD(threadId, "threadId"));
TerminateRequest::TerminateRequest() = default;
TerminateRequest::~TerminateRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateRequest,
"terminate", "terminate",
DAP_FIELD(restart, "restart")); DAP_FIELD(restart, "restart"));
TerminateThreadsRequest::TerminateThreadsRequest() = default;
TerminateThreadsRequest::~TerminateThreadsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateThreadsRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateThreadsRequest,
"terminateThreads", "terminateThreads",
DAP_FIELD(threadIds, "threadIds")); DAP_FIELD(threadIds, "threadIds"));
ThreadsRequest::ThreadsRequest() = default;
ThreadsRequest::~ThreadsRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadsRequest, "threads"); DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadsRequest, "threads");
VariablesRequest::VariablesRequest() = default;
VariablesRequest::~VariablesRequest() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablesRequest, DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablesRequest,
"variables", "variables",
DAP_FIELD(count, "count"), DAP_FIELD(count, "count"),
......
...@@ -21,39 +21,25 @@ ...@@ -21,39 +21,25 @@
namespace dap { namespace dap {
AttachResponse::AttachResponse() = default;
AttachResponse::~AttachResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(AttachResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(AttachResponse, "");
BreakpointLocationsResponse::BreakpointLocationsResponse() = default;
BreakpointLocationsResponse::~BreakpointLocationsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocationsResponse,
"", "",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
CancelResponse::CancelResponse() = default;
CancelResponse::~CancelResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CancelResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(CancelResponse, "");
CompletionsResponse::CompletionsResponse() = default;
CompletionsResponse::~CompletionsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionsResponse,
"", "",
DAP_FIELD(targets, "targets")); DAP_FIELD(targets, "targets"));
ConfigurationDoneResponse::ConfigurationDoneResponse() = default;
ConfigurationDoneResponse::~ConfigurationDoneResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ConfigurationDoneResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(ConfigurationDoneResponse, "");
ContinueResponse::ContinueResponse() = default;
ContinueResponse::~ContinueResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinueResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(ContinueResponse,
"", "",
DAP_FIELD(allThreadsContinued, DAP_FIELD(allThreadsContinued,
"allThreadsContinued")); "allThreadsContinued"));
DataBreakpointInfoResponse::DataBreakpointInfoResponse() = default;
DataBreakpointInfoResponse::~DataBreakpointInfoResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoResponse,
"", "",
DAP_FIELD(accessTypes, "accessTypes"), DAP_FIELD(accessTypes, "accessTypes"),
...@@ -61,22 +47,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoResponse, ...@@ -61,22 +47,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointInfoResponse,
DAP_FIELD(dataId, "dataId"), DAP_FIELD(dataId, "dataId"),
DAP_FIELD(description, "description")); DAP_FIELD(description, "description"));
DisassembleResponse::DisassembleResponse() = default;
DisassembleResponse::~DisassembleResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembleResponse,
"", "",
DAP_FIELD(instructions, "instructions")); DAP_FIELD(instructions, "instructions"));
DisconnectResponse::DisconnectResponse() = default;
DisconnectResponse::~DisconnectResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DisconnectResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(DisconnectResponse, "");
ErrorResponse::ErrorResponse() = default;
ErrorResponse::~ErrorResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ErrorResponse, "", DAP_FIELD(error, "error")); DAP_IMPLEMENT_STRUCT_TYPEINFO(ErrorResponse, "", DAP_FIELD(error, "error"));
EvaluateResponse::EvaluateResponse() = default;
EvaluateResponse::~EvaluateResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateResponse,
"", "",
DAP_FIELD(indexedVariables, "indexedVariables"), DAP_FIELD(indexedVariables, "indexedVariables"),
...@@ -88,8 +66,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateResponse, ...@@ -88,8 +66,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(EvaluateResponse,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
ExceptionInfoResponse::ExceptionInfoResponse() = default;
ExceptionInfoResponse::~ExceptionInfoResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoResponse,
"", "",
DAP_FIELD(breakMode, "breakMode"), DAP_FIELD(breakMode, "breakMode"),
...@@ -97,18 +73,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoResponse, ...@@ -97,18 +73,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionInfoResponse,
DAP_FIELD(details, "details"), DAP_FIELD(details, "details"),
DAP_FIELD(exceptionId, "exceptionId")); DAP_FIELD(exceptionId, "exceptionId"));
GotoResponse::GotoResponse() = default;
GotoResponse::~GotoResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoResponse, "");
GotoTargetsResponse::GotoTargetsResponse() = default;
GotoTargetsResponse::~GotoTargetsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTargetsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTargetsResponse,
"", "",
DAP_FIELD(targets, "targets")); DAP_FIELD(targets, "targets"));
InitializeResponse::InitializeResponse() = default;
InitializeResponse::~InitializeResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO( DAP_IMPLEMENT_STRUCT_TYPEINFO(
InitializeResponse, InitializeResponse,
"", "",
...@@ -154,80 +124,50 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO( ...@@ -154,80 +124,50 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
DAP_FIELD(supportsValueFormattingOptions, DAP_FIELD(supportsValueFormattingOptions,
"supportsValueFormattingOptions")); "supportsValueFormattingOptions"));
LaunchResponse::LaunchResponse() = default;
LaunchResponse::~LaunchResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(LaunchResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(LaunchResponse, "");
LoadedSourcesResponse::LoadedSourcesResponse() = default;
LoadedSourcesResponse::~LoadedSourcesResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(LoadedSourcesResponse,
"", "",
DAP_FIELD(sources, "sources")); DAP_FIELD(sources, "sources"));
ModulesResponse::ModulesResponse() = default;
ModulesResponse::~ModulesResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(ModulesResponse,
"", "",
DAP_FIELD(modules, "modules"), DAP_FIELD(modules, "modules"),
DAP_FIELD(totalModules, "totalModules")); DAP_FIELD(totalModules, "totalModules"));
NextResponse::NextResponse() = default;
NextResponse::~NextResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(NextResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(NextResponse, "");
PauseResponse::PauseResponse() = default;
PauseResponse::~PauseResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(PauseResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(PauseResponse, "");
ReadMemoryResponse::ReadMemoryResponse() = default;
ReadMemoryResponse::~ReadMemoryResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ReadMemoryResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(ReadMemoryResponse,
"", "",
DAP_FIELD(address, "address"), DAP_FIELD(address, "address"),
DAP_FIELD(data, "data"), DAP_FIELD(data, "data"),
DAP_FIELD(unreadableBytes, "unreadableBytes")); DAP_FIELD(unreadableBytes, "unreadableBytes"));
RestartFrameResponse::RestartFrameResponse() = default;
RestartFrameResponse::~RestartFrameResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartFrameResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartFrameResponse, "");
RestartResponse::RestartResponse() = default;
RestartResponse::~RestartResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(RestartResponse, "");
ReverseContinueResponse::ReverseContinueResponse() = default;
ReverseContinueResponse::~ReverseContinueResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ReverseContinueResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(ReverseContinueResponse, "");
RunInTerminalResponse::RunInTerminalResponse() = default;
RunInTerminalResponse::~RunInTerminalResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(RunInTerminalResponse,
"", "",
DAP_FIELD(processId, "processId"), DAP_FIELD(processId, "processId"),
DAP_FIELD(shellProcessId, "shellProcessId")); DAP_FIELD(shellProcessId, "shellProcessId"));
ScopesResponse::ScopesResponse() = default;
ScopesResponse::~ScopesResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ScopesResponse, "", DAP_FIELD(scopes, "scopes")); DAP_IMPLEMENT_STRUCT_TYPEINFO(ScopesResponse, "", DAP_FIELD(scopes, "scopes"));
SetBreakpointsResponse::SetBreakpointsResponse() = default;
SetBreakpointsResponse::~SetBreakpointsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetBreakpointsResponse,
"", "",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetDataBreakpointsResponse::SetDataBreakpointsResponse() = default;
SetDataBreakpointsResponse::~SetDataBreakpointsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetDataBreakpointsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetDataBreakpointsResponse,
"", "",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetExceptionBreakpointsResponse::SetExceptionBreakpointsResponse() = default;
SetExceptionBreakpointsResponse::~SetExceptionBreakpointsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExceptionBreakpointsResponse, "");
SetExpressionResponse::SetExpressionResponse() = default;
SetExpressionResponse::~SetExpressionResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse,
"", "",
DAP_FIELD(indexedVariables, "indexedVariables"), DAP_FIELD(indexedVariables, "indexedVariables"),
...@@ -238,22 +178,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse, ...@@ -238,22 +178,14 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetExpressionResponse,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
SetFunctionBreakpointsResponse::SetFunctionBreakpointsResponse() = default;
SetFunctionBreakpointsResponse::~SetFunctionBreakpointsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetFunctionBreakpointsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetFunctionBreakpointsResponse,
"", "",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetInstructionBreakpointsResponse::SetInstructionBreakpointsResponse() =
default;
SetInstructionBreakpointsResponse::~SetInstructionBreakpointsResponse() =
default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetInstructionBreakpointsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetInstructionBreakpointsResponse,
"", "",
DAP_FIELD(breakpoints, "breakpoints")); DAP_FIELD(breakpoints, "breakpoints"));
SetVariableResponse::SetVariableResponse() = default;
SetVariableResponse::~SetVariableResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse,
"", "",
DAP_FIELD(indexedVariables, "indexedVariables"), DAP_FIELD(indexedVariables, "indexedVariables"),
...@@ -263,54 +195,34 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse, ...@@ -263,54 +195,34 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SetVariableResponse,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
SourceResponse::SourceResponse() = default;
SourceResponse::~SourceResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceResponse,
"", "",
DAP_FIELD(content, "content"), DAP_FIELD(content, "content"),
DAP_FIELD(mimeType, "mimeType")); DAP_FIELD(mimeType, "mimeType"));
StackTraceResponse::StackTraceResponse() = default;
StackTraceResponse::~StackTraceResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(StackTraceResponse,
"", "",
DAP_FIELD(stackFrames, "stackFrames"), DAP_FIELD(stackFrames, "stackFrames"),
DAP_FIELD(totalFrames, "totalFrames")); DAP_FIELD(totalFrames, "totalFrames"));
StepBackResponse::StepBackResponse() = default;
StepBackResponse::~StepBackResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepBackResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(StepBackResponse, "");
StepInResponse::StepInResponse() = default;
StepInResponse::~StepInResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInResponse, "");
StepInTargetsResponse::StepInTargetsResponse() = default;
StepInTargetsResponse::~StepInTargetsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTargetsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTargetsResponse,
"", "",
DAP_FIELD(targets, "targets")); DAP_FIELD(targets, "targets"));
StepOutResponse::StepOutResponse() = default;
StepOutResponse::~StepOutResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepOutResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(StepOutResponse, "");
TerminateResponse::TerminateResponse() = default;
TerminateResponse::~TerminateResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateResponse, "");
TerminateThreadsResponse::TerminateThreadsResponse() = default;
TerminateThreadsResponse::~TerminateThreadsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateThreadsResponse, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(TerminateThreadsResponse, "");
ThreadsResponse::ThreadsResponse() = default;
ThreadsResponse::~ThreadsResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadsResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(ThreadsResponse,
"", "",
DAP_FIELD(threads, "threads")); DAP_FIELD(threads, "threads"));
VariablesResponse::VariablesResponse() = default;
VariablesResponse::~VariablesResponse() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablesResponse, DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablesResponse,
"", "",
DAP_FIELD(variables, "variables")); DAP_FIELD(variables, "variables"));
......
...@@ -21,19 +21,13 @@ ...@@ -21,19 +21,13 @@
namespace dap { namespace dap {
ChecksumAlgorithm::ChecksumAlgorithm() = default;
ChecksumAlgorithm::~ChecksumAlgorithm() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ChecksumAlgorithm, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(ChecksumAlgorithm, "");
Checksum::Checksum() = default;
Checksum::~Checksum() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Checksum, DAP_IMPLEMENT_STRUCT_TYPEINFO(Checksum,
"", "",
DAP_FIELD(algorithm, "algorithm"), DAP_FIELD(algorithm, "algorithm"),
DAP_FIELD(checksum, "checksum")); DAP_FIELD(checksum, "checksum"));
Source::Source() = default;
Source::~Source() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Source, DAP_IMPLEMENT_STRUCT_TYPEINFO(Source,
"", "",
DAP_FIELD(adapterData, "adapterData"), DAP_FIELD(adapterData, "adapterData"),
...@@ -45,8 +39,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Source, ...@@ -45,8 +39,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Source,
DAP_FIELD(sourceReference, "sourceReference"), DAP_FIELD(sourceReference, "sourceReference"),
DAP_FIELD(sources, "sources")); DAP_FIELD(sources, "sources"));
Breakpoint::Breakpoint() = default;
Breakpoint::~Breakpoint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Breakpoint, DAP_IMPLEMENT_STRUCT_TYPEINFO(Breakpoint,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -61,8 +53,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Breakpoint, ...@@ -61,8 +53,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Breakpoint,
DAP_FIELD(source, "source"), DAP_FIELD(source, "source"),
DAP_FIELD(verified, "verified")); DAP_FIELD(verified, "verified"));
BreakpointLocation::BreakpointLocation() = default;
BreakpointLocation::~BreakpointLocation() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocation, DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocation,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -70,8 +60,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocation, ...@@ -70,8 +60,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(BreakpointLocation,
DAP_FIELD(endLine, "endLine"), DAP_FIELD(endLine, "endLine"),
DAP_FIELD(line, "line")); DAP_FIELD(line, "line"));
ColumnDescriptor::ColumnDescriptor() = default;
ColumnDescriptor::~ColumnDescriptor() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ColumnDescriptor, DAP_IMPLEMENT_STRUCT_TYPEINFO(ColumnDescriptor,
"", "",
DAP_FIELD(attributeName, "attributeName"), DAP_FIELD(attributeName, "attributeName"),
...@@ -80,16 +68,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ColumnDescriptor, ...@@ -80,16 +68,12 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ColumnDescriptor,
DAP_FIELD(type, "type"), DAP_FIELD(type, "type"),
DAP_FIELD(width, "width")); DAP_FIELD(width, "width"));
ExceptionBreakpointsFilter::ExceptionBreakpointsFilter() = default;
ExceptionBreakpointsFilter::~ExceptionBreakpointsFilter() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionBreakpointsFilter, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionBreakpointsFilter,
"", "",
DAP_FIELD(def, "default"), DAP_FIELD(def, "default"),
DAP_FIELD(filter, "filter"), DAP_FIELD(filter, "filter"),
DAP_FIELD(label, "label")); DAP_FIELD(label, "label"));
Capabilities::Capabilities() = default;
Capabilities::~Capabilities() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO( DAP_IMPLEMENT_STRUCT_TYPEINFO(
Capabilities, Capabilities,
"", "",
...@@ -135,12 +119,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO( ...@@ -135,12 +119,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(
DAP_FIELD(supportsValueFormattingOptions, DAP_FIELD(supportsValueFormattingOptions,
"supportsValueFormattingOptions")); "supportsValueFormattingOptions"));
CompletionItemType::CompletionItemType() = default;
CompletionItemType::~CompletionItemType() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItemType, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItemType, "");
CompletionItem::CompletionItem() = default;
CompletionItem::~CompletionItem() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItem, DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItem,
"", "",
DAP_FIELD(label, "label"), DAP_FIELD(label, "label"),
...@@ -152,12 +132,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItem, ...@@ -152,12 +132,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(CompletionItem,
DAP_FIELD(text, "text"), DAP_FIELD(text, "text"),
DAP_FIELD(type, "type")); DAP_FIELD(type, "type"));
DataBreakpointAccessType::DataBreakpointAccessType() = default;
DataBreakpointAccessType::~DataBreakpointAccessType() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointAccessType, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpointAccessType, "");
DisassembledInstruction::DisassembledInstruction() = default;
DisassembledInstruction::~DisassembledInstruction() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembledInstruction, DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembledInstruction,
"", "",
DAP_FIELD(address, "address"), DAP_FIELD(address, "address"),
...@@ -170,8 +146,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembledInstruction, ...@@ -170,8 +146,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DisassembledInstruction,
DAP_FIELD(location, "location"), DAP_FIELD(location, "location"),
DAP_FIELD(symbol, "symbol")); DAP_FIELD(symbol, "symbol"));
Message::Message() = default;
Message::~Message() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Message, DAP_IMPLEMENT_STRUCT_TYPEINFO(Message,
"", "",
DAP_FIELD(format, "format"), DAP_FIELD(format, "format"),
...@@ -182,24 +156,16 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Message, ...@@ -182,24 +156,16 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Message,
DAP_FIELD(urlLabel, "urlLabel"), DAP_FIELD(urlLabel, "urlLabel"),
DAP_FIELD(variables, "variables")); DAP_FIELD(variables, "variables"));
VariablePresentationHint::VariablePresentationHint() = default;
VariablePresentationHint::~VariablePresentationHint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablePresentationHint, DAP_IMPLEMENT_STRUCT_TYPEINFO(VariablePresentationHint,
"", "",
DAP_FIELD(attributes, "attributes"), DAP_FIELD(attributes, "attributes"),
DAP_FIELD(kind, "kind"), DAP_FIELD(kind, "kind"),
DAP_FIELD(visibility, "visibility")); DAP_FIELD(visibility, "visibility"));
ValueFormat::ValueFormat() = default;
ValueFormat::~ValueFormat() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ValueFormat, "", DAP_FIELD(hex, "hex")); DAP_IMPLEMENT_STRUCT_TYPEINFO(ValueFormat, "", DAP_FIELD(hex, "hex"));
ExceptionBreakMode::ExceptionBreakMode() = default;
ExceptionBreakMode::~ExceptionBreakMode() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionBreakMode, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionBreakMode, "");
ExceptionDetails::ExceptionDetails() = default;
ExceptionDetails::~ExceptionDetails() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionDetails, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionDetails,
"", "",
DAP_FIELD(evaluateName, "evaluateName"), DAP_FIELD(evaluateName, "evaluateName"),
...@@ -209,8 +175,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionDetails, ...@@ -209,8 +175,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionDetails,
DAP_FIELD(stackTrace, "stackTrace"), DAP_FIELD(stackTrace, "stackTrace"),
DAP_FIELD(typeName, "typeName")); DAP_FIELD(typeName, "typeName"));
GotoTarget::GotoTarget() = default;
GotoTarget::~GotoTarget() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTarget, DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTarget,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -222,8 +186,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTarget, ...@@ -222,8 +186,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(GotoTarget,
DAP_FIELD(label, "label"), DAP_FIELD(label, "label"),
DAP_FIELD(line, "line")); DAP_FIELD(line, "line"));
Module::Module() = default;
Module::~Module() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Module, DAP_IMPLEMENT_STRUCT_TYPEINFO(Module,
"", "",
DAP_FIELD(addressRange, "addressRange"), DAP_FIELD(addressRange, "addressRange"),
...@@ -237,12 +199,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Module, ...@@ -237,12 +199,8 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Module,
DAP_FIELD(symbolStatus, "symbolStatus"), DAP_FIELD(symbolStatus, "symbolStatus"),
DAP_FIELD(version, "version")); DAP_FIELD(version, "version"));
SteppingGranularity::SteppingGranularity() = default;
SteppingGranularity::~SteppingGranularity() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SteppingGranularity, ""); DAP_IMPLEMENT_STRUCT_TYPEINFO(SteppingGranularity, "");
Scope::Scope() = default;
Scope::~Scope() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Scope, DAP_IMPLEMENT_STRUCT_TYPEINFO(Scope,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -258,8 +216,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Scope, ...@@ -258,8 +216,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(Scope,
DAP_FIELD(variablesReference, DAP_FIELD(variablesReference,
"variablesReference")); "variablesReference"));
SourceBreakpoint::SourceBreakpoint() = default;
SourceBreakpoint::~SourceBreakpoint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceBreakpoint, DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceBreakpoint,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -268,8 +224,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceBreakpoint, ...@@ -268,8 +224,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(SourceBreakpoint,
DAP_FIELD(line, "line"), DAP_FIELD(line, "line"),
DAP_FIELD(logMessage, "logMessage")); DAP_FIELD(logMessage, "logMessage"));
DataBreakpoint::DataBreakpoint() = default;
DataBreakpoint::~DataBreakpoint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpoint, DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpoint,
"", "",
DAP_FIELD(accessType, "accessType"), DAP_FIELD(accessType, "accessType"),
...@@ -277,30 +231,22 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpoint, ...@@ -277,30 +231,22 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(DataBreakpoint,
DAP_FIELD(dataId, "dataId"), DAP_FIELD(dataId, "dataId"),
DAP_FIELD(hitCondition, "hitCondition")); DAP_FIELD(hitCondition, "hitCondition"));
ExceptionPathSegment::ExceptionPathSegment() = default;
ExceptionPathSegment::~ExceptionPathSegment() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionPathSegment, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionPathSegment,
"", "",
DAP_FIELD(names, "names"), DAP_FIELD(names, "names"),
DAP_FIELD(negate, "negate")); DAP_FIELD(negate, "negate"));
ExceptionOptions::ExceptionOptions() = default;
ExceptionOptions::~ExceptionOptions() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionOptions, DAP_IMPLEMENT_STRUCT_TYPEINFO(ExceptionOptions,
"", "",
DAP_FIELD(breakMode, "breakMode"), DAP_FIELD(breakMode, "breakMode"),
DAP_FIELD(path, "path")); DAP_FIELD(path, "path"));
FunctionBreakpoint::FunctionBreakpoint() = default;
FunctionBreakpoint::~FunctionBreakpoint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(FunctionBreakpoint, DAP_IMPLEMENT_STRUCT_TYPEINFO(FunctionBreakpoint,
"", "",
DAP_FIELD(condition, "condition"), DAP_FIELD(condition, "condition"),
DAP_FIELD(hitCondition, "hitCondition"), DAP_FIELD(hitCondition, "hitCondition"),
DAP_FIELD(name, "name")); DAP_FIELD(name, "name"));
InstructionBreakpoint::InstructionBreakpoint() = default;
InstructionBreakpoint::~InstructionBreakpoint() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(InstructionBreakpoint, DAP_IMPLEMENT_STRUCT_TYPEINFO(InstructionBreakpoint,
"", "",
DAP_FIELD(condition, "condition"), DAP_FIELD(condition, "condition"),
...@@ -309,8 +255,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(InstructionBreakpoint, ...@@ -309,8 +255,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(InstructionBreakpoint,
"instructionReference"), "instructionReference"),
DAP_FIELD(offset, "offset")); DAP_FIELD(offset, "offset"));
StackFrame::StackFrame() = default;
StackFrame::~StackFrame() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrame, DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrame,
"", "",
DAP_FIELD(column, "column"), DAP_FIELD(column, "column"),
...@@ -325,8 +269,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrame, ...@@ -325,8 +269,6 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrame,
DAP_FIELD(presentationHint, "presentationHint"), DAP_FIELD(presentationHint, "presentationHint"),
DAP_FIELD(source, "source")); DAP_FIELD(source, "source"));
StackFrameFormat::StackFrameFormat() = default;
StackFrameFormat::~StackFrameFormat() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrameFormat, DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrameFormat,
"", "",
DAP_FIELD(includeAll, "includeAll"), DAP_FIELD(includeAll, "includeAll"),
...@@ -337,22 +279,16 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrameFormat, ...@@ -337,22 +279,16 @@ DAP_IMPLEMENT_STRUCT_TYPEINFO(StackFrameFormat,
DAP_FIELD(parameterValues, "parameterValues"), DAP_FIELD(parameterValues, "parameterValues"),
DAP_FIELD(parameters, "parameters")); DAP_FIELD(parameters, "parameters"));
StepInTarget::StepInTarget() = default;
StepInTarget::~StepInTarget() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTarget, DAP_IMPLEMENT_STRUCT_TYPEINFO(StepInTarget,
"", "",
DAP_FIELD(id, "id"), DAP_FIELD(id, "id"),
DAP_FIELD(label, "label")); DAP_FIELD(label, "label"));
Thread::Thread() = default;
Thread::~Thread() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Thread, DAP_IMPLEMENT_STRUCT_TYPEINFO(Thread,
"", "",
DAP_FIELD(id, "id"), DAP_FIELD(id, "id"),
DAP_FIELD(name, "name")); DAP_FIELD(name, "name"));
Variable::Variable() = default;
Variable::~Variable() = default;
DAP_IMPLEMENT_STRUCT_TYPEINFO(Variable, DAP_IMPLEMENT_STRUCT_TYPEINFO(Variable,
"", "",
DAP_FIELD(evaluateName, "evaluateName"), DAP_FIELD(evaluateName, "evaluateName"),
......
...@@ -481,6 +481,8 @@ Error::Error(const char* msg, ...) { ...@@ -481,6 +481,8 @@ Error::Error(const char* msg, ...) {
message = buf; message = buf;
} }
Session::~Session() = default;
std::unique_ptr<Session> Session::create() { std::unique_ptr<Session> Session::create() {
return std::unique_ptr<Session>(new Impl()); return std::unique_ptr<Session>(new Impl());
} }
......
// 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.
// 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.
#include "dap/typeinfo.h"
namespace dap {
TypeInfo::~TypeInfo() = default;
} // namespace dap
...@@ -313,16 +313,6 @@ func (s *cppStruct) writeHeader(w io.Writer) { ...@@ -313,16 +313,6 @@ func (s *cppStruct) writeHeader(w io.Writer) {
io.WriteString(w, ";") io.WriteString(w, ";")
} }
// constructor
io.WriteString(w, "\n\n ")
io.WriteString(w, s.name)
io.WriteString(w, "();")
// destructor
io.WriteString(w, "\n ~")
io.WriteString(w, s.name)
io.WriteString(w, "();\n")
for _, f := range s.fields { for _, f := range s.fields {
if f.desc != "" { if f.desc != "" {
io.WriteString(w, "\n // ") io.WriteString(w, "\n // ")
...@@ -353,18 +343,6 @@ func (s *cppStruct) writeHeader(w io.Writer) { ...@@ -353,18 +343,6 @@ func (s *cppStruct) writeHeader(w io.Writer) {
} }
func (s *cppStruct) writeCPP(w io.Writer) { func (s *cppStruct) writeCPP(w io.Writer) {
// constructor
io.WriteString(w, s.name)
io.WriteString(w, "::")
io.WriteString(w, s.name)
io.WriteString(w, "() = default;\n")
// destructor
io.WriteString(w, s.name)
io.WriteString(w, "::~")
io.WriteString(w, s.name)
io.WriteString(w, "() = default;\n")
// typeinfo // typeinfo
io.WriteString(w, "DAP_IMPLEMENT_STRUCT_TYPEINFO(") io.WriteString(w, "DAP_IMPLEMENT_STRUCT_TYPEINFO(")
io.WriteString(w, s.name) io.WriteString(w, s.name)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment