diff options
Diffstat (limited to 'include/DebuggerKit/NeSystem.h')
| -rw-r--r-- | include/DebuggerKit/NeSystem.h | 50 |
1 files changed, 50 insertions, 0 deletions
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 <CompilerKit/Detail/Config.h> +#include <DebuggerKit/IDebugger.h> + +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 |
