diff options
| author | Amlal <amlal@nekernel.org> | 2025-04-25 09:41:29 +0200 |
|---|---|---|
| committer | Amlal <amlal@nekernel.org> | 2025-04-25 09:41:29 +0200 |
| commit | 0561a8d0a6ae7588309a6e3513bbfeeef5f0aa15 (patch) | |
| tree | f7fdd41a02cd9c5ae5288e4c6c74ab386f200900 /dev/LibDebugger/DebuggerContract.h | |
| parent | 81023b13dd170b0eceb1868355a600ad15abe4ea (diff) | |
dev, LibDebugger: add kdbg, working on NeKernelContract's implementation.
Signed-off-by: Amlal <amlal@nekernel.org>
Diffstat (limited to 'dev/LibDebugger/DebuggerContract.h')
| -rw-r--r-- | dev/LibDebugger/DebuggerContract.h | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/dev/LibDebugger/DebuggerContract.h b/dev/LibDebugger/DebuggerContract.h index d5f62c2..0ef88a2 100644 --- a/dev/LibDebugger/DebuggerContract.h +++ b/dev/LibDebugger/DebuggerContract.h @@ -4,12 +4,18 @@ #pragma once -#include <iostream> +#include <cstdint> #include <unordered_map> +#include <string> namespace LibDebugger { + class DebuggerContract; + + /// \brief Process ID typedef uint64_t ProcessID; + + /// \brief Address type, a la BSD. typedef char* CAddress; /// \brief Debugger contract class in C++, as per the design states. @@ -26,10 +32,10 @@ namespace LibDebugger public: virtual bool Attach(std::string path, std::string argv, ProcessID& pid) noexcept = 0; - virtual bool Breakpoint(std::string symbol) noexcept = 0; - virtual bool Break() noexcept = 0; - virtual bool Continue() noexcept = 0; - virtual bool Detach() noexcept = 0; + virtual bool Breakpoint(std::string symbol) noexcept = 0; + virtual bool Break() noexcept = 0; + virtual bool Continue() noexcept = 0; + virtual bool Detach() noexcept = 0; virtual std::unordered_map<uintptr_t, uintptr_t>& Get() { @@ -37,7 +43,7 @@ namespace LibDebugger } protected: - pid_t m_pid; + ProcessID m_pid; std::unordered_map<uintptr_t, uintptr_t> m_breakpoints; }; } // namespace LibDebugger |
