[ros-diffs] [jmorlan] 47102: [NTOSKRNL] In kdbg 'thread list', don't try to read from the kernel stack if there isn't one. (Bug 5318)

jmorlan at svn.reactos.org jmorlan at svn.reactos.org
Wed May 5 01:17:32 CEST 2010


Author: jmorlan
Date: Wed May  5 01:17:30 2010
New Revision: 47102

URL: http://svn.reactos.org/svn/reactos?rev=47102&view=rev
Log:
[NTOSKRNL] In kdbg 'thread list', don't try to read from the kernel stack if there isn't one. (Bug 5318)

Modified:
    trunk/reactos/ntoskrnl/kdbg/kdb_cli.c

Modified: trunk/reactos/ntoskrnl/kdbg/kdb_cli.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kdbg/kdb_cli.c?rev=47102&r1=47101&r2=47102&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kdbg/kdb_cli.c [iso-8859-1] Wed May  5 01:17:30 2010
@@ -1223,7 +1223,13 @@
                 str2 = "";
             }
 
-            if (Thread->Tcb.TrapFrame)
+            if (!Thread->Tcb.InitialStack)
+            {
+                /* Thread has no kernel stack (probably terminated) */
+                Esp = Ebp = NULL;
+                Eip = 0;
+            }
+            else if (Thread->Tcb.TrapFrame)
             {
                 if (Thread->Tcb.TrapFrame->PreviousPreviousMode == KernelMode)
                     Esp = (PULONG)Thread->Tcb.TrapFrame->TempEsp;




More information about the Ros-diffs mailing list