dbghelp: Rename some things to be less ELF-centric.
This commit is contained in:
parent
985f0ea18f
commit
b8f6a68d6f
|
@ -111,7 +111,7 @@ void* hash_table_iter_up(struct hash_table_iter* hti);
|
||||||
|
|
||||||
extern unsigned dbghelp_options;
|
extern unsigned dbghelp_options;
|
||||||
/* some more Wine extensions */
|
/* some more Wine extensions */
|
||||||
#define SYMOPT_WINE_WITH_ELF_MODULES 0x40000000
|
#define SYMOPT_WINE_WITH_NATIVE_MODULES 0x40000000
|
||||||
|
|
||||||
enum location_kind {loc_error, /* reg is the error code */
|
enum location_kind {loc_error, /* reg is the error code */
|
||||||
loc_absolute, /* offset is the location */
|
loc_absolute, /* offset is the location */
|
||||||
|
@ -413,10 +413,11 @@ extern BOOL validate_addr64(DWORD64 addr);
|
||||||
extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* data);
|
extern BOOL pcs_callback(const struct process* pcs, ULONG action, void* data);
|
||||||
extern void* fetch_buffer(struct process* pcs, unsigned size);
|
extern void* fetch_buffer(struct process* pcs, unsigned size);
|
||||||
|
|
||||||
|
typedef BOOL (*enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
|
||||||
|
|
||||||
/* elf_module.c */
|
/* elf_module.c */
|
||||||
#define ELF_NO_MAP ((const void*)0xffffffff)
|
#define ELF_NO_MAP ((const void*)0xffffffff)
|
||||||
typedef BOOL (*elf_enum_modules_cb)(const WCHAR*, unsigned long addr, void* user);
|
extern BOOL elf_enum_modules(HANDLE hProc, enum_modules_cb, void*);
|
||||||
extern BOOL elf_enum_modules(HANDLE hProc, elf_enum_modules_cb, void*);
|
|
||||||
extern BOOL elf_fetch_file_info(const WCHAR* name, DWORD* base, DWORD* size, DWORD* checksum);
|
extern BOOL elf_fetch_file_info(const WCHAR* name, DWORD* base, DWORD* size, DWORD* checksum);
|
||||||
struct elf_file_map;
|
struct elf_file_map;
|
||||||
extern BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap);
|
extern BOOL elf_load_debug_info(struct module* module, struct elf_file_map* fmap);
|
||||||
|
|
|
@ -1390,7 +1390,7 @@ static BOOL elf_search_and_load_file(struct process* pcs, const WCHAR* filename,
|
||||||
*/
|
*/
|
||||||
static BOOL elf_enum_modules_internal(const struct process* pcs,
|
static BOOL elf_enum_modules_internal(const struct process* pcs,
|
||||||
const WCHAR* main_name,
|
const WCHAR* main_name,
|
||||||
elf_enum_modules_cb cb, void* user)
|
enum_modules_cb cb, void* user)
|
||||||
{
|
{
|
||||||
struct r_debug dbg_hdr;
|
struct r_debug dbg_hdr;
|
||||||
void* lm_addr;
|
void* lm_addr;
|
||||||
|
@ -1531,7 +1531,7 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
|
||||||
* This function doesn't require that someone has called SymInitialize
|
* This function doesn't require that someone has called SymInitialize
|
||||||
* on this very process.
|
* on this very process.
|
||||||
*/
|
*/
|
||||||
BOOL elf_enum_modules(HANDLE hProc, elf_enum_modules_cb cb, void* user)
|
BOOL elf_enum_modules(HANDLE hProc, enum_modules_cb cb, void* user)
|
||||||
{
|
{
|
||||||
struct process pcs;
|
struct process pcs;
|
||||||
struct elf_info elf_info;
|
struct elf_info elf_info;
|
||||||
|
@ -1636,7 +1636,7 @@ BOOL elf_read_wine_loader_dbg_info(struct process* pcs)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOL elf_enum_modules(HANDLE hProc, elf_enum_modules_cb cb, void* user)
|
BOOL elf_enum_modules(HANDLE hProc, enum_modules_cb cb, void* user)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -358,13 +358,13 @@ struct module* module_find_by_addr(const struct process* pcs, unsigned long addr
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* module_is_elf_container_loaded
|
* module_is_container_loaded
|
||||||
*
|
*
|
||||||
* checks whether the ELF container, for a (supposed) PE builtin is
|
* checks whether the native container, for a (supposed) PE builtin is
|
||||||
* already loaded
|
* already loaded
|
||||||
*/
|
*/
|
||||||
static BOOL module_is_elf_container_loaded(const struct process* pcs,
|
static BOOL module_is_container_loaded(const struct process* pcs,
|
||||||
const WCHAR* ImageName, DWORD base)
|
const WCHAR* ImageName, DWORD base)
|
||||||
{
|
{
|
||||||
size_t len;
|
size_t len;
|
||||||
struct module* module;
|
struct module* module;
|
||||||
|
@ -525,7 +525,7 @@ DWORD64 WINAPI SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
|
||||||
if (wImageName)
|
if (wImageName)
|
||||||
{
|
{
|
||||||
module = module_is_already_loaded(pcs, wImageName);
|
module = module_is_already_loaded(pcs, wImageName);
|
||||||
if (!module && module_is_elf_container_loaded(pcs, wImageName, BaseOfDll))
|
if (!module && module_is_container_loaded(pcs, wImageName, BaseOfDll))
|
||||||
{
|
{
|
||||||
/* force the loading of DLL as builtin */
|
/* force the loading of DLL as builtin */
|
||||||
module = pe_load_builtin_module(pcs, wImageName, BaseOfDll, SizeOfDll);
|
module = pe_load_builtin_module(pcs, wImageName, BaseOfDll, SizeOfDll);
|
||||||
|
@ -709,7 +709,7 @@ BOOL WINAPI SymEnumerateModulesW64(HANDLE hProcess,
|
||||||
|
|
||||||
for (module = pcs->lmodules; module; module = module->next)
|
for (module = pcs->lmodules; module; module = module->next)
|
||||||
{
|
{
|
||||||
if (!(dbghelp_options & SYMOPT_WINE_WITH_ELF_MODULES) && module->type == DMT_ELF)
|
if (!(dbghelp_options & SYMOPT_WINE_WITH_NATIVE_MODULES) && module->type == DMT_ELF)
|
||||||
continue;
|
continue;
|
||||||
if (!EnumModulesCallback(module->module.ModuleName,
|
if (!EnumModulesCallback(module->module.ModuleName,
|
||||||
module->module.BaseOfImage, UserContext))
|
module->module.BaseOfImage, UserContext))
|
||||||
|
|
|
@ -1009,7 +1009,7 @@ static BOOL sym_enum(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR Mask,
|
||||||
}
|
}
|
||||||
/* not found in PE modules, retry on the ELF ones
|
/* not found in PE modules, retry on the ELF ones
|
||||||
*/
|
*/
|
||||||
if (!pair.requested && (dbghelp_options & SYMOPT_WINE_WITH_ELF_MODULES))
|
if (!pair.requested && (dbghelp_options & SYMOPT_WINE_WITH_NATIVE_MODULES))
|
||||||
{
|
{
|
||||||
for (pair.requested = pair.pcs->lmodules; pair.requested; pair.requested = pair.requested->next)
|
for (pair.requested = pair.pcs->lmodules; pair.requested; pair.requested = pair.requested->next)
|
||||||
{
|
{
|
||||||
|
@ -1336,7 +1336,7 @@ BOOL WINAPI SymFromName(HANDLE hProcess, PCSTR Name, PSYMBOL_INFO Symbol)
|
||||||
}
|
}
|
||||||
/* not found in PE modules, retry on the ELF ones
|
/* not found in PE modules, retry on the ELF ones
|
||||||
*/
|
*/
|
||||||
if (dbghelp_options & SYMOPT_WINE_WITH_ELF_MODULES)
|
if (dbghelp_options & SYMOPT_WINE_WITH_NATIVE_MODULES)
|
||||||
{
|
{
|
||||||
for (module = pcs->lmodules; module; module = module->next)
|
for (module = pcs->lmodules; module; module = module->next)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue