blob: 7b8df649ae1ba2e115b8302ab9e1dd737a8fb27a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
// 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/nekernel-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/DebuggerContract.h>
namespace DebuggerKit::NeKernel {
class NeKernelContract;
/// =========================================================== ///
/// \brief NeKernel Debugger Contract
/// \author Amlal El Mahrouss
/// =========================================================== ///
class NeKernelContract final DK_DEBUGGER_CONTRACT {
public:
NeKernelContract();
virtual ~NeKernelContract() override;
public:
NeKernelContract& operator=(const NeKernelContract&) = default;
NeKernelContract(const NeKernelContract&) = 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
|