dbghelp: Implemented SymGetModuleInfoW and SymGetModuleInfoW64.
This commit is contained in:
parent
922a7bd191
commit
d2d85a1b46
|
@ -83,8 +83,8 @@
|
||||||
@ stdcall SymGetModuleBase64(long double)
|
@ stdcall SymGetModuleBase64(long double)
|
||||||
@ stdcall SymGetModuleInfo(long long ptr)
|
@ stdcall SymGetModuleInfo(long long ptr)
|
||||||
@ stdcall SymGetModuleInfo64(long double ptr)
|
@ stdcall SymGetModuleInfo64(long double ptr)
|
||||||
@ stub SymGetModuleInfoW
|
@ stdcall SymGetModuleInfoW(long long ptr)
|
||||||
@ stub SymGetModuleInfoW64
|
@ stdcall SymGetModuleInfoW64(long double ptr)
|
||||||
@ stub SymGetOmapBlockBase
|
@ stub SymGetOmapBlockBase
|
||||||
@ stdcall SymGetOptions()
|
@ stdcall SymGetOptions()
|
||||||
@ stub SymGetScope
|
@ stub SymGetScope
|
||||||
|
|
|
@ -660,6 +660,39 @@ BOOL WINAPI SymGetModuleInfo(HANDLE hProcess, DWORD dwAddr,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* SymGetModuleInfoW (DBGHELP.@)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SymGetModuleInfoW(HANDLE hProcess, DWORD dwAddr,
|
||||||
|
PIMAGEHLP_MODULEW ModuleInfo)
|
||||||
|
{
|
||||||
|
IMAGEHLP_MODULE mi;
|
||||||
|
IMAGEHLP_MODULEW miw;
|
||||||
|
|
||||||
|
if (sizeof(miw) < ModuleInfo->SizeOfStruct) FIXME("Wrong size\n");
|
||||||
|
|
||||||
|
mi.SizeOfStruct = sizeof(mi);
|
||||||
|
if (!SymGetModuleInfo(hProcess, dwAddr, &mi)) return FALSE;
|
||||||
|
|
||||||
|
miw.SizeOfStruct = mi.SizeOfStruct;
|
||||||
|
miw.BaseOfImage = mi.BaseOfImage;
|
||||||
|
miw.ImageSize = mi.ImageSize;
|
||||||
|
miw.TimeDateStamp = mi.TimeDateStamp;
|
||||||
|
miw.CheckSum = mi.CheckSum;
|
||||||
|
miw.NumSyms = mi.NumSyms;
|
||||||
|
miw.SymType = mi.SymType;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.ModuleName, -1,
|
||||||
|
miw.ModuleName, sizeof(miw.ModuleName) / sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.ImageName, -1,
|
||||||
|
miw.ImageName, sizeof(miw.ImageName) / sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.LoadedImageName, -1,
|
||||||
|
miw.LoadedImageName, sizeof(miw.LoadedImageName) / sizeof(WCHAR));
|
||||||
|
memcpy(ModuleInfo, &miw, ModuleInfo->SizeOfStruct);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/******************************************************************
|
/******************************************************************
|
||||||
* SymGetModuleInfo64 (DBGHELP.@)
|
* SymGetModuleInfo64 (DBGHELP.@)
|
||||||
*
|
*
|
||||||
|
@ -720,6 +753,54 @@ BOOL WINAPI SymGetModuleInfo64(HANDLE hProcess, DWORD64 dwAddr,
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/******************************************************************
|
||||||
|
* SymGetModuleInfoW64 (DBGHELP.@)
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
BOOL WINAPI SymGetModuleInfoW64(HANDLE hProcess, DWORD64 dwAddr,
|
||||||
|
PIMAGEHLP_MODULEW64 ModuleInfo)
|
||||||
|
{
|
||||||
|
IMAGEHLP_MODULE64 mi;
|
||||||
|
IMAGEHLP_MODULEW64 miw;
|
||||||
|
|
||||||
|
if (sizeof(miw) < ModuleInfo->SizeOfStruct) FIXME("Wrong size\n");
|
||||||
|
|
||||||
|
mi.SizeOfStruct = sizeof(mi);
|
||||||
|
if (!SymGetModuleInfo64(hProcess, dwAddr, &mi)) return FALSE;
|
||||||
|
|
||||||
|
miw.SizeOfStruct = mi.SizeOfStruct;
|
||||||
|
miw.BaseOfImage = mi.BaseOfImage;
|
||||||
|
miw.ImageSize = mi.ImageSize;
|
||||||
|
miw.TimeDateStamp = mi.TimeDateStamp;
|
||||||
|
miw.CheckSum = mi.CheckSum;
|
||||||
|
miw.NumSyms = mi.NumSyms;
|
||||||
|
miw.SymType = mi.SymType;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.ModuleName, -1,
|
||||||
|
miw.ModuleName, sizeof(miw.ModuleName) / sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.ImageName, -1,
|
||||||
|
miw.ImageName, sizeof(miw.ImageName) / sizeof(WCHAR));
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.LoadedImageName, -1,
|
||||||
|
miw.LoadedImageName, sizeof(miw.LoadedImageName) / sizeof(WCHAR));
|
||||||
|
|
||||||
|
miw.CVSig = mi.CVSig;
|
||||||
|
MultiByteToWideChar(CP_ACP, 0, mi.CVData, -1,
|
||||||
|
miw.CVData, sizeof(miw.CVData) / sizeof(WCHAR));
|
||||||
|
miw.PdbSig = mi.PdbSig;
|
||||||
|
miw.PdbSig70 = mi.PdbSig70;
|
||||||
|
miw.PdbAge = mi.PdbAge;
|
||||||
|
miw.PdbUnmatched = mi.PdbUnmatched;
|
||||||
|
miw.DbgUnmatched = mi.DbgUnmatched;
|
||||||
|
miw.LineNumbers = mi.LineNumbers;
|
||||||
|
miw.GlobalSymbols = mi.GlobalSymbols;
|
||||||
|
miw.TypeInfo = mi.TypeInfo;
|
||||||
|
miw.SourceIndexed = mi.SourceIndexed;
|
||||||
|
miw.Publics = mi.Publics;
|
||||||
|
|
||||||
|
memcpy(ModuleInfo, &miw, ModuleInfo->SizeOfStruct);
|
||||||
|
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
/***********************************************************************
|
/***********************************************************************
|
||||||
* SymGetModuleBase (DBGHELP.@)
|
* SymGetModuleBase (DBGHELP.@)
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -172,7 +172,7 @@ typedef struct _IMAGEHLP_MODULE64
|
||||||
BOOL Publics;
|
BOOL Publics;
|
||||||
} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
|
} IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
|
||||||
|
|
||||||
typedef struct _IMAGEHLP_MODULE64W
|
typedef struct _IMAGEHLP_MODULEW64
|
||||||
{
|
{
|
||||||
DWORD SizeOfStruct;
|
DWORD SizeOfStruct;
|
||||||
DWORD64 BaseOfImage;
|
DWORD64 BaseOfImage;
|
||||||
|
|
Loading…
Reference in New Issue