]> git.proxmox.com Git - mirror_edk2.git/commit
EmulatorPkg/Win: Unload DLLs before reset
authorRay Ni <ray.ni@intel.com>
Mon, 5 Dec 2022 06:51:18 +0000 (14:51 +0800)
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Thu, 8 Dec 2022 10:04:24 +0000 (10:04 +0000)
commit4e17aba4b55003dde8de2671e968c75245fdfcae
treec091810944e6b822a473c82ab951692b3fd9fb56
parent2280af5ff8e97804e3ddceb85629da874ca4eb63
EmulatorPkg/Win: Unload DLLs before reset

EmulatorPkg/Win calls LoadLibraryEx() when the corresponding DLL file
is found for each PEIM or DXE driver. The module entry point is
changed to point to the entry point from the DLL. This helps to
notify Visual Studio that a new windows module is loaded and
corresponding symbol parsing is performed for source level debugging.

But entry point from the DLL is only executed when the module is not
loaded by AddModHandle().
When reset happens, we need to clear the DLL loading so that in next
boot the module can be loaded again by AddModHandle().

Without this patch, source level debugging doesn't work after reset.

Signed-off-by: Ray Ni <ray.ni@intel.com>
Reviewed-by: Zhiguang Liu <zhiguang.liu@intel.com>
Cc: Andrew Fish <afish@apple.com>
EmulatorPkg/Win/Host/WinHost.c