- Don't use ULONG for storing pointers.

svn path=/trunk/; revision=10762
This commit is contained in:
Filip Navara 2004-08-31 23:53:40 +00:00
parent 92b839476c
commit 03d477407b

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/ */
/* $Id: kdb.c,v 1.30 2004/08/27 00:14:01 blight Exp $ /* $Id: kdb.c,v 1.31 2004/08/31 23:53:40 navaraf Exp $
* *
* PROJECT: ReactOS kernel * PROJECT: ReactOS kernel
* FILE: ntoskrnl/dbg/kdb.c * FILE: ntoskrnl/dbg/kdb.c
@ -829,8 +829,8 @@ DbgPrintBackTrace(PULONG Frame, ULONG StackBase, ULONG StackLimit)
ULONG i = 1; ULONG i = 1;
DbgPrint("Frames: "); DbgPrint("Frames: ");
while (Frame != NULL && (ULONG)Frame >= StackLimit && while (Frame != NULL && (ULONG_PTR)Frame >= StackLimit &&
(ULONG)Frame < StackBase) (ULONG_PTR)Frame < StackBase)
{ {
KdbSymPrintAddress((PVOID)Frame[1]); KdbSymPrintAddress((PVOID)Frame[1]);
DbgPrint("\n"); DbgPrint("\n");
@ -1096,7 +1096,7 @@ DbgScriptCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME tf)
ULONG ULONG
DbgBackTraceCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf) DbgBackTraceCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf)
{ {
ULONG StackBase, StackLimit; ULONG_PTR StackBase, StackLimit;
extern unsigned int init_stack, init_stack_top; extern unsigned int init_stack, init_stack_top;
/* Without an argument we print the current stack. */ /* Without an argument we print the current stack. */
@ -1104,13 +1104,13 @@ DbgBackTraceCommand(ULONG Argc, PCH Argv[], PKTRAP_FRAME Tf)
{ {
if (PsGetCurrentThread() != NULL) if (PsGetCurrentThread() != NULL)
{ {
StackBase = (ULONG)PsGetCurrentThread()->Tcb.StackBase; StackBase = (ULONG_PTR)PsGetCurrentThread()->Tcb.StackBase;
StackLimit = PsGetCurrentThread()->Tcb.StackLimit; StackLimit = PsGetCurrentThread()->Tcb.StackLimit;
} }
else else
{ {
StackBase = (ULONG)&init_stack_top; StackBase = (ULONG_PTR)&init_stack_top;
StackLimit = (ULONG)&init_stack; StackLimit = (ULONG_PTR)&init_stack;
} }
DbgPrintBackTrace((PULONG)&Tf->DebugEbp, StackBase, StackLimit); DbgPrintBackTrace((PULONG)&Tf->DebugEbp, StackBase, StackLimit);
} }