[PATCH 05/15] dbghelp: implement SymFromInlineContext
Eric Pouech
eric.pouech at gmail.com
Fri Oct 22 02:15:24 CDT 2021
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
---
dlls/dbghelp/symbol.c | 27 ++++++++++++++++++++++++---
1 file changed, 24 insertions(+), 3 deletions(-)
diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 45cca5468dd..edfeb5909f0 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -2647,9 +2647,30 @@ PWSTR WINAPI SymSetHomeDirectoryW(HANDLE hProcess, PCWSTR dir)
*/
BOOL WINAPI SymFromInlineContext(HANDLE hProcess, DWORD64 addr, ULONG inline_ctx, PDWORD64 disp, PSYMBOL_INFO si)
{
- FIXME("(%p, %#I64x, 0x%x, %p, %p): stub\n", hProcess, addr, inline_ctx, disp, si);
- SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
- return FALSE;
+ struct module_pair pair;
+ struct symt_inlinesite* inlined;
+
+ TRACE("(%p, %#I64x, 0x%x, %p, %p)\n", hProcess, addr, inline_ctx, disp, si);
+
+ 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);
+ if (inlined)
+ {
+ symt_fill_sym_info(&pair, NULL, &inlined->func.symt, si);
+ *disp = addr - inlined->func.address;
+ return TRUE;
+ }
+ /* fall through */
+ default:
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
}
/******************************************************************
More information about the wine-devel
mailing list