[NTOSKRNL]
authorTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 May 2014 10:18:22 +0000 (10:18 +0000)
committerTimo Kreuzer <timo.kreuzer@reactos.org>
Thu, 22 May 2014 10:18:22 +0000 (10:18 +0000)
Pass process id to DbgUnLoadImageSymbols instead of ZwCurrentProcess() or a PEPROCESS.
Patch by Jérôme Gardou <jerome.gardou at reactos dot org>
CORE-8253 #resolve

svn path=/trunk/; revision=63406

reactos/ntoskrnl/ex/init.c
reactos/ntoskrnl/kd64/kdinit.c
reactos/ntoskrnl/mm/ARM3/section.c
reactos/ntoskrnl/mm/ARM3/sysldr.c

index 1d5b644..04f8e78 100644 (file)
@@ -846,7 +846,7 @@ ExpLoadBootSymbols(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
                 /* Load the symbols */
                 DbgLoadImageSymbols(&SymbolString,
                                     LdrEntry->DllBase,
-                                    (ULONG_PTR)ZwCurrentProcess());
+                                    (ULONG_PTR)PsGetCurrentProcessId());
             }
         }
 
index 723a18c..18ea337 100644 (file)
@@ -356,7 +356,7 @@ KdInitSystem(IN ULONG BootPhase,
                 RtlInitString(&ImageName, NameBuffer);
                 DbgLoadImageSymbols(&ImageName,
                                     LdrEntry->DllBase,
-                                    (ULONG_PTR)ZwCurrentProcess());
+                                    (ULONG_PTR)PsGetCurrentProcessId());
 
                 /* Go to the next entry */
                 NextEntry = NextEntry->Flink;
index 43274f9..f8ae660 100644 (file)
@@ -1185,7 +1185,7 @@ MiLoadUserSymbols(IN PCONTROL_AREA ControlArea,
     Status = RtlUnicodeStringToAnsiString(&FileNameA, FileName, TRUE);
     if (NT_SUCCESS(Status))
     {
-        DbgLoadImageSymbols(&FileNameA, BaseAddress, (ULONG_PTR)Process);
+        DbgLoadImageSymbols(&FileNameA, BaseAddress, (ULONG_PTR)Process->UniqueProcessId);
         RtlFreeAnsiString(&FileNameA);
     }
 }
index 3175b03..de12395 100644 (file)
@@ -928,7 +928,7 @@ MmUnloadSystemImage(IN PVOID ImageHandle)
             /* Unload the symbols */
             DbgUnLoadImageSymbols(&TempName,
                                   BaseAddress,
-                                  (ULONG_PTR)ZwCurrentProcess());
+                                  (ULONG_PTR)PsGetCurrentProcessId());
             RtlFreeAnsiString(&TempName);
         }
     }
@@ -3309,7 +3309,7 @@ LoaderScan:
         /* Notify the debugger */
         DbgLoadImageSymbols(&AnsiTemp,
                             LdrEntry->DllBase,
-                            (ULONG_PTR)ZwCurrentProcess());
+                            (ULONG_PTR)PsGetCurrentProcessId());
         LdrEntry->Flags |= LDRP_DEBUG_SYMBOLS_LOADED;
     }