r2vmi
r2vmi copied to clipboard
Document radare2 debugger interface
We will have to understand how radare2 debugger internals works to figure out how we should implement some specific features of r2vmi
From https://github.com/radare/radare2/blob/b25653ec2ae48bad9a554753d0c21ce86b0e7e0a/libr/debug/p/debug_native.c#L1523:
/*
* set or unset breakpoints...
*
* we only handle the case for hardware breakpoints here. otherwise,
* we let the caller handle the work.
*/
So if __breakpoint returns false, the caller will handle the software breakpoints ?
I found a documentation regarding debugger internals: https://github.com/radare/radare2/blob/master/doc/debug-internals.md
Yes the caller is handling writing the software breakpoint: https://github.com/radare/radare2/blob/master/libr/bp/bp_io.c#L49