Commit dd3e1dc5 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

Implemented SymGetModuleInfo64.

parent 567919d7
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
@ stdcall SymGetLinePrev(long ptr) @ stdcall SymGetLinePrev(long ptr)
@ stub SymGetModuleBase64 @ stub SymGetModuleBase64
@ stdcall SymGetModuleBase(long long) @ stdcall SymGetModuleBase(long long)
@ stub SymGetModuleInfo64 @ stdcall SymGetModuleInfo64(long double ptr)
@ stdcall SymGetModuleInfo(long long ptr) @ stdcall SymGetModuleInfo(long long ptr)
@ stub SymGetModuleInfoW64 @ stub SymGetModuleInfoW64
@ stub SymGetModuleInfoW @ stub SymGetModuleInfoW
......
...@@ -551,6 +551,61 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr, ...@@ -551,6 +551,61 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr,
return TRUE; return TRUE;
} }
/******************************************************************
* SymGetModuleInfo64 (DBGHELP.@)
*
*/
BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr,
PIMAGEHLP_MODULE64 ModuleInfo)
{
struct process* pcs = process_find_by_handle(hProcess);
struct module* module;
DWORD sz;
IMAGEHLP_MODULE64 mod;
TRACE("%p %s %p\n", hProcess, wine_dbgstr_longlong(dwAddr), ModuleInfo);
if (!pcs) return FALSE;
if (ModuleInfo->SizeOfStruct > sizeof(*ModuleInfo)) return FALSE;
module = module_find_by_addr(pcs, dwAddr, DMT_UNKNOWN);
if (!module) return FALSE;
mod.BaseOfImage = module->module.BaseOfImage;
mod.ImageSize = module->module.ImageSize;
mod.TimeDateStamp = module->module.TimeDateStamp;
mod.CheckSum = module->module.CheckSum;
mod.NumSyms = module->module.NumSyms;
mod.SymType = module->module.SymType;
strcpy(mod.ModuleName, module->module.ModuleName);
strcpy(mod.ImageName, module->module.ImageName);
strcpy(mod.LoadedImageName, module->module.LoadedImageName);
/* FIXME: all following attributes need to be set */
mod.LoadedPdbName[0] = '\0';
mod.CVSig = 0;
memset(mod.CVData, 0, sizeof(mod.CVData));
mod.PdbSig = 0;
memset(&mod.PdbSig70, 0, sizeof(mod.PdbSig70));
mod.PdbAge = 0;
mod.PdbUnmatched = 0;
mod.DbgUnmatched = 0;
mod.LineNumbers = 0;
mod.GlobalSymbols = 0;
mod.TypeInfo = 0;
mod.SourceIndexed = 0;
mod.Publics = 0;
if (module->module.SymType == SymNone)
{
module = module_get_container(pcs, module);
if (module && module->module.SymType != SymNone)
mod.SymType = module->module.SymType;
}
sz = ModuleInfo->SizeOfStruct;
memcpy(ModuleInfo, &mod, sz);
ModuleInfo->SizeOfStruct = sz;
return TRUE;
}
/*********************************************************************** /***********************************************************************
* SymGetModuleBase (IMAGEHLP.@) * SymGetModuleBase (IMAGEHLP.@)
*/ */
......
...@@ -113,7 +113,8 @@ typedef struct _IMAGEHLP_MODULE ...@@ -113,7 +113,8 @@ typedef struct _IMAGEHLP_MODULE
CHAR LoadedImageName[256]; CHAR LoadedImageName[256];
} IMAGEHLP_MODULE, *PIMAGEHLP_MODULE; } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
typedef struct _IMAGEHLP_MODULEW { typedef struct _IMAGEHLP_MODULEW
{
DWORD SizeOfStruct; DWORD SizeOfStruct;
DWORD BaseOfImage; DWORD BaseOfImage;
DWORD ImageSize; DWORD ImageSize;
...@@ -126,6 +127,33 @@ typedef struct _IMAGEHLP_MODULEW { ...@@ -126,6 +127,33 @@ typedef struct _IMAGEHLP_MODULEW {
WCHAR LoadedImageName[256]; WCHAR LoadedImageName[256];
} IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW; } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
typedef struct _IMAGEHLP_MODULE64
{
DWORD SizeOfStruct;
DWORD64 BaseOfImage;
DWORD ImageSize;
DWORD TimeDateStamp;
DWORD CheckSum;
DWORD NumSyms;
SYM_TYPE SymType;
CHAR ModuleName[32];
CHAR ImageName[256];
CHAR LoadedImageName[256];
CHAR LoadedPdbName[256];
DWORD CVSig;
CHAR CVData[MAX_PATH*3];
DWORD PdbSig;
GUID PdbSig70;
DWORD PdbAge;
BOOL PdbUnmatched;
BOOL DbgUnmatched;
BOOL LineNumbers;
BOOL GlobalSymbols;
BOOL TypeInfo;
BOOL SourceIndexed;
BOOL Publics;
} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
typedef struct _IMAGEHLP_LINE typedef struct _IMAGEHLP_LINE
{ {
DWORD SizeOfStruct; DWORD SizeOfStruct;
...@@ -612,6 +640,7 @@ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, DWORD, PVOID); ...@@ -612,6 +640,7 @@ typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, DWORD, PVOID);
BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID); BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE); BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW); BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
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, PCSTR, PCSTR, DWORD64, DWORD, DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment