diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-09 03:07:48 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2025-12-09 03:07:48 +0100 |
| commit | 0c54fbd1a74242c568749b7293f2f319c4842d44 (patch) | |
| tree | 86cdac041fc0a0f4e17d839d48e5ff7cea3cc5a7 /include/DebuggerKit | |
| parent | cfa04915a4c7d77996b49279b5891d1402f439a5 (diff) | |
chore: codebase chore and API breaking changes.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'include/DebuggerKit')
| -rw-r--r-- | include/DebuggerKit/DebuggerContract.h | 8 | ||||
| -rw-r--r-- | include/DebuggerKit/POSIXMachContract.h | 14 |
2 files changed, 12 insertions, 10 deletions
diff --git a/include/DebuggerKit/DebuggerContract.h b/include/DebuggerKit/DebuggerContract.h index e205e26..d172f78 100644 --- a/include/DebuggerKit/DebuggerContract.h +++ b/include/DebuggerKit/DebuggerContract.h @@ -34,10 +34,12 @@ class IDebuggerContract { virtual bool Continue() noexcept = 0; virtual bool Detach() noexcept = 0; - virtual std::unordered_map<uintptr_t, uintptr_t>& Get() { return m_breakpoints; } + using BreakpointMap = std::unordered_map<uintptr_t, uintptr_t>; + + virtual BreakpointMap& Get() { return mBreakpoints; } protected: - ProcessID m_pid{(ProcessID) ~0}; - std::unordered_map<uintptr_t, uintptr_t> m_breakpoints; + ProcessID mPid{(ProcessID) ~0}; + BreakpointMap mBreakpoints; }; } // namespace DebuggerKit diff --git a/include/DebuggerKit/POSIXMachContract.h b/include/DebuggerKit/POSIXMachContract.h index abf23b5..f2ae8a2 100644 --- a/include/DebuggerKit/POSIXMachContract.h +++ b/include/DebuggerKit/POSIXMachContract.h @@ -67,9 +67,9 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { } m_path = path; - m_pid = pid; + mPid = pid; - pid = this->m_pid; + pid = this->mPid; return true; } @@ -99,7 +99,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { #ifdef __APPLE__ task_read_t task; - task_for_pid(mach_task_self(), m_pid, &task); + task_for_pid(mach_task_self(), mPid, &task); uint32_t brk_inst = 0xD43E0000; @@ -118,7 +118,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { #ifdef __APPLE__ bool Break() noexcept override { task_read_t task; - task_for_pid(mach_task_self(), m_pid, &task); + task_for_pid(mach_task_self(), mPid, &task); kern_return_t ret = task_suspend(task); @@ -127,7 +127,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { bool Continue() noexcept override { task_read_t task; - task_for_pid(mach_task_self(), m_pid, &task); + task_for_pid(mach_task_self(), mPid, &task); kern_return_t ret = task_resume(task); @@ -138,7 +138,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { this->Continue(); task_read_t task; - task_for_pid(mach_task_self(), m_pid, &task); + task_for_pid(mach_task_self(), mPid, &task); kern_return_t kr = mach_port_deallocate(mach_task_self(), task); @@ -147,7 +147,7 @@ class POSIXMachContract final DK_DEBUGGER_CONTRACT { #endif private: - ProcessID m_pid{0}; + ProcessID mPid{0}; CompilerKit::STLString m_path; }; } // namespace DebuggerKit::POSIX |
