X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=ArmPkg%2FLibrary%2FDebugPeCoffExtraActionLib%2FDebugPeCoffExtraActionLib.c;h=6d0bb988ea3faa5639c86bc784577107e6c9e2ca;hb=28929e20d449b534c41ff1573f003062900a2a54;hp=6459d51cffc0b4af3b9b1dc9d99bd04a4213419c;hpb=e1e91b73d12cb87cac0472b86a6df167db0a057f;p=mirror_edk2.git diff --git a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c index 6459d51cff..6d0bb988ea 100755 --- a/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c +++ b/ArmPkg/Library/DebugPeCoffExtraActionLib/DebugPeCoffExtraActionLib.c @@ -83,20 +83,24 @@ PeCoffLoaderRelocateImageExtraAction ( CHAR8 Temp[512]; #endif + if (ImageContext->PdbPointer) { #ifdef __CC_ARM #if (__ARMCC_VERSION < 500000) - // Print out the command for the RVD debugger to load symbols for this image - DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); + // Print out the command for the RVD debugger to load symbols for this image + DEBUG ((EFI_D_ERROR, "load /a /ni /np %a &0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); #else - // Print out the command for the DS-5 to load symbols for this image - DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); + // Print out the command for the DS-5 to load symbols for this image + DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); #endif #elif __GNUC__ - // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required - DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); + // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required + DEBUG ((EFI_D_ERROR, "add-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); #else - DEBUG ((EFI_D_ERROR, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint))); + DEBUG ((EFI_D_ERROR, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint))); #endif + } else { + DEBUG ((EFI_D_ERROR, "Loading driver at 0x%11p EntryPoint=0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress, FUNCTION_ENTRY_POINT (ImageContext->EntryPoint))); + } } @@ -121,15 +125,17 @@ PeCoffLoaderUnloadImageExtraAction ( CHAR8 Temp[512]; #endif + if (ImageContext->PdbPointer) { #ifdef __CC_ARM - { - // Print out the command for the RVD debugger to load symbols for this image + // Print out the command for the RVD debugger to load symbols for this image DEBUG ((EFI_D_ERROR, "unload symbols_only %a\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)))); - } #elif __GNUC__ - // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required - DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); + // This may not work correctly if you generate PE/COFF directlyas then the Offset would not be required + DEBUG ((EFI_D_ERROR, "remove-symbol-file %a 0x%08x\n", DeCygwinPathIfNeeded (ImageContext->PdbPointer, Temp, sizeof (Temp)), (UINTN)(ImageContext->ImageAddress + ImageContext->SizeOfHeaders))); #else - DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer)); + DEBUG ((EFI_D_ERROR, "Unloading %a\n", ImageContext->PdbPointer)); #endif + } else { + DEBUG ((EFI_D_ERROR, "Unloading driver at 0x%11p\n", (VOID *)(UINTN) ImageContext->ImageAddress)); + } }