Sorry, I had forgotten this:
Le 23/08/2016 à 00:24, jgardou@svn.reactos.org a écrit :
Author: jgardou Date: Mon Aug 22 22:24:30 2016 New Revision: 72435
URL: http://svn.reactos.org/svn/reactos?rev=72435&view=rev Log: [KDGDB]
- Implement setting and removing breakpoints
- Implement single-stepping
- Only get past the breakpoint instruction when it comes from RtlpBreakWithStatus
- Implement writing to memory
- Always send the thread raising the exception to GDB to avoid confusing it
- Let GDB find the program counter alone by querying the registers (support was already there before.)
- Properly escape special characters on input
Ladies and gentlemen : the almost-fully functional GDB stub. (still no real multi-process support :-( ) To enable , in CMakeCache.txt :
- Set GDB:BOOL=TRUE
- Set _WINKD_:BOOL=TRUE
- Set KDBG:BOOL=FALSE
To do : give GDB the list of loaded drivers. Loading ntoskrnl.exe symbols at 0x80801000 already does a good enough job. Default output is on COM1. Can be configure to any othe COM port with usual kernel options. Hope you'll like it as much as I do ;-)
Modified: trunk/reactos/drivers/base/kdgdb/gdb_input.c trunk/reactos/drivers/base/kdgdb/gdb_receive.c trunk/reactos/drivers/base/kdgdb/gdb_send.c trunk/reactos/drivers/base/kdgdb/i386_sup.c trunk/reactos/drivers/base/kdgdb/kdcom.c trunk/reactos/drivers/base/kdgdb/kdgdb.h trunk/reactos/drivers/base/kdgdb/kdpacket.c
Modified: trunk/reactos/drivers/base/kdgdb/gdb_input.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdgdb/gdb_inpu... ============================================================================== --- trunk/reactos/drivers/base/kdgdb/gdb_input.c [iso-8859-1] (original) +++ trunk/reactos/drivers/base/kdgdb/gdb_input.c [iso-8859-1] Mon Aug 22 22:24:30 2016 @@ -9,6 +9,11 @@
/* LOCALS *********************************************************************/ static ULONG_PTR gdb_run_tid; +static struct +{
- ULONG_PTR Address;
- ULONG Handle;
+} BreakPointHandles[32];
/* GLOBALS ********************************************************************/ @@ -203,16 +208,15 @@
if (!Resuming) {
/* Report the idle thread */+#if MONOPROCESS
ptr += sprintf(ptr, "1");+#else
ptr += sprintf(gdb, "p1.1");+#endif
That looks highly suspicious? Shouldn't it be ptr += sprintf(ptr, "p1.1");