From 69511aed3d66db89bcc4db286649d06f96e622e8 Mon Sep 17 00:00:00 2001 From: Morph <39850852+Morph1984@users.noreply.github.com> Date: Wed, 1 Jun 2022 02:27:48 -0400 Subject: [PATCH] core/debugger: Define defaulted virtual destructors Resolves an MSVC warning where a virtual destructor is not defined in the base class with virtual functions. --- src/core/debugger/debugger.cpp | 2 +- src/core/debugger/debugger_interface.h | 4 ++++ src/core/debugger/gdbstub.h | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/src/core/debugger/debugger.cpp b/src/core/debugger/debugger.cpp index 7a2012d3ca..dd3e330e6a 100644 --- a/src/core/debugger/debugger.cpp +++ b/src/core/debugger/debugger.cpp @@ -50,7 +50,7 @@ public: InitializeServer(port); } - ~DebuggerImpl() { + ~DebuggerImpl() override { ShutdownServer(); } diff --git a/src/core/debugger/debugger_interface.h b/src/core/debugger/debugger_interface.h index 0b357fcb5a..e6d4c01901 100644 --- a/src/core/debugger/debugger_interface.h +++ b/src/core/debugger/debugger_interface.h @@ -24,6 +24,8 @@ enum class DebuggerAction { class DebuggerBackend { public: + virtual ~DebuggerBackend() = default; + /** * Can be invoked from a callback to synchronously wait for more data. * Will return as soon as least one byte is received. Reads up to 4096 bytes. @@ -51,6 +53,8 @@ class DebuggerFrontend { public: explicit DebuggerFrontend(DebuggerBackend& backend_) : backend{backend_} {} + virtual ~DebuggerFrontend() = default; + /** * Called after the client has successfully connected to the port. */ diff --git a/src/core/debugger/gdbstub.h b/src/core/debugger/gdbstub.h index b93a3a511e..e58d60719b 100644 --- a/src/core/debugger/gdbstub.h +++ b/src/core/debugger/gdbstub.h @@ -19,7 +19,7 @@ class System; class GDBStub : public DebuggerFrontend { public: explicit GDBStub(DebuggerBackend& backend, Core::System& system); - ~GDBStub(); + ~GDBStub() override; void Connected() override; void Stopped(Kernel::KThread* thread) override;