From 2aea8ecc1739c80b6d3d9a596ea65e83553aa06b Mon Sep 17 00:00:00 2001 From: pancake Date: Thu, 17 Jul 2014 21:14:49 +0200 Subject: [PATCH] Add doc/gdb --- doc/gdb | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/doc/gdb b/doc/gdb index f2276daeef..508cb5c761 100644 --- a/doc/gdb +++ b/doc/gdb @@ -9,3 +9,52 @@ Running gdbserver Connecting from r2 ------------------ $Write failed: Host is down5 + +Support implementations +=========== +r2 have support for connecting to remote GDB instances: + + x86-32 x86-64 arm arm64 sh + winedbg x x - - - + qemu x x ? x - + gdbserver x x ? ? ? + + x = supported + ? = untested + - = not supported + +Supported Commands +------------------ +- read/write memory + +Writing or reading memory is implemented through the m/M packet. + +- read registers + +Reading registers is currently implemented through the packet of the gdb protocol. +It returns the whole register profile at once. + +- write registers + +There are two ways of writing registers. The first one is through the P packet. +It works like this: `P=` +The second one is the G packet, that writes the whole register Profile at once. +The implementation first tries to use the newer P packet and if it receives a $00# packet (that says not implemented), it tries to write through the G packet. + +- stepping (but this is still the softstep mode and for an unknown reason it sill does not call th gdb_write_register function) + +Supported Packets: +- g : Reads the whole register Profile at once +- G : Writes the whole register Profile at once +- m : Reads memory +- M : Writes memory +- vCont,v : continues execution of the binary +- P : Write one register + +TODO +---- +- Implement GDBserver to allow other apps use r2 debugger +- Fix that usese the gdb internal stepping version +- Fix softstep, that it finally recoils correct (it just have to reset the eip/rip) +- Add Breakpoints (should be an easy add of the function, because its already implemented in the gdb lib) +