[IMAGEHLP_SYMBOL64][1] *pSym = NULL;
[IMAGEHLP_LINE64][2] Line;
STACKFRAME64 s;
int d = 0;
//In my code I obtain the return address from the stack frame of function foo() which was called from function bar() and assign it to s.AddrPC.Offset. Now I call -
SymGetLineFromAddr64(this->m_hProcess, s.AddrPC.Offset, &(d), &Line)
SymGetSymFromAddr64(this->m_hProcess, s.AddrPC.Offset, &(d), pSym))
//We pass the current process HANDLE
//pSym->Name = bar
What addresses do these contain?
Line.Address;
pSym->Address;
Found! pSym->Address gives the virtual address for the function name
I have been trying to figure this out for a long time. Any help will be appreciated.