Moved quite a few functions to dbghelp (removed debug.c and symbol.c

files).
This commit is contained in:
Eric Pouech 2004-04-05 22:50:45 +00:00 committed by Alexandre Julliard
parent 17d464d0d9
commit f35d1caeef
7 changed files with 116 additions and 498 deletions

View File

@ -4,16 +4,14 @@ TOPOBJDIR = ../..
SRCDIR = @srcdir@ SRCDIR = @srcdir@
VPATH = @srcdir@ VPATH = @srcdir@
MODULE = imagehlp.dll MODULE = imagehlp.dll
IMPORTS = kernel32 ntdll IMPORTS = dbghelp kernel32 ntdll
C_SRCS = \ C_SRCS = \
access.c \ access.c \
debug.c \
imagehlp_main.c \ imagehlp_main.c \
integrity.c \ integrity.c \
internal.c \ internal.c \
modify.c \ modify.c
symbol.c
@MAKE_DLL_RULES@ @MAKE_DLL_RULES@

View File

@ -55,31 +55,6 @@ static LOADED_IMAGE IMAGEHLP_EmptyLoadedImage = {
extern HANDLE IMAGEHLP_hHeap; extern HANDLE IMAGEHLP_hHeap;
/***********************************************************************
* EnumerateLoadedModules (IMAGEHLP.@)
*/
BOOL WINAPI EnumerateLoadedModules(
HANDLE hProcess,
PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
PVOID UserContext)
{
FIXME("(%p, %p, %p): stub\n",
hProcess, EnumLoadedModulesCallback, UserContext
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* GetTimestampForLoadedLibrary (IMAGEHLP.@)
*/
DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE Module)
{
FIXME("(%p): stub\n", Module);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/*********************************************************************** /***********************************************************************
* GetImageConfigInformation (IMAGEHLP.@) * GetImageConfigInformation (IMAGEHLP.@)
*/ */

View File

@ -1,118 +0,0 @@
/*
* IMAGEHLP library
*
* Copyright 1998 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "winerror.h"
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "imagehlp.h"
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
/***********************************************************************
* FindDebugInfoFile (IMAGEHLP.@)
*/
HANDLE WINAPI FindDebugInfoFile(
LPSTR FileName, LPSTR SymbolPath, LPSTR DebugFilePath)
{
FIXME("(%s, %s, %s): stub\n",
debugstr_a(FileName), debugstr_a(SymbolPath),
debugstr_a(DebugFilePath)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* FindExecutableImage (IMAGEHLP.@)
*/
HANDLE WINAPI FindExecutableImage(
LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath)
{
FIXME("(%s, %s, %s): stub\n",
debugstr_a(FileName), debugstr_a(SymbolPath),
debugstr_a(ImageFilePath)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* MapDebugInformation (IMAGEHLP.@)
*/
PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
HANDLE FileHandle, LPSTR FileName,
LPSTR SymbolPath, DWORD ImageBase)
{
FIXME("(%p, %s, %s, 0x%08lx): stub\n",
FileHandle, FileName, SymbolPath, ImageBase
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return NULL;
}
/***********************************************************************
* StackWalk (IMAGEHLP.@)
*/
BOOL WINAPI StackWalk(
DWORD MachineType, HANDLE hProcess, HANDLE hThread,
LPSTACKFRAME StackFrame, LPVOID ContextRecord,
PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
PTRANSLATE_ADDRESS_ROUTINE TranslateAddress)
{
FIXME(
"(%ld, %p, %p, %p, %p, %p, %p, %p, %p): stub\n",
MachineType, hProcess, hThread, StackFrame, ContextRecord,
ReadMemoryRoutine, FunctionTableAccessRoutine,
GetModuleBaseRoutine, TranslateAddress
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* UnDecorateSymbolName (IMAGEHLP.@)
*/
DWORD WINAPI UnDecorateSymbolName(
LPCSTR DecoratedName, LPSTR UnDecoratedName,
DWORD UndecoratedLength, DWORD Flags)
{
FIXME("(%s, %s, %ld, 0x%08lx): stub\n",
debugstr_a(DecoratedName), debugstr_a(UnDecoratedName),
UndecoratedLength, Flags
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* UnmapDebugInformation (IMAGEHLP.@)
*/
BOOL WINAPI UnmapDebugInformation(
PIMAGE_DEBUG_INFORMATION DebugInfo)
{
FIXME("(%p): stub\n", DebugInfo);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}

View File

@ -1,12 +1,12 @@
@ stdcall BindImage(str str str) @ stdcall BindImage(str str str)
@ stdcall BindImageEx(long str str str ptr) @ stdcall BindImageEx(long str str str ptr)
@ stdcall CheckSumMappedFile(ptr long ptr ptr) @ stdcall CheckSumMappedFile(ptr long ptr ptr)
@ stdcall EnumerateLoadedModules(long ptr ptr) @ stdcall EnumerateLoadedModules(long ptr ptr) dbghelp.EnumerateLoadedModules
@ stdcall FindDebugInfoFile(str str str) @ stdcall FindDebugInfoFile(str str str) dbghelp.FindDebugInfoFile
@ stdcall FindExecutableImage(str str str) @ stdcall FindExecutableImage(str str str) dbghelp.FindExecutableImage
@ stdcall GetImageConfigInformation(ptr ptr) @ stdcall GetImageConfigInformation(ptr ptr)
@ stdcall GetImageUnusedHeaderBytes(ptr ptr) @ stdcall GetImageUnusedHeaderBytes(ptr ptr)
@ stdcall GetTimestampForLoadedLibrary(long) @ stdcall GetTimestampForLoadedLibrary(long) dbghelp.GetTimestampForLoadedLibrary
@ stdcall ImageAddCertificate(long ptr ptr) @ stdcall ImageAddCertificate(long ptr ptr)
@ stdcall ImageDirectoryEntryToData(ptr long long ptr) ntdll.RtlImageDirectoryEntryToData @ stdcall ImageDirectoryEntryToData(ptr long long ptr) ntdll.RtlImageDirectoryEntryToData
@ stdcall ImageEnumerateCertificates(long long ptr ptr long) @ stdcall ImageEnumerateCertificates(long long ptr ptr long)
@ -19,43 +19,43 @@
@ stdcall ImageRvaToSection(ptr ptr long) ntdll.RtlImageRvaToSection @ stdcall ImageRvaToSection(ptr ptr long) ntdll.RtlImageRvaToSection
@ stdcall ImageRvaToVa(ptr ptr long ptr) ntdll.RtlImageRvaToVa @ stdcall ImageRvaToVa(ptr ptr long ptr) ntdll.RtlImageRvaToVa
@ stdcall ImageUnload(ptr) @ stdcall ImageUnload(ptr)
@ stdcall ImagehlpApiVersion() @ stdcall ImagehlpApiVersion() dbghelp.ImagehlpApiVersion
@ stdcall ImagehlpApiVersionEx(ptr) @ stdcall ImagehlpApiVersionEx(ptr) dbghelp.ImagehlpApiVersionEx
@ stdcall MakeSureDirectoryPathExists(str) @ stdcall MakeSureDirectoryPathExists(str) dbghelp.MakeSureDirectoryPathExists
@ stdcall MapAndLoad(str str ptr long long) @ stdcall MapAndLoad(str str ptr long long)
@ stdcall MapDebugInformation(long str str long) @ stdcall MapDebugInformation(long str str long) dbghelp.MapDebugInformation
@ stdcall MapFileAndCheckSumA(str ptr ptr) @ stdcall MapFileAndCheckSumA(str ptr ptr)
@ stdcall MapFileAndCheckSumW(wstr ptr ptr) @ stdcall MapFileAndCheckSumW(wstr ptr ptr)
@ stub MarkImageAsRunFromSwap @ stub MarkImageAsRunFromSwap
@ stdcall ReBaseImage(str str long long long long ptr ptr ptr ptr long) @ stdcall ReBaseImage(str str long long long long ptr ptr ptr ptr long)
@ stdcall RemovePrivateCvSymbolic(ptr ptr ptr) @ stdcall RemovePrivateCvSymbolic(ptr ptr ptr)
@ stdcall RemoveRelocations(ptr) @ stdcall RemoveRelocations(ptr)
@ stdcall SearchTreeForFile(str str str) @ stdcall SearchTreeForFile(str str str) dbghelp.SearchTreeForFile
@ stdcall SetImageConfigInformation(ptr ptr) @ stdcall SetImageConfigInformation(ptr ptr)
@ stdcall SplitSymbols(str str str long) @ stdcall SplitSymbols(str str str long)
@ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr) @ stdcall StackWalk(long long long ptr ptr ptr ptr ptr ptr) dbghelp.StackWalk
@ stdcall SymCleanup(long) @ stdcall SymCleanup(long) dbghelp.SymCleanup
@ stdcall SymEnumerateModules(long ptr ptr) @ stdcall SymEnumerateModules(long ptr ptr) dbghelp.SymEnumerateModules
@ stdcall SymEnumerateSymbols(long long ptr ptr) @ stdcall SymEnumerateSymbols(long long ptr ptr) dbghelp.SymEnumerateSymbols
@ stdcall SymFunctionTableAccess(long long) @ stdcall SymFunctionTableAccess(long long) dbghelp.SymFunctionTableAccess
@ stdcall SymGetModuleBase(long long) @ stdcall SymGetModuleBase(long long) dbghelp.SymGetModuleBase
@ stdcall SymGetModuleInfo(long long ptr) @ stdcall SymGetModuleInfo(long long ptr) dbghelp.SymGetModuleInfo
@ stdcall SymGetOptions() @ stdcall SymGetOptions() dbghelp.SymGetOptions
@ stdcall SymGetSearchPath(long str long) @ stdcall SymGetSearchPath(long str long) dbghelp.SymGetSearchPath
@ stdcall SymGetSymFromAddr(long long ptr ptr) @ stdcall SymGetSymFromAddr(long long ptr ptr) dbghelp.SymGetSymFromAddr
@ stdcall SymGetSymFromName(long str ptr) @ stdcall SymGetSymFromName(long str ptr) dbghelp.SymGetSymFromName
@ stdcall SymGetSymNext(long ptr) @ stdcall SymGetSymNext(long ptr) dbgelp.SymGetSymNext
@ stdcall SymGetSymPrev(long ptr) @ stdcall SymGetSymPrev(long ptr) dbgelp.SymGetSymPrev
@ stdcall SymInitialize(long str long) @ stdcall SymInitialize(long str long) dbghelp.SymInitialize
@ stdcall SymLoadModule(long long str str long long) @ stdcall SymLoadModule(long long str str long long) dbghelp.SymLoadModule
@ stdcall SymRegisterCallback(long ptr ptr) @ stdcall SymRegisterCallback(long ptr ptr) dbghelp.SymRegisterCallback
@ stdcall SymSetOptions(long) @ stdcall SymSetOptions(long) dbghelp.SymGetOptions
@ stdcall SymSetSearchPath(long str) @ stdcall SymSetSearchPath(long str) dbghelp.SymSetSearchPath
@ stdcall SymUnDName(ptr str long) @ stdcall SymUnDName(ptr str long) dbghelp.SymUnDName
@ stdcall SymUnloadModule(long long) @ stdcall SymUnloadModule(long long) dbghelp.SymUnloadModule
@ stdcall TouchFileTimes(long ptr) @ stdcall TouchFileTimes(long ptr)
@ stdcall UnDecorateSymbolName(str str long long) @ stdcall UnDecorateSymbolName(str str long long) dbghelp.UnDecorateSymbolName
@ stdcall UnMapAndLoad(ptr) @ stdcall UnMapAndLoad(ptr)
@ stdcall UnmapDebugInformation(ptr) @ stdcall UnmapDebugInformation(ptr) dbghelp.UnmapDebugInformation
@ stdcall UpdateDebugInfoFile(str str str ptr) @ stdcall UpdateDebugInfoFile(str str str ptr)
@ stdcall UpdateDebugInfoFileEx(str str str ptr long) @ stdcall UpdateDebugInfoFileEx(str str str ptr long)

View File

@ -29,11 +29,8 @@
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp); WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
/**********************************************************************/ /**********************************************************************/
HANDLE IMAGEHLP_hHeap = NULL; HANDLE IMAGEHLP_hHeap = NULL;
static API_VERSION IMAGEHLP_ApiVersion = { 4, 0, 0, 5 };
/*********************************************************************** /***********************************************************************
* DllMain (IMAGEHLP.init) * DllMain (IMAGEHLP.init)
*/ */
@ -55,65 +52,12 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
return TRUE; return TRUE;
} }
/***********************************************************************
* ImagehlpApiVersion (IMAGEHLP.@)
*/
LPAPI_VERSION WINAPI ImagehlpApiVersion(VOID)
{
return &IMAGEHLP_ApiVersion;
}
/***********************************************************************
* ImagehlpApiVersionEx (IMAGEHLP.@)
*/
LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION AppVersion)
{
if(!AppVersion)
return NULL;
AppVersion->MajorVersion = IMAGEHLP_ApiVersion.MajorVersion;
AppVersion->MinorVersion = IMAGEHLP_ApiVersion.MinorVersion;
AppVersion->Revision = IMAGEHLP_ApiVersion.Revision;
AppVersion->Reserved = IMAGEHLP_ApiVersion.Reserved;
return AppVersion;
}
/***********************************************************************
* MakeSureDirectoryPathExists (IMAGEHLP.@)
*/
BOOL WINAPI MakeSureDirectoryPathExists(LPCSTR DirPath)
{
if (CreateDirectoryA(DirPath,NULL))
return TRUE;
if (GetLastError() == ERROR_ALREADY_EXISTS)
{
SetLastError(ERROR_SUCCESS);
return TRUE;
}
return FALSE;
}
/*********************************************************************** /***********************************************************************
* MarkImageAsRunFromSwap (IMAGEHLP.@) * MarkImageAsRunFromSwap (IMAGEHLP.@)
* FIXME * FIXME
* No documentation available. * No documentation available.
*/ */
/***********************************************************************
* SearchTreeForFile (IMAGEHLP.@)
*/
BOOL WINAPI SearchTreeForFile(
LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer)
{
FIXME("(%s, %s, %s): stub\n",
debugstr_a(RootPath), debugstr_a(InputPathName),
debugstr_a(OutputPathBuffer)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/*********************************************************************** /***********************************************************************
* TouchFileTimes (IMAGEHLP.@) * TouchFileTimes (IMAGEHLP.@)
*/ */

View File

@ -1,262 +0,0 @@
/*
* IMAGEHLP library
*
* Copyright 1998 Patrik Stridvall
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include "windef.h"
#include "winbase.h"
#include "winerror.h"
#include "wine/debug.h"
#include "imagehlp.h"
WINE_DEFAULT_DEBUG_CHANNEL(imagehlp);
/***********************************************************************
* SymCleanup (IMAGEHLP.@)
*/
BOOL WINAPI SymCleanup(HANDLE hProcess)
{
FIXME("(%p): stub\n", hProcess);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymEnumerateModules (IMAGEHLP.@)
*/
BOOL WINAPI SymEnumerateModules(
HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
PVOID UserContext)
{
FIXME("(%p, %p, %p): stub\n",
hProcess, EnumModulesCallback, UserContext
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymEnumerateSymbols (IMAGEHLP.@)
*/
BOOL WINAPI SymEnumerateSymbols(
HANDLE hProcess, DWORD BaseOfDll,
PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext)
{
FIXME("(%p, 0x%08lx, %p, %p): stub\n",
hProcess, BaseOfDll, EnumSymbolsCallback, UserContext
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymFunctionTableAccess (IMAGEHLP.@)
*/
PVOID WINAPI SymFunctionTableAccess(HANDLE hProcess, DWORD AddrBase)
{
FIXME("(%p, 0x%08lx): stub\n", hProcess, AddrBase);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetModuleBase (IMAGEHLP.@)
*/
DWORD WINAPI SymGetModuleBase(HANDLE hProcess, DWORD dwAddr)
{
FIXME("(%p, 0x%08lx): stub\n", hProcess, dwAddr);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* SymGetModuleInfo (IMAGEHLP.@)
*/
BOOL WINAPI SymGetModuleInfo(
HANDLE hProcess, DWORD dwAddr,
PIMAGEHLP_MODULE ModuleInfo)
{
FIXME("(%p, 0x%08lx, %p): stub\n",
hProcess, dwAddr, ModuleInfo
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetOptions (IMAGEHLP.@)
*/
DWORD WINAPI SymGetOptions()
{
FIXME("(): stub\n");
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* SymGetSearchPath (IMAGEHLP.@)
*/
BOOL WINAPI SymGetSearchPath(
HANDLE hProcess, LPSTR szSearchPath, DWORD SearchPathLength)
{
FIXME("(%p, %s, %ld): stub\n",
hProcess, debugstr_an(szSearchPath,SearchPathLength), SearchPathLength
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetSymFromAddr (IMAGEHLP.@)
*/
BOOL WINAPI SymGetSymFromAddr(
HANDLE hProcess, DWORD dwAddr,
PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol)
{
FIXME("(%p, 0x%08lx, %p, %p): stub\n",
hProcess, dwAddr, pdwDisplacement, Symbol
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetSymFromName (IMAGEHLP.@)
*/
BOOL WINAPI SymGetSymFromName(
HANDLE hProcess, LPSTR Name, PIMAGEHLP_SYMBOL Symbol)
{
FIXME("(%p, %s, %p): stub\n", hProcess, Name, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetSymNext (IMAGEHLP.@)
*/
BOOL WINAPI SymGetSymNext(
HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol)
{
FIXME("(%p, %p): stub\n", hProcess, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymGetSymPrev (IMAGEHLP.@)
*/
BOOL WINAPI SymGetSymPrev(
HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol)
{
FIXME("(%p, %p): stub\n", hProcess, Symbol);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymInitialize (IMAGEHLP.@)
*/
BOOL WINAPI SymInitialize(
HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess)
{
FIXME("(%p, %s, %d): stub\n",
hProcess, debugstr_a(UserSearchPath), fInvadeProcess
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymLoadModule (IMAGEHLP.@)
*/
BOOL WINAPI SymLoadModule(
HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName,
DWORD BaseOfDll, DWORD SizeOfDll)
{
FIXME("(%p, %p, %s, %s, %ld, %ld): stub\n",
hProcess, hFile, debugstr_a(ImageName), debugstr_a(ModuleName),
BaseOfDll, SizeOfDll
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymRegisterCallback (IMAGEHLP.@)
*/
BOOL WINAPI SymRegisterCallback(
HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
PVOID UserContext)
{
FIXME("(%p, %p, %p): stub\n",
hProcess, CallbackFunction, UserContext
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymSetOptions (IMAGEHLP.@)
*/
DWORD WINAPI SymSetOptions(DWORD SymOptions)
{
FIXME("(0x%08lx): stub\n", SymOptions);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return 0;
}
/***********************************************************************
* SymSetSearchPath (IMAGEHLP.@)
*/
BOOL WINAPI SymSetSearchPath(HANDLE hProcess, LPSTR szSearchPath)
{
FIXME("(%p, %s): stub\n",
hProcess, debugstr_a(szSearchPath)
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymUnDName (IMAGEHLP.@)
*/
BOOL WINAPI SymUnDName(
PIMAGEHLP_SYMBOL sym, LPSTR UnDecName, DWORD UnDecNameLength)
{
FIXME("(%p, %s, %ld): stub\n",
sym, UnDecName, UnDecNameLength
);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}
/***********************************************************************
* SymUnloadModule (IMAGEHLP.@)
*/
BOOL WINAPI SymUnloadModule(
HANDLE hProcess, DWORD BaseOfDll)
{
FIXME("(%p, 0x%08lx): stub\n", hProcess, BaseOfDll);
SetLastError(ERROR_CALL_NOT_IMPLEMENTED);
return FALSE;
}

View File

@ -104,6 +104,16 @@ typedef enum _ADRESS_MODE {
#define SYMF_OMAP_GENERATED 0x00000001 #define SYMF_OMAP_GENERATED 0x00000001
#define SYMF_OMAP_MODIFIED 0x00000002 #define SYMF_OMAP_MODIFIED 0x00000002
/* 0x00000004 has been obsoleted */
#define SYMF_REGISTER 0x00000008
#define SYMF_REGREL 0x00000010
#define SYMF_FRAMEREL 0x00000020
#define SYMF_PARAMETER 0x00000040
#define SYMF_LOCAL 0x00000080
#define SYMF_CONSTANT 0x00000100
#define SYMF_EXPORT 0x00000200
#define SYMF_FORWARDER 0x00000400
#define SYMF_FUNCTION 0x00000800
typedef enum { typedef enum {
SymNone, SymNone,
@ -112,7 +122,10 @@ typedef enum {
SymPdb, SymPdb,
SymExport, SymExport,
SymDeferred, SymDeferred,
SymSym /* .sym file */ SymSym,
SymDia,
SymVirtual,
NumSymTypes
} SYM_TYPE; } SYM_TYPE;
#define UNDNAME_COMPLETE 0x0000 #define UNDNAME_COMPLETE 0x0000
@ -244,6 +257,27 @@ typedef struct _STACKFRAME {
KDHELP KdHelp; KDHELP KdHelp;
} STACKFRAME, *LPSTACKFRAME; } STACKFRAME, *LPSTACKFRAME;
typedef struct _SOURCEFILE {
DWORD64 ModBase;
PCHAR FileName;
} SOURCEFILE, *PSOURCEFILE;
typedef struct _IMAGEHLP_STACK_FRAME
{
DWORD InstructionOffset;
DWORD ReturnOffset;
DWORD FrameOffset;
DWORD StackOffset;
DWORD BackingStoreOffset;
DWORD FuncTableEntry;
DWORD Params[4];
DWORD Reserved[5];
DWORD Virtual;
DWORD Reserved2;
} IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
typedef struct _IMAGEHLP_SYMBOL { typedef struct _IMAGEHLP_SYMBOL {
DWORD SizeOfStruct; DWORD SizeOfStruct;
DWORD Address; DWORD Address;
@ -290,6 +324,33 @@ typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
ULONG SelectedSymbol; ULONG SelectedSymbol;
} IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL; } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
#define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
#define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
#define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
#define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
#define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
#define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
#define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
#define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
typedef struct _SYMBOL_INFO {
ULONG SizeOfStruct;
ULONG TypeIndex;
ULONG64 Reserved[2];
ULONG info;
ULONG Size;
ULONG64 ModBase;
ULONG Flags;
ULONG64 Value;
ULONG64 Address;
ULONG Register;
ULONG Scope;
ULONG Tag;
ULONG NameLen;
ULONG MaxNameLen;
CHAR Name[1];
} SYMBOL_INFO, *PSYMBOL_INFO;
/*********************************************************************** /***********************************************************************
* Callbacks * Callbacks
*/ */
@ -299,6 +360,14 @@ typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
ULONG Va, ULONG Parameter ULONG Va, ULONG Parameter
); );
typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
PSYMBOL_INFO pSymInfo, DWORD SymbolSize, PVOID UserContext
);
typedef BOOL (CALLBACK *PSYM_ENUMSOURCFILES_CALLBACK)(
PSOURCEFILE pSourceFile, PVOID UserContext
);
typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)( typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
LPSTR ModuleName, ULONG BaseOfDll, PVOID UserContext LPSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
); );
@ -481,6 +550,14 @@ BOOL WINAPI SymEnumerateSymbols(
HANDLE hProcess, DWORD BaseOfDll, HANDLE hProcess, DWORD BaseOfDll,
PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
); );
BOOL WINAPI SymEnumSourceFiles(
HANDLE hProcess, DWORD ModBase, LPSTR Mask,
PSYM_ENUMSOURCFILES_CALLBACK cbSrcFiles, PVOID UserContext
);
BOOL WINAPI SymEnumSymbols(
HANDLE hProcess, DWORD BaseOfDll, PCSTR Mask,
PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
);
PVOID WINAPI SymFunctionTableAccess( PVOID WINAPI SymFunctionTableAccess(
HANDLE hProcess, DWORD AddrBase HANDLE hProcess, DWORD AddrBase
); );
@ -513,7 +590,7 @@ BOOL WINAPI SymGetSymPrev(
BOOL WINAPI SymInitialize( BOOL WINAPI SymInitialize(
HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess
); );
BOOL WINAPI SymLoadModule( DWORD WINAPI SymLoadModule(
HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName, HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName,
DWORD BaseOfDll, DWORD SizeOfDll DWORD BaseOfDll, DWORD SizeOfDll
); );
@ -521,6 +598,10 @@ BOOL WINAPI SymRegisterCallback(
HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction, HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
PVOID UserContext PVOID UserContext
); );
DWORD WINAPI SymSetContext(
HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame,
PIMAGEHLP_CONTEXT Context
);
DWORD WINAPI SymSetOptions( DWORD WINAPI SymSetOptions(
DWORD SymOptions DWORD SymOptions
); );