From 76c4e691af3273ae2d349ef3aeb80f280edde1fd Mon Sep 17 00:00:00 2001 From: Eric Pouech Date: Tue, 19 Oct 2021 15:51:37 +0200 Subject: [PATCH] dbghelp: Add stub implementations for the SymSetScope* functions. Also move SymSetScopeFromAddr out of symbol.c into dbghelp.c which makes more sense as modification of process settings. Signed-off-by: Eric Pouech Signed-off-by: Alexandre Julliard --- dlls/dbghelp/dbghelp.c | 47 +++++++++++++++++++++++++++++++++++---- dlls/dbghelp/dbghelp.spec | 4 ++-- dlls/dbghelp/symbol.c | 13 ----------- 3 files changed, 45 insertions(+), 19 deletions(-) diff --git a/dlls/dbghelp/dbghelp.c b/dlls/dbghelp/dbghelp.c index 65a57ac90dc..585fc9cada5 100644 --- a/dlls/dbghelp/dbghelp.c +++ b/dlls/dbghelp/dbghelp.c @@ -613,10 +613,10 @@ BOOL WINAPI SymSetContext(HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame, pcs->ctx_frame.FrameOffset == StackFrame->FrameOffset && pcs->ctx_frame.StackOffset == StackFrame->StackOffset) { - TRACE("Setting same frame {rtn=%s frm=%s stk=%s}\n", - wine_dbgstr_longlong(pcs->ctx_frame.ReturnOffset), - wine_dbgstr_longlong(pcs->ctx_frame.FrameOffset), - wine_dbgstr_longlong(pcs->ctx_frame.StackOffset)); + TRACE("Setting same frame {rtn=%I64x frm=%I64x stk=%I64x}\n", + pcs->ctx_frame.ReturnOffset, + pcs->ctx_frame.FrameOffset, + pcs->ctx_frame.StackOffset); pcs->ctx_frame.InstructionOffset = StackFrame->InstructionOffset; SetLastError(ERROR_ACCESS_DENIED); /* latest MSDN says ERROR_SUCCESS */ return FALSE; @@ -627,6 +627,45 @@ BOOL WINAPI SymSetContext(HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame, return TRUE; } +/****************************************************************** + * SymSetScopeFromAddr (DBGHELP.@) + */ +BOOL WINAPI SymSetScopeFromAddr(HANDLE hProcess, ULONG64 addr) +{ + struct process* pcs; + + FIXME("(%p %#I64x): stub\n", hProcess, addr); + + if (!(pcs = process_find_by_handle(hProcess))) return FALSE; + return TRUE; +} + +/****************************************************************** + * SymSetScopeFromIndex (DBGHELP.@) + */ +BOOL WINAPI SymSetScopeFromIndex(HANDLE hProcess, ULONG64 addr, DWORD index) +{ + struct process* pcs; + + FIXME("(%p %#I64x %u): stub\n", hProcess, addr, index); + + if (!(pcs = process_find_by_handle(hProcess))) return FALSE; + return TRUE; +} + +/****************************************************************** + * SymSetScopeFromInlineContext (DBGHELP.@) + */ +BOOL WINAPI SymSetScopeFromInlineContext(HANDLE hProcess, ULONG64 addr, DWORD inlinectx) +{ + struct process* pcs; + + FIXME("(%p %#I64x %u): stub\n", hProcess, addr, inlinectx); + + if (!(pcs = process_find_by_handle(hProcess))) return FALSE; + return TRUE; +} + /****************************************************************** * reg_cb64to32 (internal) * diff --git a/dlls/dbghelp/dbghelp.spec b/dlls/dbghelp/dbghelp.spec index 696d7640aa4..471d9b6141c 100644 --- a/dlls/dbghelp/dbghelp.spec +++ b/dlls/dbghelp/dbghelp.spec @@ -169,8 +169,8 @@ @ stdcall SymSetOptions(long) @ stdcall SymSetParentWindow(long) @ stdcall SymSetScopeFromAddr(ptr int64) -@ stub SymSetScopeFromIndex -@ stub SymSetScopeFromInlineContext +@ stdcall SymSetScopeFromIndex(ptr int64 long) +@ stdcall SymSetScopeFromInlineContext(ptr int64 long) @ stdcall SymSetSearchPath(long str) @ stdcall SymSetSearchPathW(long wstr) @ stub SymSrvDeltaName diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c index 5cd62a538af..19374999070 100644 --- a/dlls/dbghelp/symbol.c +++ b/dlls/dbghelp/symbol.c @@ -2351,19 +2351,6 @@ BOOL WINAPI SymAddSymbolW(HANDLE hProcess, ULONG64 BaseOfDll, PCWSTR nameW, return SymAddSymbol(hProcess, BaseOfDll, name, addr, size, flags); } -/****************************************************************** - * SymSetScopeFromAddr (DBGHELP.@) - */ -BOOL WINAPI SymSetScopeFromAddr(HANDLE hProcess, ULONG64 addr) -{ - struct process* pcs; - - FIXME("(%p %s): stub\n", hProcess, wine_dbgstr_longlong(addr)); - - if (!(pcs = process_find_by_handle(hProcess))) return FALSE; - return TRUE; -} - /****************************************************************** * SymEnumLines (DBGHELP.@) *