Author: sserapion
Date: Sun Jan 17 08:20:26 2010
New Revision: 45114
URL:
http://svn.reactos.org/svn/reactos?rev=45114&view=rev
Log:
[KDBG]
- Fix issue were prompt was unresponsive after first command.
- Enable x86_64 disassembly and default to intel syntax
- Print addresses with %p so that their full 64bit glory is shown.
- Fix a warning.
Modified:
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/i386-dis.c
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/kdb_help.S
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb.c
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c
branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_symbols.c
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/i386-dis.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/i386-dis.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/i386-dis.c [iso-8859-1] Sun Jan
17 08:20:26 2010
@@ -26,7 +26,7 @@
typedef unsigned char bfd_byte;
enum bfd_endian { BFD_ENDIAN_BIG, BIG_ENDIAN_LITTLE, BFD_ENDIAN_UNKNOWN };
typedef void* bfd;
-typedef signed int bfd_signed_vma;
+typedef LONG_PTR bfd_signed_vma;
#define bfd_mach_x86_64_intel_syntax 0
#define bfd_mach_x86_64 1
#define bfd_mach_i386_i386_intel_syntax 2
@@ -36,7 +36,7 @@
#define _(X) X
#define ATTRIBUTE_UNUSED
extern int sprintf(char *str, const char *format, ...);
-#define sprintf_vma(BUF, VMA) sprintf(BUF, "0x%X", VMA)
+#define sprintf_vma(BUF, VMA) sprintf(BUF, "%p", VMA)
#define _setjmp setjmp
#define _INC_SETJMPEX
struct disassemble_info;
@@ -82,7 +82,7 @@
{
if (!KdbSymPrintAddress((void*)Addr))
{
- DbgPrint("<%08x>", Addr);
+ DbgPrint("<%p>", Addr);
}
}
@@ -2102,9 +2102,9 @@
p++;
}
#else
- mode_64bit = 0;
+ mode_64bit = 1;
priv.orig_sizeflag = AFLAG | DFLAG;
- /*intel_syntax = 0;*/
+ intel_syntax = 1;
#endif
if (intel_syntax)
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/kdb_help.S
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/kdb_help.S [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/amd64/kdb_help.S [iso-8859-1] Sun Jan
17 08:20:26 2010
@@ -30,12 +30,12 @@
mov [rsp + KTRAP_FRAME_R11], r11
/* Save xmm registers */
-// movdqa [rsp + KTRAP_FRAME_Xmm0], xmm0
-// movdqa [rsp + KTRAP_FRAME_Xmm1], xmm1
-// movdqa [rsp + KTRAP_FRAME_Xmm2], xmm2
-// movdqa [rsp + KTRAP_FRAME_Xmm3], xmm3
-// movdqa [rsp + KTRAP_FRAME_Xmm4], xmm4
-// movdqa [rsp + KTRAP_FRAME_Xmm5], xmm5
+ movdqa [rsp + KTRAP_FRAME_Xmm0], xmm0
+ movdqa [rsp + KTRAP_FRAME_Xmm1], xmm1
+ movdqa [rsp + KTRAP_FRAME_Xmm2], xmm2
+ movdqa [rsp + KTRAP_FRAME_Xmm3], xmm3
+ movdqa [rsp + KTRAP_FRAME_Xmm4], xmm4
+ movdqa [rsp + KTRAP_FRAME_Xmm5], xmm5
/* Save cs and previous mode */
mov ax, cs
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb.c [iso-8859-1] Sun Jan 17
08:20:26 2010
@@ -461,7 +461,7 @@
}
/* Get the interrupt descriptor */
- if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)(ULONG_PTR)(Idtr.Base + (IntVect *
8)), sizeof (IntDesc))))
+ if (!NT_SUCCESS(KdbpSafeReadMemory(IntDesc, (PVOID)((ULONG_PTR)Idtr.Base + (IntVect *
8)), sizeof (IntDesc))))
{
/*KdbpPrint("Couldn't access memory at 0x%p\n",
(ULONG_PTR)Idtr.Base + (IntVect * 8));*/
return FALSE;
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] (original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] Sun Jan 17
08:20:26 2010
@@ -548,7 +548,7 @@
while (Count > 0)
{
if (!KdbSymPrintAddress((PVOID)Address))
- KdbpPrint("<%x>:", Address);
+ KdbpPrint("<%p>:", Address);
else
KdbpPrint(":");
@@ -574,7 +574,7 @@
while (Count-- > 0)
{
if (!KdbSymPrintAddress((PVOID)Address))
- KdbpPrint("<%x>: ", Address);
+ KdbpPrint("<%p>: ", Address);
else
KdbpPrint(": ");
@@ -2722,7 +2722,7 @@
NextKey = '\0';
}
- if ((ULONG)(Buffer - Orig) >= (Size - 1))
+ if ((ULONG_PTR)(Buffer - Orig) >= (Size - 1))
{
/* Buffer is full, accept only newlines */
if (Key != '\n')
@@ -3258,4 +3258,4 @@
/* Return the length */
return OutStringLength;
-}
+}
Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_symbols.c
URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
==============================================================================
--- branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1]
(original)
+++ branches/ros-amd64-bringup/reactos/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] Sun Jan 17
08:20:26 2010
@@ -142,12 +142,12 @@
FunctionName);
if (NT_SUCCESS(Status))
{
- DbgPrint("<%wZ:%x (%s:%d (%s))>",
+ DbgPrint("<%wZ:%p (%s:%d (%s))>",
&LdrEntry->BaseDllName, RelativeAddress, FileName, LineNumber,
FunctionName);
}
else
{
- DbgPrint("<%wZ:%x>", &LdrEntry->BaseDllName,
RelativeAddress);
+ DbgPrint("<%wZ:%p>", &LdrEntry->BaseDllName,
RelativeAddress);
}
return TRUE;