}
VOID
-KdbFreeSymbolsProcess(PPEB Peb)
+KdbFreeSymbolsProcess(PEPROCESS Process)
{
PLIST_ENTRY CurrentEntry;
PLDR_MODULE Current;
PIMAGE_SYMBOL_INFO SymbolInfo;
-
+ PEPROCESS CurrentProcess;
+ PPEB Peb;
+
+ CurrentProcess = PsGetCurrentProcess();
+ if (CurrentProcess != Process)
+ {
+ KeAttachProcess(Process);
+ }
+ Peb = Process->Peb;
assert (Peb);
assert (Peb->Ldr);
CurrentEntry = CurrentEntry->Flink;
}
+ if (CurrentProcess != Process)
+ {
+ KeDetachProcess();
+ }
}
VOID
Length = strlen(Symbol->Name.Buffer);
strncpy(FunctionName, Symbol->Name.Buffer, Length);
+ FunctionName[Length]=0;
return STATUS_SUCCESS;
}
Symbol = NextSymbol;
RtlCreateUnicodeString(&CacheEntry->FullName, LdrModule->FullDllName.Buffer);
assert(CacheEntry->FullName.Buffer);
LdrpLoadModuleSymbols(&LdrModule->FullDllName, &LdrModule->SymbolInfo);
+ CacheEntry->FileBuffer = LdrModule->SymbolInfo.FileBuffer;
+ CacheEntry->SymbolsBase = LdrModule->SymbolInfo.SymbolsBase;
+ CacheEntry->SymbolsLength = LdrModule->SymbolInfo.SymbolsLength;
+ CacheEntry->SymbolStringsBase = LdrModule->SymbolInfo.SymbolStringsBase;
+ CacheEntry->SymbolStringsLength = LdrModule->SymbolInfo.SymbolStringsLength;
InsertTailList(&SymbolListHead, &CacheEntry->ListEntry);
}
}