From 20042235d1f53ae428aa154e64afdbae5d8d91ad Mon Sep 17 00:00:00 2001 From: Amlal Date: Fri, 25 Apr 2025 13:14:01 +0200 Subject: meta: update .clang-format, format codebase. Signed-off-by: Amlal --- dev/LibDebugger/DebuggerContract.h | 77 ++++++++++++++++++-------------------- 1 file changed, 36 insertions(+), 41 deletions(-) (limited to 'dev/LibDebugger/DebuggerContract.h') diff --git a/dev/LibDebugger/DebuggerContract.h b/dev/LibDebugger/DebuggerContract.h index 0ef88a2..0f4bc10 100644 --- a/dev/LibDebugger/DebuggerContract.h +++ b/dev/LibDebugger/DebuggerContract.h @@ -1,49 +1,44 @@ /*** - (C) 2025 Amlal El Mahrouss + (C) 2025 Amlal El Mahrouss */ #pragma once #include -#include #include +#include + +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. +/// \author Amlal El Mahrouss +class DebuggerContract { + public: + explicit DebuggerContract() = default; + virtual ~DebuggerContract() = default; + + public: + DebuggerContract& operator=(const DebuggerContract&) = default; + DebuggerContract(const DebuggerContract&) = default; + + 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 std::unordered_map& Get() { return m_breakpoints; } -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. - /// \author Amlal El Mahrouss - class DebuggerContract - { - public: - explicit DebuggerContract() = default; - virtual ~DebuggerContract() = default; - - public: - DebuggerContract& operator=(const DebuggerContract&) = default; - DebuggerContract(const DebuggerContract&) = default; - - 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 std::unordered_map& Get() - { - return m_breakpoints; - } - - protected: - ProcessID m_pid; - std::unordered_map m_breakpoints; - }; -} // namespace LibDebugger + protected: + ProcessID m_pid; + std::unordered_map m_breakpoints; +}; +} // namespace LibDebugger -- cgit v1.2.3