Temporary instrumentation for PE file loading
authorJan Kotas <jkotas@microsoft.com>
Sat, 6 Feb 2016 07:16:30 +0000 (23:16 -0800)
committerJan Kotas <jkotas@microsoft.com>
Sat, 6 Feb 2016 18:51:00 +0000 (10:51 -0800)
src/pal/src/map/map.cpp

index c94f5ea..da19383 100644 (file)
@@ -2439,7 +2439,7 @@ void * MAPMapPEFile(HANDLE hFile)
 
     if (MAP_FAILED == loadedBase)
     {
-        ERROR_(LOADER)( "mmap failed with code %d: %s.\n", errno, strerror( errno ) );
+        /* ERROR_(LOADER) */ fprintf(stderr, "mmap failed with code %d: %s.\n", errno, strerror( errno ) );
         palError = FILEGetLastErrorFromErrno();
         loadedBase = NULL; // clear it so we don't try to use it during clean-up
         goto doneReleaseMappingCriticalSection;
@@ -2475,7 +2475,7 @@ void * MAPMapPEFile(HANDLE hFile)
                     (void**)&loadedHeader);
     if (NO_ERROR != palError)
     {
-        ERROR_(LOADER)( "mmap of PE header failed\n" );
+        /* ERROR_(LOADER) */ fprintf(stderr, "mmap of PE header failed\n" );
         goto doneReleaseMappingCriticalSection;
     }
 
@@ -2570,7 +2570,7 @@ void * MAPMapPEFile(HANDLE hFile)
                         &sectionData);
         if (NO_ERROR != palError)
         {
-            ERROR_(LOADER)( "mmap of section %d failed\n", i );
+            /* ERROR_(LOADER) */ fprintf(stderr, "mmap of section %d failed\n", i );
             goto doneReleaseMappingCriticalSection;
         }
 
@@ -2633,7 +2633,7 @@ done:
     else
     {
         retval = NULL;
-        LOGEXIT("MAPMapPEFile error: %d\n", palError);
+        /* LOGEXIT */ fprintf(stderr, "MAPMapPEFile error: %d\n", palError);
 
         // If we had an error, and had mapped anything, we need to unmap it
         if (loadedBase != NULL)