Commit 925182b0 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Implement SymSetScopeFromAddr() and SymSetScopeFromIndex().

parent 066bb761
......@@ -644,11 +644,18 @@ BOOL WINAPI SymSetContext(HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame,
*/
BOOL WINAPI SymSetScopeFromAddr(HANDLE hProcess, ULONG64 addr)
{
struct process* pcs;
struct module_pair pair;
struct symt_ht* sym;
FIXME("(%p %#I64x): stub\n", hProcess, addr);
TRACE("(%p %#I64x)\n", hProcess, addr);
if (!module_init_pair(&pair, hProcess, addr)) return FALSE;
if ((sym = symt_find_nearest(pair.effective, addr)) == NULL) return FALSE;
if (sym->symt.tag != SymTagFunction) return FALSE;
pair.pcs->localscope_pc = addr;
pair.pcs->localscope_symt = &sym->symt;
if (!(pcs = process_find_by_handle(hProcess))) return FALSE;
return TRUE;
}
......@@ -657,11 +664,18 @@ BOOL WINAPI SymSetScopeFromAddr(HANDLE hProcess, ULONG64 addr)
*/
BOOL WINAPI SymSetScopeFromIndex(HANDLE hProcess, ULONG64 addr, DWORD index)
{
struct process* pcs;
struct module_pair pair;
struct symt* sym;
FIXME("(%p %#I64x %u): stub\n", hProcess, addr, index);
TRACE("(%p %#I64x %u)\n", hProcess, addr, index);
if (!module_init_pair(&pair, hProcess, addr)) return FALSE;
sym = symt_index2ptr(pair.effective, index);
if (!symt_check_tag(sym, SymTagFunction)) return FALSE;
pair.pcs->localscope_pc = ((struct symt_function*)sym)->address; /* FIXME of FuncDebugStart when it exists? */
pair.pcs->localscope_symt = sym;
if (!(pcs = process_find_by_handle(hProcess))) return FALSE;
return TRUE;
}
......
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