Skip to content

Commit

Permalink
EmulatorPkg/Win/Host: Source level debugging on already loaded DLL
Browse files Browse the repository at this point in the history
Signed-off-by: Ashraf Ali <[email protected]>
  • Loading branch information
AshrafAliS authored and mergify[bot] committed Oct 28, 2024
1 parent 4de8084 commit 2d10dc1
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions EmulatorPkg/Win/Host/WinHost.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 2d10dc1

Please sign in to comment.