mirror of
https://github.com/reactos/reactos.git
synced 2025-04-22 05:00:27 +00:00
[WINESYNC] dbghelp: Use loader_ops for load_module.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org> wine commit id 5ae3f969d4ec525a14a8109a5ee4c5a2e2238405 by Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
parent
afc1e47291
commit
f308fa857b
5 changed files with 13 additions and 31 deletions
|
@ -423,6 +423,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
|
||||||
struct loader_ops
|
struct loader_ops
|
||||||
{
|
{
|
||||||
BOOL (*synchronize_module_list)(struct process* process);
|
BOOL (*synchronize_module_list)(struct process* process);
|
||||||
|
struct module* (*load_module)(struct process* process, const WCHAR* name, ULONG_PTR addr);
|
||||||
BOOL (*enum_modules)(struct process* process, enum_modules_cb callback, void* user);
|
BOOL (*enum_modules)(struct process* process, enum_modules_cb callback, void* user);
|
||||||
BOOL (*fetch_file_info)(struct process* process, const WCHAR* name, ULONG_PTR load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum);
|
BOOL (*fetch_file_info)(struct process* process, const WCHAR* name, ULONG_PTR load_addr, DWORD_PTR* base, DWORD* size, DWORD* checksum);
|
||||||
};
|
};
|
||||||
|
@ -634,16 +635,12 @@ extern DWORD calc_crc32(HANDLE handle) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* elf_module.c */
|
/* elf_module.c */
|
||||||
extern BOOL elf_load_debug_info(struct module* module) DECLSPEC_HIDDEN;
|
extern BOOL elf_load_debug_info(struct module* module) DECLSPEC_HIDDEN;
|
||||||
extern struct module*
|
|
||||||
elf_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN;
|
|
||||||
extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN;
|
extern BOOL elf_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN;
|
||||||
struct elf_thunk_area;
|
struct elf_thunk_area;
|
||||||
extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN;
|
extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* macho_module.c */
|
/* macho_module.c */
|
||||||
extern BOOL macho_load_debug_info(struct process *pcs, struct module* module) DECLSPEC_HIDDEN;
|
extern BOOL macho_load_debug_info(struct process *pcs, struct module* module) DECLSPEC_HIDDEN;
|
||||||
extern struct module*
|
|
||||||
macho_load_module(struct process* pcs, const WCHAR* name, unsigned long) DECLSPEC_HIDDEN;
|
|
||||||
extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN;
|
extern BOOL macho_read_wine_loader_dbg_info(struct process* pcs) DECLSPEC_HIDDEN;
|
||||||
|
|
||||||
/* minidump.c */
|
/* minidump.c */
|
||||||
|
|
|
@ -1583,7 +1583,7 @@ static BOOL elf_load_cb(const WCHAR* name, unsigned long load_addr,
|
||||||
* Also, find module real name and load address from
|
* Also, find module real name and load address from
|
||||||
* the real loaded modules list in pcs address space
|
* the real loaded modules list in pcs address space
|
||||||
*/
|
*/
|
||||||
struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
static struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
||||||
{
|
{
|
||||||
struct elf_load el;
|
struct elf_load el;
|
||||||
|
|
||||||
|
@ -1706,6 +1706,7 @@ static BOOL elf_search_loader(struct process* pcs, struct elf_info* elf_info)
|
||||||
static const struct loader_ops elf_loader_ops =
|
static const struct loader_ops elf_loader_ops =
|
||||||
{
|
{
|
||||||
elf_synchronize_module_list,
|
elf_synchronize_module_list,
|
||||||
|
elf_load_module,
|
||||||
elf_enum_modules,
|
elf_enum_modules,
|
||||||
elf_fetch_file_info,
|
elf_fetch_file_info,
|
||||||
};
|
};
|
||||||
|
@ -1740,11 +1741,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct module* elf_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL elf_load_debug_info(struct module* module)
|
BOOL elf_load_debug_info(struct module* module)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -1782,7 +1782,7 @@ static BOOL macho_load_cb(const WCHAR* name, unsigned long addr, void* user)
|
||||||
* Also, find module real name and load address from
|
* Also, find module real name and load address from
|
||||||
* the real loaded modules list in pcs address space.
|
* the real loaded modules list in pcs address space.
|
||||||
*/
|
*/
|
||||||
struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
static struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
||||||
{
|
{
|
||||||
struct macho_load ml;
|
struct macho_load ml;
|
||||||
|
|
||||||
|
@ -1906,6 +1906,7 @@ static BOOL macho_search_loader(struct process* pcs, struct macho_info* macho_in
|
||||||
static const struct loader_ops macho_loader_ops =
|
static const struct loader_ops macho_loader_ops =
|
||||||
{
|
{
|
||||||
macho_synchronize_module_list,
|
macho_synchronize_module_list,
|
||||||
|
macho_load_module,
|
||||||
macho_enum_modules,
|
macho_enum_modules,
|
||||||
macho_fetch_file_info,
|
macho_fetch_file_info,
|
||||||
};
|
};
|
||||||
|
@ -1936,11 +1937,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct module* macho_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
BOOL macho_load_debug_info(struct process *pcs, struct module* module)
|
BOOL macho_load_debug_info(struct process *pcs, struct module* module)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
|
@ -919,20 +919,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||||
wImageName)
|
wImageName)
|
||||||
{
|
{
|
||||||
/* and finally an ELF or Mach-O module */
|
/* and finally an ELF or Mach-O module */
|
||||||
#ifndef DBGHELP_STATIC_LIB
|
module = pcs->loader->load_module(pcs, wImageName, BaseOfDll);
|
||||||
switch (module_get_type_by_name(wImageName))
|
|
||||||
{
|
|
||||||
case DMT_ELF:
|
|
||||||
module = elf_load_module(pcs, wImageName, BaseOfDll);
|
|
||||||
break;
|
|
||||||
case DMT_MACHO:
|
|
||||||
module = macho_load_module(pcs, wImageName, BaseOfDll);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
/* Ignored */
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!module)
|
if (!module)
|
||||||
|
@ -1465,6 +1452,11 @@ static BOOL native_synchronize_module_list(struct process* pcs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static struct module* native_load_module(struct process* pcs, const WCHAR* name, unsigned long addr)
|
||||||
|
{
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
static BOOL native_enum_modules(struct process *process, enum_modules_cb cb, void* user)
|
static BOOL native_enum_modules(struct process *process, enum_modules_cb cb, void* user)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -1479,6 +1471,7 @@ static BOOL native_fetch_file_info(struct process* process, const WCHAR* name, U
|
||||||
const struct loader_ops no_loader_ops =
|
const struct loader_ops no_loader_ops =
|
||||||
{
|
{
|
||||||
native_synchronize_module_list,
|
native_synchronize_module_list,
|
||||||
|
native_load_module,
|
||||||
native_enum_modules,
|
native_enum_modules,
|
||||||
native_fetch_file_info,
|
native_fetch_file_info,
|
||||||
};
|
};
|
||||||
|
|
|
@ -4,4 +4,4 @@ files:
|
||||||
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
include/dbghelp.h: sdk/include/psdk/dbghelp.h
|
||||||
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
include/wine/mscvpdb.h: sdk/include/reactos/wine/mscvpdb.h
|
||||||
tags:
|
tags:
|
||||||
wine: 16a3481bd22243183281c60ff375d4e61d5c4198
|
wine: 5ae3f969d4ec525a14a8109a5ee4c5a2e2238405
|
||||||
|
|
Loading…
Reference in a new issue