- Loaded symbols also for kernel mode dll's.
Modified: trunk/reactos/ntoskrnl/dbg/kdb_symbols.c

Modified: trunk/reactos/ntoskrnl/dbg/kdb_symbols.c
--- trunk/reactos/ntoskrnl/dbg/kdb_symbols.c	2005-01-01 11:47:33 UTC (rev 12694)
+++ trunk/reactos/ntoskrnl/dbg/kdb_symbols.c	2005-01-01 11:49:57 UTC (rev 12695)
@@ -914,6 +914,8 @@
   PIMAGE_SYMBOL_INFO SymbolInfo;
   ANSI_STRING AnsiString;
   PCHAR Extension;
+  ULONG i;
+  const char *KnownExtension[] = {".exe", ".sys", ".dll"};
 
   DPRINT("Module %s is a symbol file\n", FileName);
 
@@ -928,22 +930,21 @@
 
   DPRINT("base: %s (Length %d)\n", TmpBaseName, Length);
 
-  strcpy(TmpFileName, TmpBaseName);
-  strcat(TmpFileName, ".sys");
-  RtlInitAnsiString(&AnsiString, TmpFileName);
-
-  RtlAnsiStringToUnicodeString(&ModuleName, &AnsiString, TRUE);
-  ModuleObject = LdrGetModuleObject(&ModuleName);
-  RtlFreeUnicodeString(&ModuleName);
-  if (ModuleObject == NULL)
+  for (i = 0; i < sizeof(KnownExtension) / sizeof(*KnownExtension); i++)
     {
       strcpy(TmpFileName, TmpBaseName);
-      strcat(TmpFileName, ".exe");
+      strcat(TmpFileName, KnownExtension[i]);
       RtlInitAnsiString(&AnsiString, TmpFileName);
+
       RtlAnsiStringToUnicodeString(&ModuleName, &AnsiString, TRUE);
       ModuleObject = LdrGetModuleObject(&ModuleName);
       RtlFreeUnicodeString(&ModuleName);
+      if (ModuleObject)
+        {
+	  break;
+	}
     }
+  
   if (ModuleObject != NULL)
     {
       SymbolInfo = (PIMAGE_SYMBOL_INFO) &ModuleObject->TextSection->SymbolInfo;