Commit cffdaabb authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

dbghelp: Support depth relating to top function for inline sites.

When using an inline context which depth points towards the top level function (so when it's not strictly speaking an inline context), native falls back to picking information in the top level function. So we do now in SymSetScopeFromInlineContext() and SymFromInlineContext() (instead of returning an error). Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
parent 76d97b6e
......@@ -712,8 +712,6 @@ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD in
switch (IFC_MODE(inlinectx))
{
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);
......@@ -723,7 +721,9 @@ BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD in
pair.pcs->localscope_symt = &inlined->func.symt;
return TRUE;
}
return FALSE;
/* fall through */
case IFC_MODE_IGNORE:
case IFC_MODE_REGULAR: return SymSetScopeFromAddr(hProcess, addr);
default:
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
......
......@@ -2675,9 +2675,6 @@ BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx
switch (IFC_MODE(inline_ctx))
{
case IFC_MODE_IGNORE:
case IFC_MODE_REGULAR:
return SymFromAddr(hProcess, addr, disp, si);
case IFC_MODE_INLINE:
if (!module_init_pair(&pair, hProcess, addr)) return FALSE;
inlined = symt_find_inlined_site(pair.effective, addr, inline_ctx);
......@@ -2688,6 +2685,9 @@ BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx
return TRUE;
}
/* fall through */
case IFC_MODE_IGNORE:
case IFC_MODE_REGULAR:
return SymFromAddr(hProcess, addr, disp, si);
default:
SetLastError(ERROR_INVALID_PARAMETER);
return FALSE;
......
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