From 9b7dbb3e5c131d84730b88c4fc493665c74613fd Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Wed, 25 Mar 2026 08:31:45 +0100 Subject: [FEAT] Refactor DebuggerKit design (BREAKING API CHANGES) Signed-off-by: Amlal El Mahrouss --- include/DebuggerKit/NeSystem.h | 50 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 include/DebuggerKit/NeSystem.h (limited to 'include/DebuggerKit/NeSystem.h') diff --git a/include/DebuggerKit/NeSystem.h b/include/DebuggerKit/NeSystem.h new file mode 100644 index 0000000..299815d --- /dev/null +++ b/include/DebuggerKit/NeSystem.h @@ -0,0 +1,50 @@ +// SPDX-License-Identifier: Apache-2.0 +// Copyright 2024-2026, Amlal El Mahrouss (amlal@nekernel.org) +// Licensed under the Apache License, Version 2.0 (See accompanying +// file LICENSE or copy at http://www.apache.org/licenses/LICENSE-2.0) +// Official repository: https://github.com/ne-foss-org/nectar + +#ifndef DK_NEKERNEL_CONTRACT_H +#define DK_NEKERNEL_CONTRACT_H + +/// @brief NeKernel Debugging Protocol +/// @author Amlal El Mahrouss + +#ifdef DK_NEKERNEL_DEBUGGER + +#include +#include + +namespace DebuggerKit::NeKernel { +class NeSystemDebugger; + +/// =========================================================== /// +/// \brief NeKernel Debugger Contract +/// \author Amlal El Mahrouss +/// =========================================================== /// +class NeSystemDebugger final DK_DEBUGGER_CONTRACT { + public: + NeSystemDebugger(); + virtual ~NeSystemDebugger() override; + + public: + NeSystemDebugger& operator=(const NeSystemDebugger&) = default; + NeSystemDebugger(const NeSystemDebugger&) = default; + + public: + bool Attach(CompilerKit::STLString path, CompilerKit::STLString arg_v, + ProcessID& pid) noexcept override; + bool BreakAt(CompilerKit::STLString symbol) noexcept override; + bool Break() noexcept override; + bool Continue() noexcept override; + bool Detach() noexcept override; + + private: + CompilerKit::STLString m_kernel_path{}; + Detail::dk_socket_type m_socket{0}; +}; +} // namespace DebuggerKit::NeKernel + +#endif // ifdef DK_NEKERNEL_DEBUGGER + +#endif // DK_NEKERNEL_CONTRACT_H -- cgit v1.2.3