Implemented SymLoadModuleEx.
This commit is contained in:
parent
c238ec520f
commit
1cb1183037
|
@ -99,6 +99,21 @@ struct process* process_find_by_handle(HANDLE hProcess)
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* validate_addr64 (internal)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
BOOL validate_addr64(DWORD64 addr)
|
||||||
|
{
|
||||||
|
if (addr >> 32)
|
||||||
|
{
|
||||||
|
FIXME("Unsupported address %s\n", wine_dbgstr_longlong(addr));
|
||||||
|
SetLastError(ERROR_INVALID_PARAMETER);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* SymSetSearchPath (DBGHELP.@)
|
* SymSetSearchPath (DBGHELP.@)
|
||||||
*
|
*
|
||||||
|
|
|
@ -72,7 +72,7 @@
|
||||||
@ stdcall SymInitialize(long str long)
|
@ stdcall SymInitialize(long str long)
|
||||||
@ stdcall SymLoadModule64(long long str str double long)
|
@ stdcall SymLoadModule64(long long str str double long)
|
||||||
@ stdcall SymLoadModule(long long str str long long)
|
@ stdcall SymLoadModule(long long str str long long)
|
||||||
@ stub SymLoadModuleEx
|
@ stdcall SymLoadModuleEx(long long str str double long ptr long)
|
||||||
@ stdcall SymMatchFileName(str str ptr ptr)
|
@ stdcall SymMatchFileName(str str ptr ptr)
|
||||||
@ stub SymMatchString
|
@ stub SymMatchString
|
||||||
@ stdcall SymRegisterCallback64(long ptr double)
|
@ stdcall SymRegisterCallback64(long ptr double)
|
||||||
|
|
|
@ -312,7 +312,8 @@ struct line_info
|
||||||
/* dbghelp.c */
|
/* dbghelp.c */
|
||||||
extern struct process* process_find_by_handle(HANDLE hProcess);
|
extern struct process* process_find_by_handle(HANDLE hProcess);
|
||||||
extern HANDLE hMsvcrt;
|
extern HANDLE hMsvcrt;
|
||||||
|
extern BOOL validate_addr64(DWORD64 addr);
|
||||||
|
|
||||||
/* elf_module.c */
|
/* elf_module.c */
|
||||||
typedef BOOL (*elf_enum_modules_cb)(const char*, unsigned long addr, void* user);
|
typedef BOOL (*elf_enum_modules_cb)(const char*, unsigned long addr, void* user);
|
||||||
extern BOOL elf_enum_modules(HANDLE hProc, elf_enum_modules_cb, void*);
|
extern BOOL elf_enum_modules(HANDLE hProc, elf_enum_modules_cb, void*);
|
||||||
|
|
|
@ -374,6 +374,23 @@ done:
|
||||||
return module->module.BaseOfImage;
|
return module->module.BaseOfImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/***********************************************************************
|
||||||
|
* SymLoadModuleEx (DBGHELP.@)
|
||||||
|
*/
|
||||||
|
DWORD64 WINAPI SymLoadModuleEx(HANDLE hProcess, HANDLE hFile, PCSTR ImageName,
|
||||||
|
PCSTR ModuleName, DWORD64 BaseOfDll, DWORD DllSize,
|
||||||
|
PMODLOAD_DATA Data, DWORD Flags)
|
||||||
|
{
|
||||||
|
if (Data || Flags)
|
||||||
|
{
|
||||||
|
FIXME("Unsupported parameters (%p, %lx) for %s\n", Data, Flags, ImageName);
|
||||||
|
if (Flags & 1) return TRUE;
|
||||||
|
}
|
||||||
|
if (!validate_addr64(BaseOfDll)) return FALSE;
|
||||||
|
return SymLoadModule(hProcess, hFile, (char*)ImageName, (char*)ModuleName,
|
||||||
|
(DWORD)BaseOfDll, DllSize);
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SymLoadModule64 (DBGHELP.@)
|
* SymLoadModule64 (DBGHELP.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -614,7 +614,7 @@ BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
|
||||||
BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
|
BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
|
||||||
DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
|
DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
|
||||||
DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PSTR, PSTR, DWORD, DWORD);
|
DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PSTR, PSTR, DWORD, DWORD);
|
||||||
DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PSTR, PSTR, DWORD64, DWORD,
|
DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
|
||||||
PMODLOAD_DATA, DWORD);
|
PMODLOAD_DATA, DWORD);
|
||||||
BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
|
BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue