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