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
```
This commit is contained in:
Ben Clayton 2020-06-10 12:31:43 +01:00
parent bb3dbcd2c3
commit 9d3f5c8f1d
15 changed files with 76 additions and 755 deletions

View File

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

View File

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

File diff suppressed because it is too large Load Diff

View File

@ -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 {
T v; T v;
if (deserialize(&v)) { if (deserialize(&v)) {
*opt = v; *opt = v;
}; }
return true; return true;
} }
@ -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 {
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.

View File

@ -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 {
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.

View File

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

View File

@ -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> {
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>> {
} }
}; };
#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,

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

21
src/typeinfo.cpp Normal file
View File

@ -0,0 +1,21 @@
// 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

View File

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