mirror of
https://github.com/reactos/reactos.git
synced 2024-11-24 12:03:31 +08: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
@ -423,6 +423,7 @@ typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
|
||||
struct loader_ops
|
||||
{
|
||||
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 (*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 */
|
||||
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;
|
||||
struct elf_thunk_area;
|
||||
extern int elf_is_in_thunk_area(unsigned long addr, const struct elf_thunk_area* thunks) DECLSPEC_HIDDEN;
|
||||
|
||||
/* macho_module.c */
|
||||
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;
|
||||
|
||||
/* 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
|
||||
* 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;
|
||||
|
||||
@ -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 =
|
||||
{
|
||||
elf_synchronize_module_list,
|
||||
elf_load_module,
|
||||
elf_enum_modules,
|
||||
elf_fetch_file_info,
|
||||
};
|
||||
@ -1740,11 +1741,6 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
|
||||
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)
|
||||
{
|
||||
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
|
||||
* 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;
|
||||
|
||||
@ -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 =
|
||||
{
|
||||
macho_synchronize_module_list,
|
||||
macho_load_module,
|
||||
macho_enum_modules,
|
||||
macho_fetch_file_info,
|
||||
};
|
||||
@ -1936,11 +1937,6 @@ BOOL macho_read_wine_loader_dbg_info(struct process* pcs)
|
||||
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)
|
||||
{
|
||||
return FALSE;
|
||||
|
@ -919,20 +919,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||
wImageName)
|
||||
{
|
||||
/* and finally an ELF or Mach-O module */
|
||||
#ifndef DBGHELP_STATIC_LIB
|
||||
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
|
||||
module = pcs->loader->load_module(pcs, wImageName, BaseOfDll);
|
||||
}
|
||||
}
|
||||
if (!module)
|
||||
@ -1465,6 +1452,11 @@ static BOOL native_synchronize_module_list(struct process* pcs)
|
||||
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)
|
||||
{
|
||||
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 =
|
||||
{
|
||||
native_synchronize_module_list,
|
||||
native_load_module,
|
||||
native_enum_modules,
|
||||
native_fetch_file_info,
|
||||
};
|
||||
|
@ -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: 16a3481bd22243183281c60ff375d4e61d5c4198
|
||||
wine: 5ae3f969d4ec525a14a8109a5ee4c5a2e2238405
|
||||
|
Loading…
Reference in New Issue
Block a user