r2vmi icon indicating copy to clipboard operation
r2vmi copied to clipboard

Document radare2 debugger interface

Open Wenzel opened this issue 7 years ago • 3 comments

We will have to understand how radare2 debugger internals works to figure out how we should implement some specific features of r2vmi

Wenzel avatar Sep 11 '18 23:09 Wenzel

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 ?

Wenzel avatar Sep 11 '18 23:09 Wenzel

I found a documentation regarding debugger internals: https://github.com/radare/radare2/blob/master/doc/debug-internals.md

Wenzel avatar Sep 13 '18 10:09 Wenzel

Yes the caller is handling writing the software breakpoint: https://github.com/radare/radare2/blob/master/libr/bp/bp_io.c#L49

Wenzel avatar Sep 13 '18 11:09 Wenzel