summaryrefslogtreecommitdiffhomepage
path: root/include/DebuggerKit/NeSystem.h
blob: 299815d00179e49e0ccb8ee35dbcd5c280aa354a (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
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