Rémi Bernon : dbghelp: Ignore missing debug info in SymInitializeW.

Alexandre Julliard julliard at winehq.org
Sat Aug 1 05:45:55 CDT 2020


Module: wine
Branch: master
Commit: 774ee4734a7d6c02f648fdf1747df837c964583d
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=774ee4734a7d6c02f648fdf1747df837c964583d

Author: Rémi Bernon <rbernon at codeweavers.com>
Date:   Fri Jul 31 14:22:34 2020 +0200

dbghelp: Ignore missing debug info in SymInitializeW.

When fInvadeProcess is used, we return an error if the target process
is found but its debug info is not. We should only return an error if
the process is not found.

This fixes a SymInitializeW popup error on Hard Reset Redux startup.

Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/dbghelp.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c
index a2dba4cfe3..9d33bc67f2 100644
--- a/dlls/dbghelp/dbghelp.c
+++ b/dlls/dbghelp/dbghelp.c
@@ -354,7 +354,9 @@ static BOOL check_live_target(struct process* pcs)
     if (!base) return FALSE;
 
     TRACE("got debug info address %#lx from PEB %p\n", base, pbi.PebBaseAddress);
-    return elf_read_wine_loader_dbg_info(pcs, base) || macho_read_wine_loader_dbg_info(pcs, base);
+    if (!elf_read_wine_loader_dbg_info(pcs, base) && !macho_read_wine_loader_dbg_info(pcs, base))
+        WARN("couldn't load process debug info at %#lx\n", base);
+    return TRUE;
 }
 
 /******************************************************************
@@ -456,7 +458,7 @@ BOOL WINAPI SymInitializeW(HANDLE hProcess, PCWSTR UserSearchPath, BOOL fInvadeP
     {
         if (fInvadeProcess)
             EnumerateLoadedModulesW64(hProcess, process_invade_cb, hProcess);
-        pcs->loader->synchronize_module_list(pcs);
+        if (pcs->loader) pcs->loader->synchronize_module_list(pcs);
     }
     else if (fInvadeProcess)
     {




More information about the wine-cvs mailing list