mirror of
https://github.com/reactos/reactos.git
synced 2025-07-24 15:13:36 +00:00
[WINESYNC] dbghelp: Use search_dll_path to load seach macho files.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id be9072ec743e22ed6a20288e5539b8ba307f9280 by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
8194b5dee6
commit
fbc5f830fc
2 changed files with 2 additions and 41 deletions
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue