\r
\r
/**\r
- If the build is done on cygwin the paths are cygpaths. \r
+ If the build is done on cygwin the paths are cygpaths.\r
/cygdrive/c/tmp.txt vs c:\tmp.txt so we need to convert\r
them to work with RVD commands\r
\r
CHAR8 *Ptr;\r
UINTN Index;\r
UINTN Index2;\r
- \r
+\r
Ptr = AsciiStrStr (Name, "/cygdrive/");\r
if (Ptr == NULL) {\r
return Name;\r
}\r
- \r
+\r
for (Index = 9, Index2 = 0; (Index < (Size + 9)) && (Ptr[Index] != '\0'); Index++, Index2++) {\r
Temp[Index2] = Ptr[Index];\r
if (Temp[Index2] == '/') {\r
IN OUT PE_COFF_LOADER_IMAGE_CONTEXT *ImageContext\r
)\r
{\r
-#if !defined(MDEPKG_NDEBUG) \r
+#if !defined(MDEPKG_NDEBUG)\r
CHAR8 Temp[512];\r
#endif\r
\r
+ if (ImageContext->PdbPointer) {\r
#ifdef __CC_ARM\r
#if (__ARMCC_VERSION < 500000)\r
- // Print out the command for the RVD debugger to load symbols for this image\r
- DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+ // Print out the command for the RVD debugger to load symbols for this image\r
+ DEBUG ((EFI_D_LOAD | EFI_D_INFO, "load /a /ni /np %a &0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
#else\r
- // Print out the command for the DS-5 to load symbols for this image\r
- DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+ // Print out the command for the DS-5 to load symbols for this image\r
+ DEBUG ((EFI_D_LOAD | EFI_D_INFO, "add-symbol-file %a 0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
#endif\r
#elif __GNUC__\r
- // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
- DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+ // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
+ DEBUG ((EFI_D_LOAD | EFI_D_INFO, "add-symbol-file %a 0x%p\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
#else\r
- DEBUG ((EFI_D_ERROR, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
+ DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
#endif\r
+ } else {\r
+ DEBUG ((EFI_D_LOAD | EFI_D_INFO, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint)));\r
+ }\r
}\r
\r
\r
/**\r
Performs additional actions just before a PE/COFF image is unloaded. Any resources\r
that were allocated by PeCoffLoaderRelocateImageExtraAction() must be freed.\r
- \r
+\r
If ImageContext is NULL, then ASSERT().\r
- \r
+\r
@param ImageContext Pointer to the image context structure that describes the\r
PE/COFF image that is being unloaded.\r
\r
#if !defined(MDEPKG_NDEBUG)\r
CHAR8 Temp[512];\r
#endif\r
- \r
+\r
+ if (ImageContext->PdbPointer) {\r
#ifdef __CC_ARM\r
- { \r
- // Print out the command for the RVD debugger to load symbols for this image\r
+ // Print out the command for the RVD debugger to load symbols for this image\r
DEBUG ((EFI_D_ERROR, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp))));\r
- }\r
#elif __GNUC__\r
- // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
- DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
+ // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required\r
+ DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders)));\r
#else\r
- DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer));\r
+ DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer));\r
#endif\r
+ } else {\r
+ DEBUG ((EFI_D_ERROR, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress));\r
+ }\r
}\r