https://git.reactos.org/?p=reactos.git;a=commitdiff;h=9743bd26bd744a26ea68a5ed3f2a453d82bce5b0

commit 9743bd26bd744a26ea68a5ed3f2a453d82bce5b0
Author:     winesync <[email protected]>
AuthorDate: Fri Sep 11 17:05:16 2020 +0200
Commit:     Jérôme Gardou <[email protected]>
CommitDate: Wed Sep 16 10:35:45 2020 +0200

    [WINESYNC] dbghelp: Pass module struct to elf_locate_debug_link.
    
    Signed-off-by: Jacek Caban <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id 5ba1c5960e716bdec9052efeb9f3ddfba3cf9e0c by Jacek Caban 
<[email protected]>
---
 dll/win32/dbghelp/elf_module.c | 9 ++++-----
 sdk/tools/winesync/dbghelp.cfg | 2 +-
 2 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/dll/win32/dbghelp/elf_module.c b/dll/win32/dbghelp/elf_module.c
index 0d190e549cd..6bfd58b917a 100644
--- a/dll/win32/dbghelp/elf_module.c
+++ b/dll/win32/dbghelp/elf_module.c
@@ -1004,8 +1004,7 @@ static BOOL elf_check_debug_link(const WCHAR* file, 
struct image_file_map* fmap,
  *    is the global debug file directory, and execdir has been turned
  *    into a relative path)." (from GDB manual)
  */
-static BOOL elf_locate_debug_link(struct image_file_map* fmap, const char* 
filename,
-                                  const WCHAR* loaded_file, DWORD crc)
+static BOOL elf_locate_debug_link(const struct module* module, struct 
image_file_map* fmap, const char* filename, DWORD crc)
 {
     static const WCHAR globalDebugDirW[] = 
{'/','u','s','r','/','l','i','b','/','d','e','b','u','g','/'};
     static const WCHAR dotDebugW[] = {'.','d','e','b','u','g','/'};
@@ -1020,13 +1019,13 @@ static BOOL elf_locate_debug_link(struct 
image_file_map* fmap, const char* filen
     if (!fmap_link) return FALSE;
 
     filename_len = MultiByteToWideChar(CP_UNIXCP, 0, filename, -1, NULL, 0);
-    path_len = strlenW(loaded_file);
+    path_len = strlenW(module->module.LoadedImageName);
     p = HeapAlloc(GetProcessHeap(), 0,
                   (globalDebugDirLen + path_len + 6 + 1 + filename_len + 1) * 
sizeof(WCHAR));
     if (!p) goto found;
 
     /* we prebuild the string with "execdir" */
-    strcpyW(p, loaded_file);
+    strcpyW(p, module->module.LoadedImageName);
     slash = p;
     if ((slash2 = strrchrW(slash, '/'))) slash = slash2 + 1;
     if ((slash2 = strrchrW(slash, '\\'))) slash = slash2 + 1;
@@ -1190,7 +1189,7 @@ static BOOL elf_check_alternate(struct image_file_map* 
fmap, const struct module
              * 3/ CRC of the linked ELF file
              */
             DWORD crc = *(const DWORD*)(dbg_link + 
((DWORD_PTR)(strlen(dbg_link) + 4) & ~3));
-            ret = elf_locate_debug_link(fmap, dbg_link, 
module->module.LoadedImageName, crc);
+            ret = elf_locate_debug_link(module, fmap, dbg_link, crc);
             if (!ret)
                 WARN("Couldn't load linked debug file for %s\n",
                      debugstr_w(module->module.ModuleName));
diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg
index 63f6c9fd2db..c5ab997e646 100644
--- a/sdk/tools/winesync/dbghelp.cfg
+++ b/sdk/tools/winesync/dbghelp.cfg
@@ -4,4 +4,4 @@ files:
   include/dbghelp.h: sdk/include/psdk/dbghelp.h
   include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
 tags:
-  wine: e1b28a9c988ef0ff49d7254fd7ba05316f1c9b98
+  wine: 5ba1c5960e716bdec9052efeb9f3ddfba3cf9e0c

Reply via email to