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

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

    [WINESYNC] dbghelp: Use search_dll_path to load seach macho files.
    
    Signed-off-by: Jacek Caban <[email protected]>
    Signed-off-by: Alexandre Julliard <[email protected]>
    
    wine commit id be9072ec743e22ed6a20288e5539b8ba307f9280 by Jacek Caban 
<[email protected]>
---
 dll/win32/dbghelp/macho_module.c | 41 +---------------------------------------
 sdk/tools/winesync/dbghelp.cfg   |  2 +-
 2 files changed, 2 insertions(+), 41 deletions(-)

diff --git a/dll/win32/dbghelp/macho_module.c b/dll/win32/dbghelp/macho_module.c
index 038319ce35c..193c97b0011 100644
--- a/dll/win32/dbghelp/macho_module.c
+++ b/dll/win32/dbghelp/macho_module.c
@@ -48,7 +48,6 @@
 #define WIN32_NO_STATUS
 #include "dbghelp_private.h"
 #include "winternl.h"
-#include "wine/library.h"
 #include "wine/debug.h"
 #include "wine/heap.h"
 #include "image_private.h"
@@ -1536,44 +1535,6 @@ static BOOL macho_load_file_cb(void *param, HANDLE 
handle, const WCHAR *filename
     return macho_load_file(macho_load->process, filename, 
macho_load->load_addr, macho_load->macho_info);
 }
 
-/******************************************************************
- *              macho_load_file_from_dll_path
- *
- * Tries to load a Mach-O file from the dll path
- */
-static BOOL macho_load_file_from_dll_path(struct process* pcs,
-                                          const WCHAR* filename,
-                                          unsigned long load_addr,
-                                          struct macho_info* macho_info)
-{
-    BOOL ret = FALSE;
-    unsigned int index = 0;
-    const char *path;
-
-    TRACE("(%p/%p, %s, 0x%08lx, %p)\n", pcs, pcs->handle, 
debugstr_w(filename), load_addr,
-            macho_info);
-
-    while (!ret && (path = wine_dll_enum_load_path( index++ )))
-    {
-        WCHAR *name;
-        unsigned len;
-
-        len = MultiByteToWideChar(CP_UNIXCP, 0, path, -1, NULL, 0);
-
-        name = HeapAlloc( GetProcessHeap(), 0,
-                          (len + lstrlenW(filename) + 2) * sizeof(WCHAR) );
-
-        if (!name) break;
-        MultiByteToWideChar(CP_UNIXCP, 0, path, -1, name, len);
-        strcatW( name, S_SlashW );
-        strcatW( name, filename );
-        ret = macho_load_file(pcs, name, load_addr, macho_info);
-        HeapFree( GetProcessHeap(), 0, name );
-    }
-    TRACE(" => %d\n", ret);
-    return ret;
-}
-
 /******************************************************************
  *              macho_search_and_load_file
  *
@@ -1628,7 +1589,7 @@ static BOOL macho_search_and_load_file(struct process* 
pcs, const WCHAR* filenam
         ret = search_unix_path(p, fallback, macho_load_file_cb, &load_params);
     }
     if (!ret && p == filename)
-        ret = macho_load_file_from_dll_path(pcs, filename, load_addr, 
macho_info);
+        ret = search_dll_path(filename, macho_load_file_cb, &load_params);
 
     return ret;
 }
diff --git a/sdk/tools/winesync/dbghelp.cfg b/sdk/tools/winesync/dbghelp.cfg
index 0a7da2e8203..b103048082c 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: c3bb866bfc53b8c3b7b7355cb8311325a40a0a6b
+  wine: be9072ec743e22ed6a20288e5539b8ba307f9280

Reply via email to