rdbo / libmem

Advanced Game Hacking Library for C, Modern C++, Rust and Python (Windows/Linux/FreeBSD) (Process/Memory Hacking) (Hooking/Detouring) (Cross Platform) (x86/x64/ARM/ARM64) (DLL/SO Injection) (Internal/External) (Assembler/Disassembler)
GNU Affero General Public License v3.0
799 stars 95 forks source link

Feature request: add (remove) hardware breakpoints to threads (possible Debug API) #162

Open joylin1984 opened 9 months ago

joylin1984 commented 9 months ago

Function request: add (remove) hardware breakpoints to threads.

This can achieve HWBP HOOK.

rdbo commented 9 months ago

This topic could be expanded further into a Debug API (I tried to do it in the past, but it didn't go very well - I could try again though). E.g:

LM_DbgAttach
LM_DbgDetach
LM_DbgReadRegs
LM_DbgWriteRegs
LM_DbgBreakpoint
LM_DbgHwBreakpoint
// ...
rdbo commented 9 months ago

I've done a PoC for Linux here: https://github.com/rdbo/ptrace-breakpoint-parent-test So yeah, this is definitely possible

rdbo commented 9 months ago

I don't know how this would go on Windows though, but it shouldn't be much different