Commit in reactos/ntoskrnl/dbg on MAIN
kdb.c+9-81.19 -> 1.20
kdb.h+2-21.7 -> 1.8
kdb_keyboard.c+2-11.4 -> 1.5
i386/kdb_help.S+2-21.2 -> 1.3
+15-13
4 modified files

- Fixed bug with recalling previous input.
- Switch back to text mode when entering the debugger.

reactos/ntoskrnl/dbg
kdb.c 1.19 -> 1.20
diff -u -r1.19 -r1.20
--- kdb.c	13 Mar 2004 18:21:56 -0000	1.19
+++ kdb.c	14 Mar 2004 18:28:58 -0000	1.20
@@ -16,7 +16,7 @@
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
-/* $Id: kdb.c,v 1.19 2004/03/13 18:21:56 dwelch Exp $
+/* $Id: kdb.c,v 1.20 2004/03/14 18:28:58 dwelch Exp $
  *
  * PROJECT:         ReactOS kernel
  * FILE:            ntoskrnl/dbg/kdb.c
@@ -48,7 +48,6 @@
 
 #define BS 8
 #define DEL 127
-#define UPARROW 56
 
 BOOL KbdEchoOn = TRUE;
 
@@ -262,6 +261,7 @@
   CHAR Key;
   PCH Orig = Buffer;
   static UCHAR LastCommand[256] = "";
+  ULONG ScanCode = 0;
   
   KbdEchoOn = !((KdDebugState & KD_DEBUG_KDNOECHO) != 0);
   
@@ -270,7 +270,7 @@
       if (KdDebugState & KD_DEBUG_KDSERIAL)
 	while ((Key = KdbTryGetCharSerial()) == -1);
       else
-	while ((Key = KdbTryGetCharKeyboard()) == -1);
+	while ((Key = KdbTryGetCharKeyboard(&ScanCode)) == -1);
 
       if (Key == '\r' || Key == '\n')
 	{
@@ -302,7 +302,7 @@
 		DbgPrint(" %c", BS);
 	    }
         }
-      else if (Key == UPARROW)
+      else if (ScanCode == 72)
 	{
 	  ULONG i;
 	  while (Buffer > Orig)
@@ -673,8 +673,8 @@
     {
       Eip++;
     }
-  if (Eip[0] == 0xE8 || Eip[0] == 0x9A ||
-      (Eip[0] == 0xFF && (Eip[0] & 0x3C) == 0x10))
+  if (Eip[0] == 0xE8 || Eip[0] == 0x9A || Eip[0] == 0xF2 || Eip[0] == 0xF3 ||
+      (Eip[0] == 0xFF && (Eip[1] & 0x3C) == 0x10))
     {
       ULONG NextInst = Tf->Eip + KdbGetInstLength(Tf->Eip);
       KdbLastSingleStepFrom = Tf->Eip;
@@ -1124,7 +1124,7 @@
 	  StackBase = (ULONG)&init_stack_top;
 	  StackLimit = (ULONG)&init_stack;
 	}
-      DbgPrintBackTrace((PULONG)Tf->Ebp, StackBase, StackLimit);
+      DbgPrintBackTrace((PULONG)&Tf->DebugEbp, StackBase, StackLimit);
     }
   /* 
    * If there are two arguments and the second begins with a asterik treat it
@@ -1535,9 +1535,10 @@
 
 VOID
 KdbInternalEnter(PKTRAP_FRAME Tf)
-{
+{  
   __asm__ __volatile__ ("cli\n\t");
   KbdDisableMouse();
+  HalReleaseDisplayOwnership();
   (VOID)KdbMainLoop(Tf);
   KbdEnableMouse();
   __asm__ __volatile__("sti\n\t");

reactos/ntoskrnl/dbg
kdb.h 1.7 -> 1.8
diff -u -r1.7 -r1.8
--- kdb.h	10 Jan 2004 21:06:38 -0000	1.7
+++ kdb.h	14 Mar 2004 18:28:58 -0000	1.8
@@ -8,8 +8,8 @@
   OUT PCH FileName  OPTIONAL,
   OUT PCH FunctionName  OPTIONAL);
 
-ULONG
-KdbTryGetCharKeyboard(VOID);
+CHAR
+KdbTryGetCharKeyboard(PULONG ScanCode);
 ULONG
 KdbTryGetCharSerial(VOID);
 VOID

reactos/ntoskrnl/dbg
kdb_keyboard.c 1.4 -> 1.5
diff -u -r1.4 -r1.5
--- kdb_keyboard.c	17 Jan 2004 17:13:13 -0000	1.4
+++ kdb_keyboard.c	14 Mar 2004 18:28:58 -0000	1.5
@@ -81,7 +81,7 @@
 }
 
 CHAR
-KdbTryGetCharKeyboard()
+KdbTryGetCharKeyboard(PULONG ScanCode)
 {
     static byte_t last_key = 0;
     static byte_t shift = 0;
@@ -105,6 +105,7 @@
 		//printf("kbd: %d, %d, %c\n", scancode, last_key, keyb_layout[shift][scancode]);
 		last_key = scancode;
 		c = keyb_layout[shift][scancode];
+		*ScanCode = scancode;
 		if (c > 0) return c;
 	    }
 	}

reactos/ntoskrnl/dbg/i386
kdb_help.S 1.2 -> 1.3
diff -u -r1.2 -r1.3
--- kdb_help.S	13 Mar 2004 18:21:56 -0000	1.2
+++ kdb_help.S	14 Mar 2004 18:28:59 -0000	1.3
@@ -57,8 +57,8 @@
 	pushl	$0		/* TempCs */
 	pushl	$0		/* DebugPointer */
 	pushl	$0		/* DebugArgMark */
-	pushl	$0		/* DebugEip */
-	pushl	$0		/* DebugEbp */
+	pushl	_KdbEipTemp	/* DebugEip */
+	pushl	%ebp		/* DebugEbp */
 
 	/*
 	 * Push a pointer to the trap frame
CVSspam 0.2.8