From 4017e6408c162b0ab1b54a0427d443b56df5237e Mon Sep 17 00:00:00 2001 From: Amlal El Mahrouss Date: Tue, 4 Mar 2025 06:41:30 +0100 Subject: ADD: C++ compiler improvements. Signed-off-by: Amlal El Mahrouss --- dev/LibDebugger/IDebuggerEngine.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'dev/LibDebugger') diff --git a/dev/LibDebugger/IDebuggerEngine.h b/dev/LibDebugger/IDebuggerEngine.h index aefe117..ad35dfe 100644 --- a/dev/LibDebugger/IDebuggerEngine.h +++ b/dev/LibDebugger/IDebuggerEngine.h @@ -58,7 +58,7 @@ namespace LibDebugger void SetBreakpoint(CAddr addr) { - auto original_data = ptrace(PTRACE_PEEKTEXT, m_pid, addr, 0); + uintptr_t original_data = ptrace(PTRACE_PEEKTEXT, m_pid, addr, 0); if (original_data == -1) { @@ -66,7 +66,7 @@ namespace LibDebugger return; } - auto data_with_int3 = (original_data & ~0xFF) | 0xCC; // Insert INT3 (0xCC) + uintptr_t data_with_int3 = (original_data & ~0xFF) | 0xCC; // Insert INT3 (0xCC) if (ptrace(PTRACE_POKETEXT, m_pid, addr, data_with_int3) == -1) { @@ -107,13 +107,13 @@ namespace LibDebugger std::cout << "[-] Detached from process: " << m_pid << std::endl; } - std::unordered_map& Breakpoints() + std::unordered_map& Breakpoints() { return m_breakpoints; } private: pid_t m_pid; - std::unordered_map m_breakpoints; + std::unordered_map m_breakpoints; }; } // namespace LibDebugger -- cgit v1.2.3