diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-25 08:31:45 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-03-25 08:31:45 +0100 |
| commit | 9b7dbb3e5c131d84730b88c4fc493665c74613fd (patch) | |
| tree | 7d81b675fe2cb03d2e263eaa4002562188dc058f /include/DebuggerKit/DebuggerContract.h | |
| parent | 3e6fcda61e87f61fba547bed1eb239981966cb68 (diff) | |
[FEAT] Refactor DebuggerKit design (BREAKING API CHANGES)breaking-changes-debuggerkit
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/DebuggerKit/DebuggerContract.h')
| -rw-r--r-- | include/DebuggerKit/DebuggerContract.h | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/include/DebuggerKit/DebuggerContract.h b/include/DebuggerKit/DebuggerContract.h deleted file mode 100644 index adaeb6e..0000000 --- a/include/DebuggerKit/DebuggerContract.h +++ /dev/null @@ -1,48 +0,0 @@ -// 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 NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H -#define NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H - -#include <DebuggerKit/Detail/Config.h> -#include <unordered_map> - -#define DK_DEBUGGER_CONTRACT : public ::DebuggerKit::IDebuggerContract - -namespace DebuggerKit { -class IDebuggerContract; - -/// =========================================================== /// -/// \brief Debugger contract class in C++, as per the design states. -/// \author Amlal El Mahrouss -/// =========================================================== /// -class IDebuggerContract { - public: - explicit IDebuggerContract() = default; - virtual ~IDebuggerContract() = default; - - public: - IDebuggerContract& operator=(const IDebuggerContract&) = default; - IDebuggerContract(const IDebuggerContract&) = default; - - public: - virtual bool Attach(std::string path, std::string argv, ProcessID& pid) noexcept = 0; - virtual bool BreakAt(std::string symbol) noexcept = 0; - virtual bool Break() noexcept = 0; - virtual bool Continue() noexcept = 0; - virtual bool Detach() noexcept = 0; - - using BreakpointMap = std::unordered_map<uintptr_t, uintptr_t>; - - virtual BreakpointMap& Leak() { return mBreakpoints; } - - protected: - ProcessID mPid{(ProcessID) ~0}; - BreakpointMap mBreakpoints; -}; -} // namespace DebuggerKit - -#endif // NECTAR_DEBUGGERKIT_DEBUGGERCONTRACT_H |
