EmulatorPkg/Win/Host: Source level debugging on already loaded DLL

Signed-off-by: Ashraf Ali <ashraf.ali.s@intel.com>
This commit is contained in:
Ashraf Ali 2024-08-18 21:08:16 +05:30 committed by mergify[bot]
parent 4de80843a7
commit 2d10dc1fb5

View File

@ -1131,15 +1131,9 @@ PeCoffLoaderRelocateImageExtraAction (
if ((Library != NULL) && (DllEntryPoint != NULL)) {
Status = AddModHandle (ImageContext, Library);
if (Status == EFI_ALREADY_STARTED) {
if ((Status == EFI_SUCCESS) || (Status == EFI_ALREADY_STARTED)) {
//
// If the DLL has already been loaded before, then this instance of the DLL can not be debugged.
//
ImageContext->PdbPointer = NULL;
SecPrint ("WARNING: DLL already loaded. No source level debug %S.\n\r", DllFileName);
} else {
//
// This DLL is not already loaded, so source level debugging is supported.
// This DLL is either not loaded or already started, so source level debugging is supported.
//
ImageContext->EntryPoint = (EFI_PHYSICAL_ADDRESS)(UINTN)DllEntryPoint;
SecPrint ("LoadLibraryEx (\n\r %S,\n\r NULL, DONT_RESOLVE_DLL_REFERENCES)\n\r", DllFileName);