From 232681da9617300959090a354bbaec8ea67cb01a Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Thu, 28 Oct 2021 08:58:44 +0200 Subject: [PATCH] dbghelp: Implement SymSetScopeFromInlineContext for inlined frames. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/dbghelp/dbghelp.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 0b1e20e93c0..844ef00b8e9 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -677,6 +677,9 @@ BOOL WINAPI SymSetScopeFromIndex(HANDLE hProcess, ULONG64 addr, DWORD index) */ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD inlinectx) { + struct module_pair pair; + struct symt_inlinesite* inlined; + TRACE("(%p %I64x %x)\n", hProcess, addr, inlinectx); switch (IFC_MODE(inlinectx)) @@ -684,6 +687,15 @@ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD in case IFC_MODE_IGNORE: case IFC_MODE_REGULAR: return SymSetScopeFromAddr(hProcess, addr); case IFC_MODE_INLINE: + if (!module_init_pair(&pair, hProcess, addr)) return FALSE; + inlined = symt_find_inlined_site(pair.effective, addr, inlinectx); + if (inlined) + { + pair.pcs->localscope_pc = addr; + pair.pcs->localscope_symt = &inlined->func.symt; + return TRUE; + } + return FALSE; default: SetLastError(ERROR_INVALID_PARAMETER); return FALSE;