dbghelp: Implement SymFromIndex().
Signed-off-by: Eric Pouech <epouech@codeweavers.com>
This commit is contained in:
parent
989988a5ae
commit
65109c725d
1 changed files with 21 additions and 4 deletions
|
@ -2614,10 +2614,16 @@ BOOL WINAPI SymGetLineFromNameW64(HANDLE hProcess, PCWSTR ModuleName, PCWSTR Fil
|
|||
*/
|
||||
BOOL WINAPI SymFromIndex(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBOL_INFO symbol)
|
||||
{
|
||||
FIXME("hProcess = %p, BaseOfDll = %I64x, index = %ld, symbol = %p\n",
|
||||
struct module_pair pair;
|
||||
struct symt* sym;
|
||||
|
||||
TRACE("hProcess = %p, BaseOfDll = %I64x, index = %ld, symbol = %p\n",
|
||||
hProcess, BaseOfDll, index, symbol);
|
||||
|
||||
return FALSE;
|
||||
if (!module_init_pair(&pair, hProcess, BaseOfDll)) return FALSE;
|
||||
if ((sym = symt_index2ptr(pair.effective, index)) == NULL) return FALSE;
|
||||
symt_fill_sym_info(&pair, NULL, sym, symbol);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
@ -2626,10 +2632,21 @@ BOOL WINAPI SymFromIndex(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBO
|
|||
*/
|
||||
BOOL WINAPI SymFromIndexW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD index, PSYMBOL_INFOW symbol)
|
||||
{
|
||||
FIXME("hProcess = %p, BaseOfDll = %I64x, index = %ld, symbol = %p\n",
|
||||
PSYMBOL_INFO si;
|
||||
BOOL ret;
|
||||
|
||||
TRACE("hProcess = %p, BaseOfDll = %I64x, index = %ld, symbol = %p\n",
|
||||
hProcess, BaseOfDll, index, symbol);
|
||||
|
||||
return FALSE;
|
||||
si = HeapAlloc(GetProcessHeap(), 0, sizeof(*si) + symbol->MaxNameLen * sizeof(WCHAR));
|
||||
if (!si) return FALSE;
|
||||
|
||||
si->SizeOfStruct = sizeof(*si);
|
||||
si->MaxNameLen = symbol->MaxNameLen;
|
||||
if ((ret = SymFromIndex(hProcess, BaseOfDll, index, si)))
|
||||
copy_symbolW(symbol, si);
|
||||
HeapFree(GetProcessHeap(), 0, si);
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
|
|
Loading…
Add table
Reference in a new issue