Commit in reactos/ntoskrnl/dbg on MAIN
kdb_stabs.c+10-31.13 -> 1.14
- Fixed the loading of symbol files, if the base name contains the extension '.sym'.

reactos/ntoskrnl/dbg
kdb_stabs.c 1.13 -> 1.14
diff -u -r1.13 -r1.14
--- kdb_stabs.c	17 Jan 2004 03:19:35 -0000	1.13
+++ kdb_stabs.c	15 Mar 2004 21:16:45 -0000	1.14
@@ -641,7 +641,7 @@
                       &ObjectAttributes,
                       &IoStatusBlock,
                       0,
-                      FILE_SYNCHRONOUS_IO_NONALERT);
+                      FILE_SYNCHRONOUS_IO_NONALERT|FILE_NO_INTERMEDIATE_BUFFERING);
   if (!NT_SUCCESS(Status))
     {
       DPRINT("Could not open symbol file: %wZ\n", &SymFileName);
@@ -667,7 +667,7 @@
 
   /*  Allocate nonpageable memory for symbol file  */
   FileBuffer = ExAllocatePool(NonPagedPool,
-                              FileStdInfo.EndOfFile.u.LowPart);
+                              FileStdInfo.AllocationSize.u.LowPart);
 
   if (FileBuffer == NULL)
     {
@@ -683,7 +683,7 @@
                       FileBuffer,
                       FileStdInfo.EndOfFile.u.LowPart,
                       0, 0);
-  if (!NT_SUCCESS(Status))
+  if (!NT_SUCCESS(Status) && Status != STATUS_END_OF_FILE)
     {
       DPRINT("Could not read symbol file into memory (Status 0x%x)\n", Status);
       ExFreePool(FileBuffer);
@@ -869,11 +869,18 @@
   PSYMBOLFILE_HEADER SymbolFileHeader;
   PIMAGE_SYMBOL_INFO SymbolInfo;
   ANSI_STRING AnsiString;
+  PCHAR Extension;
 
   DPRINT("Module %s is a symbol file\n", FileName);
 
   strncpy(TmpBaseName, FileName, MAX_PATH-1);
   TmpBaseName[MAX_PATH-1] = '\0';
+  /* remove the extension '.sym' */
+  Extension = strrchr(TmpBaseName, '.');
+  if (Extension && 0 == _stricmp(Extension, ".sym"))
+    {
+      *Extension = 0;
+    }
   
   DPRINT("base: %s (Length %d)\n", TmpBaseName, Length);
   
CVSspam 0.2.8