dbghelp: Added stubs for add symbol functions.

This commit is contained in:
Eric Pouech 2008-09-29 21:30:29 +02:00 committed by Alexandre Julliard
parent e209932069
commit 49a44342fa
2 changed files with 36 additions and 2 deletions

View File

@ -30,8 +30,8 @@
@ stdcall SearchTreeForFileW(wstr wstr ptr) @ stdcall SearchTreeForFileW(wstr wstr ptr)
@ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr) @ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr)
@ stdcall StackWalk64(long long long ptr ptr ptr ptr ptr ptr) @ stdcall StackWalk64(long long long ptr ptr ptr ptr ptr ptr)
@ stub SymAddSymbol @ stdcall SymAddSymbol(ptr double str double long long)
@ stub SymAddSymbolW @ stdcall SymAddSymbolW(ptr double wstr double long long)
@ stdcall SymCleanup(long) @ stdcall SymCleanup(long)
@ stdcall SymEnumLines(ptr double str str ptr ptr) @ stdcall SymEnumLines(ptr double str str ptr ptr)
@ stub SymEnumLinesW @ stub SymEnumLinesW

View File

@ -1716,3 +1716,37 @@ BOOL WINAPI SymSearchW(HANDLE hProcess, ULONG64 BaseOfDll, DWORD Index,
return ret; return ret;
} }
/******************************************************************
* SymAddSymbol (DBGHELP.@)
*
*/
BOOL WINAPI SymAddSymbol(HANDLE hProcess, ULONG64 BaseOfDll, PCSTR name,
DWORD64 addr, DWORD size, DWORD flags)
{
WCHAR nameW[MAX_SYM_NAME];
MultiByteToWideChar(CP_ACP, 0, name, -1, nameW, sizeof(nameW) / sizeof(WCHAR));
return SymAddSymbolW(hProcess, BaseOfDll, nameW, addr, size, flags);
}
/******************************************************************
* SymAddSymbolW (DBGHELP.@)
*
*/
BOOL WINAPI SymAddSymbolW(HANDLE hProcess, ULONG64 BaseOfDll, PCWSTR name,
DWORD64 addr, DWORD size, DWORD flags)
{
struct module_pair pair;
TRACE("(%p %s %s %u)\n", hProcess, wine_dbgstr_w(name), wine_dbgstr_longlong(addr), size);
pair.pcs = process_find_by_handle(hProcess);
if (!pair.pcs) return FALSE;
pair.requested = module_find_by_addr(pair.pcs, BaseOfDll, DMT_UNKNOWN);
if (!module_get_debug(&pair)) return FALSE;
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}