winex11.drv: Move the TRACE before the return. Found by Smatch.
[wine/hacks.git] / include / imagehlp.h
blob89883d9f7521b89fadb3e40e54ba5aa84bfca378
1 /*
2 * Declarations for IMAGEHLP
4 * Copyright (C) 1998 Patrik Stridvall
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_IMAGEHLP_H
22 #define __WINE_IMAGEHLP_H
24 #include <wintrust.h>
26 #ifdef __cplusplus
27 extern "C" {
28 #endif /* defined(__cplusplus) */
30 #define API_VERSION_NUMBER 7 /* 7 is the default */
32 /***********************************************************************
33 * Types
36 typedef PVOID DIGEST_HANDLE;
38 /***********************************************************************
39 * Enums/Defines
42 typedef enum _IMAGEHLP_STATUS_REASON {
43 BindOutOfMemory,
44 BindRvaToVaFailed,
45 BindNoRoomInImage,
46 BindImportModuleFailed,
47 BindImportProcedureFailed,
48 BindImportModule,
49 BindImportProcedure,
50 BindForwarder,
51 BindForwarderNOT,
52 BindImageModified,
53 BindExpandFileHeaders,
54 BindImageComplete,
55 BindMismatchedSymbols,
56 BindSymbolsNotUpdated
57 } IMAGEHLP_STATUS_REASON;
59 #define BIND_NO_BOUND_IMPORTS 0x00000001
60 #define BIND_NO_UPDATE 0x00000002
61 #define BIND_ALL_IMAGES 0x00000004
62 #define BIND_CACHE_IMPORT_DLLS 0x00000008
64 #define CERT_PE_IMAGE_DIGEST_DEBUG_INFO 0x01
65 #define CERT_PE_IMAGE_DIGEST_RESOURCES 0x02
66 #define CERT_PE_IMAGE_DIGEST_ALL_IMPORT_INFO 0x04
67 #define CERT_PE_IMAGE_DIGEST_NON_PE_INFO 0x08
69 #define CERT_SECTION_TYPE_ANY 0xFF
71 #define WIN_CERT_REVISION_1_0 0x0100
72 #define WIN_CERT_REVISION_2_0 0x0200
74 #define WIN_CERT_TYPE_X509 0x0001 /* X.509 Certificate */
75 #define WIN_CERT_TYPE_PKCS_SIGNED_DATA 0x0002 /* PKCS SignedData */
76 #define WIN_CERT_TYPE_RESERVED_1 0x0003 /* Reserved */
78 #define SPLITSYM_REMOVE_PRIVATE 0x00000001
79 #define SPLITSYM_EXTRACT_ALL 0x00000002
80 #define SPLITSYM_SYMBOLPATH_IS_SRC 0x00000004
82 #define FRAME_FPO 0
83 #define FRAME_TRAP 1
84 #define FRAME_TSS 2
85 #define FRAME_NONFPO 3
87 #define CHECKSUM_SUCCESS 0
88 #define CHECKSUM_OPEN_FAILURE 1
89 #define CHECKSUM_MAP_FAILURE 2
90 #define CHECKSUM_MAPVIEW_FAILURE 3
91 #define CHECKSUM_UNICODE_FAILURE 4
93 typedef enum _ADDRESS_MODE {
94 AddrMode1616,
95 AddrMode1632,
96 AddrModeReal,
97 AddrModeFlat
98 } ADDRESS_MODE;
100 #define SYMOPT_CASE_INSENSITIVE 0x00000001
101 #define SYMOPT_UNDNAME 0x00000002
102 #define SYMOPT_DEFERRED_LOADS 0x00000004
103 #define SYMOPT_NO_CPP 0x00000008
104 #define SYMOPT_LOAD_LINES 0x00000010
105 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
107 #define SYMF_OMAP_GENERATED 0x00000001
108 #define SYMF_OMAP_MODIFIED 0x00000002
109 /* 0x00000004 has been obsoleted */
110 #define SYMF_REGISTER 0x00000008
111 #define SYMF_REGREL 0x00000010
112 #define SYMF_FRAMEREL 0x00000020
113 #define SYMF_PARAMETER 0x00000040
114 #define SYMF_LOCAL 0x00000080
115 #define SYMF_CONSTANT 0x00000100
116 #define SYMF_EXPORT 0x00000200
117 #define SYMF_FORWARDER 0x00000400
118 #define SYMF_FUNCTION 0x00000800
120 typedef enum {
121 SymNone,
122 SymCoff,
123 SymCv,
124 SymPdb,
125 SymExport,
126 SymDeferred,
127 SymSym,
128 SymDia,
129 SymVirtual,
130 NumSymTypes
131 } SYM_TYPE;
133 #define UNDNAME_COMPLETE 0x0000
134 #define UNDNAME_NO_LEADING_UNDERSCORES 0x0001
135 #define UNDNAME_NO_MS_KEYWORDS 0x0002
136 #define UNDNAME_NO_FUNCTION_RETURNS 0x0004
137 #define UNDNAME_NO_ALLOCATION_MODEL 0x0008
138 #define UNDNAME_NO_ALLOCATION_LANGUAGE 0x0010
139 #define UNDNAME_NO_MS_THISTYPE 0x0020
140 #define UNDNAME_NO_CV_THISTYPE 0x0040
141 #define UNDNAME_NO_THISTYPE 0x0060
142 #define UNDNAME_NO_ACCESS_SPECIFIERS 0x0080
143 #define UNDNAME_NO_THROW_SIGNATURES 0x0100
144 #define UNDNAME_NO_MEMBER_TYPE 0x0200
145 #define UNDNAME_NO_RETURN_UDT_MODEL 0x0400
146 #define UNDNAME_32_BIT_DECODE 0x0800
147 #define UNDNAME_NAME_ONLY 0x1000
148 #define UNDNAME_NO_ARGUMENTS 0x2000
149 #define UNDNAME_NO_SPECIAL_SYMS 0x4000
151 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
152 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
153 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
154 #define CBA_SYMBOLS_UNLOADED 0x00000004
155 #define CBA_DUPLICATE_SYMBOL 0x00000005
157 /***********************************************************************
158 * Structures
161 typedef struct _LOADED_IMAGE
163 PSTR ModuleName;
164 HANDLE hFile;
165 PUCHAR MappedAddress;
166 PIMAGE_NT_HEADERS FileHeader;
167 PIMAGE_SECTION_HEADER LastRvaSection;
168 ULONG NumberOfSections;
169 PIMAGE_SECTION_HEADER Sections;
170 ULONG Characteristics;
171 BOOLEAN fSystemImage;
172 BOOLEAN fDOSImage;
173 BOOLEAN fReadOnly;
174 UCHAR Version;
175 LIST_ENTRY Links;
176 ULONG SizeOfImage;
177 } LOADED_IMAGE, *PLOADED_IMAGE;
179 typedef struct _WIN_CERTIFICATE {
180 DWORD dwLength;
181 WORD wRevision; /* WIN_CERT_REVISON_xxx */
182 WORD wCertificateType; /* WIN_CERT_TYPE_xxx */
183 BYTE bCertificate[ANYSIZE_ARRAY];
184 } WIN_CERTIFICATE, *PWIN_CERTIFICATE;
186 typedef struct _API_VERSION {
187 USHORT MajorVersion;
188 USHORT MinorVersion;
189 USHORT Revision;
190 USHORT Reserved;
191 } API_VERSION, *LPAPI_VERSION;
193 typedef struct _IMAGE_DEBUG_INFORMATION {
194 LIST_ENTRY List;
195 DWORD Size;
196 PVOID MappedBase;
197 USHORT Machine;
198 USHORT Characteristics;
199 DWORD CheckSum;
200 DWORD ImageBase;
201 DWORD SizeOfImage;
203 DWORD NumberOfSections;
204 PIMAGE_SECTION_HEADER Sections;
206 DWORD ExportedNamesSize;
207 LPSTR ExportedNames;
209 DWORD NumberOfFunctionTableEntries;
210 PIMAGE_FUNCTION_ENTRY FunctionTableEntries;
211 DWORD LowestFunctionStartingAddress;
212 DWORD HighestFunctionEndingAddress;
214 DWORD NumberOfFpoTableEntries;
215 PFPO_DATA FpoTableEntries;
217 DWORD SizeOfCoffSymbols;
218 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
220 DWORD SizeOfCodeViewSymbols;
221 PVOID CodeViewSymbols;
223 LPSTR ImageFilePath;
224 LPSTR ImageFileName;
225 LPSTR DebugFilePath;
227 DWORD TimeDateStamp;
229 BOOL RomImage;
230 PIMAGE_DEBUG_DIRECTORY DebugDirectory;
231 DWORD NumberOfDebugDirectories;
233 DWORD Reserved[3];
234 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
236 typedef struct _ADDRESS {
237 DWORD Offset;
238 WORD Segment;
239 ADDRESS_MODE Mode;
240 } ADDRESS, *PADDRESS;
242 typedef struct _ADDRESS64 {
243 DWORD64 Offset;
244 WORD Segment;
245 ADDRESS_MODE Mode;
246 } ADDRESS64, *LPADDRESS64;
248 typedef struct _KDHELP {
249 DWORD Thread;
250 DWORD ThCallbackStack;
251 DWORD NextCallback;
252 DWORD FramePointer;
253 DWORD KiCallUserMode;
254 DWORD KeUserCallbackDispatcher;
255 DWORD SystemRangeStart;
256 } KDHELP, *PKDHELP;
258 typedef struct _KDHELP64 {
259 DWORD64 Thread;
260 DWORD ThCallbackStack;
261 DWORD ThCallbackBStore;
262 DWORD NextCallback;
263 DWORD FramePointer;
264 DWORD64 KiCallUserMode;
265 DWORD64 KeUserCallbackDispatcher;
266 DWORD64 SystemRangeStart;
267 DWORD64 Reserved[8];
268 } KDHELP64, *PKDHELP64;
270 typedef struct _STACKFRAME {
271 ADDRESS AddrPC;
272 ADDRESS AddrReturn;
273 ADDRESS AddrFrame;
274 ADDRESS AddrStack;
275 PVOID FuncTableEntry;
276 DWORD Params[4];
277 BOOL Far;
278 BOOL Virtual;
279 DWORD Reserved[3];
280 KDHELP KdHelp;
281 } STACKFRAME, *LPSTACKFRAME;
283 typedef struct _STACKFRAME64 {
284 ADDRESS64 AddrPC;
285 ADDRESS64 AddrReturn;
286 ADDRESS64 AddrFrame;
287 ADDRESS64 AddrStack;
288 ADDRESS64 AddrBStore;
289 PVOID FuncTableEntry;
290 DWORD64 Params[4];
291 BOOL Far;
292 BOOL Virtual;
293 DWORD64 Reserved[3];
294 KDHELP64 KdHelp;
295 } STACKFRAME64, *LPSTACKFRAME64;
297 typedef struct _SOURCEFILE {
298 DWORD64 ModBase;
299 PCHAR FileName;
300 } SOURCEFILE, *PSOURCEFILE;
302 typedef struct _IMAGEHLP_STACK_FRAME
304 DWORD InstructionOffset;
305 DWORD ReturnOffset;
306 DWORD FrameOffset;
307 DWORD StackOffset;
308 DWORD BackingStoreOffset;
309 DWORD FuncTableEntry;
310 DWORD Params[4];
311 DWORD Reserved[5];
312 DWORD Virtual;
313 DWORD Reserved2;
314 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
316 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
318 typedef struct _IMAGEHLP_SYMBOL {
319 DWORD SizeOfStruct;
320 DWORD Address;
321 DWORD Size;
322 DWORD Flags;
323 DWORD MaxNameLength;
324 CHAR Name[ANYSIZE_ARRAY];
325 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
327 typedef struct _IMAGEHLP_MODULE {
328 DWORD SizeOfStruct;
329 DWORD BaseOfImage;
330 DWORD ImageSize;
331 DWORD TimeDateStamp;
332 DWORD CheckSum;
333 DWORD NumSyms;
334 SYM_TYPE SymType;
335 CHAR ModuleName[32];
336 CHAR ImageName[256];
337 CHAR LoadedImageName[256];
338 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
340 typedef struct _IMAGEHLP_LINE {
341 DWORD SizeOfStruct;
342 DWORD Key;
343 DWORD LineNumber;
344 PCHAR FileName;
345 DWORD Address;
346 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
348 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD {
349 DWORD SizeOfStruct;
350 DWORD BaseOfImage;
351 DWORD CheckSum;
352 DWORD TimeDateStamp;
353 CHAR FileName[MAX_PATH];
354 BOOLEAN Reparse;
355 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
357 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL {
358 DWORD SizeOfStruct;
359 DWORD NumberOfDups;
360 PIMAGEHLP_SYMBOL Symbol;
361 ULONG SelectedSymbol;
362 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
364 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
365 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER
366 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL
367 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL
368 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER
369 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL
370 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT
371 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION
373 typedef struct _SYMBOL_INFO {
374 ULONG SizeOfStruct;
375 ULONG TypeIndex;
376 ULONG64 Reserved[2];
377 ULONG info;
378 ULONG Size;
379 ULONG64 ModBase;
380 ULONG Flags;
381 ULONG64 Value;
382 ULONG64 Address;
383 ULONG Register;
384 ULONG Scope;
385 ULONG Tag;
386 ULONG NameLen;
387 ULONG MaxNameLen;
388 CHAR Name[1];
389 } SYMBOL_INFO, *PSYMBOL_INFO;
391 /***********************************************************************
392 * Callbacks
395 typedef BOOL (CALLBACK *PIMAGEHLP_STATUS_ROUTINE)(
396 IMAGEHLP_STATUS_REASON Reason, LPSTR ImageName, LPSTR DllName,
397 ULONG Va, ULONG Parameter
400 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(
401 PSYMBOL_INFO pSymInfo, DWORD SymbolSize, PVOID UserContext
404 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(
405 PSOURCEFILE pSourceFile, PVOID UserContext
408 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(
409 LPSTR ModuleName, ULONG BaseOfDll, PVOID UserContext
412 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(
413 LPSTR SymbolName, ULONG SymbolAddress, ULONG SymbolSize,
414 PVOID UserContext
417 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(
418 LPSTR ModuleName, ULONG ModuleBase, ULONG ModuleSize,
419 PVOID UserContext
422 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(
423 HANDLE hProcess, ULONG ActionCode, PVOID CallbackData,
424 PVOID UserContext
427 typedef BOOL (CALLBACK *DIGEST_FUNCTION)(
428 DIGEST_HANDLE refdata, PBYTE pData, DWORD dwLength
431 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(
432 HANDLE hProcess, LPCVOID lpBaseAddress, PVOID lpBuffer,
433 DWORD nSize, PDWORD lpNumberOfBytesRead
436 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)(
437 HANDLE hProcess, DWORD64 lpBaseAddress, PVOID lpBuffer,
438 DWORD nSize, LPDWORD lpNumberOfBytesRead
441 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(
442 HANDLE hProcess, DWORD AddrBase
445 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(
446 HANDLE hProcess, DWORD64 AddrBase
449 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(
450 HANDLE hProcess, DWORD ReturnAddress);
452 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(
453 HANDLE hProcess, DWORD64 ReturnAddress);
455 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(
456 HANDLE hProcess, HANDLE hThread, PADDRESS lpaddr
459 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(
460 HANDLE hProcess, HANDLE hThread, LPADDRESS64 lpaddr
463 /***********************************************************************
464 * Functions
467 BOOL WINAPI BindImage(
468 LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath
470 BOOL WINAPI BindImageEx(
471 DWORD Flags, LPSTR ImageName, LPSTR DllPath, LPSTR SymbolPath,
472 PIMAGEHLP_STATUS_ROUTINE StatusRoutine
474 PIMAGE_NT_HEADERS WINAPI CheckSumMappedFile(
475 LPVOID BaseAddress, DWORD FileLength,
476 LPDWORD HeaderSum, LPDWORD CheckSum
478 BOOL WINAPI EnumerateLoadedModules(
479 HANDLE hProcess,
480 PENUMLOADED_MODULES_CALLBACK EnumLoadedModulesCallback,
481 PVOID UserContext
483 HANDLE WINAPI FindDebugInfoFile(
484 LPSTR FileName, LPSTR SymbolPath, LPSTR DebugFilePath
486 HANDLE WINAPI FindExecutableImage(
487 LPSTR FileName, LPSTR SymbolPath, LPSTR ImageFilePath
489 BOOL WINAPI GetImageConfigInformation(
490 PLOADED_IMAGE LoadedImage,
491 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
493 DWORD WINAPI GetImageUnusedHeaderBytes(
494 PLOADED_IMAGE LoadedImage,
495 LPDWORD SizeUnusedHeaderBytes
497 DWORD WINAPI GetTimestampForLoadedLibrary(
498 HMODULE Module
500 BOOL WINAPI ImageAddCertificate(
501 HANDLE FileHandle, PWIN_CERTIFICATE Certificate, PDWORD Index
503 PVOID WINAPI ImageDirectoryEntryToData(
504 PVOID Base, BOOLEAN MappedAsImage, USHORT DirectoryEntry, PULONG Size
506 BOOL WINAPI ImageEnumerateCertificates(
507 HANDLE FileHandle, WORD TypeFilter, PDWORD CertificateCount,
508 PDWORD Indices, DWORD IndexCount
510 BOOL WINAPI ImageGetCertificateData(
511 HANDLE FileHandle, DWORD CertificateIndex,
512 PWIN_CERTIFICATE Certificate, PDWORD RequiredLength
514 BOOL WINAPI ImageGetCertificateHeader(
515 HANDLE FileHandle, DWORD CertificateIndex,
516 PWIN_CERTIFICATE Certificateheader
518 BOOL WINAPI ImageGetDigestStream(
519 HANDLE FileHandle, DWORD DigestLevel,
520 DIGEST_FUNCTION DigestFunction, DIGEST_HANDLE DigestHandle
522 PLOADED_IMAGE WINAPI ImageLoad(
523 LPSTR DllName, LPSTR DllPath
525 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(
526 PVOID Base
528 BOOL WINAPI ImageRemoveCertificate(
529 HANDLE FileHandle, DWORD Index
531 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(
532 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva
534 PVOID WINAPI ImageRvaToVa(
535 PIMAGE_NT_HEADERS NtHeaders, PVOID Base, ULONG Rva,
536 PIMAGE_SECTION_HEADER *LastRvaSection
538 BOOL WINAPI ImageUnload(
539 PLOADED_IMAGE LoadedImage
541 LPAPI_VERSION WINAPI ImagehlpApiVersion(
542 void
544 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(
545 LPAPI_VERSION AppVersion
547 BOOL WINAPI MakeSureDirectoryPathExists(
548 LPCSTR DirPath
550 BOOL WINAPI MapAndLoad(
551 LPSTR ImageName, LPSTR DllPath, PLOADED_IMAGE LoadedImage,
552 BOOL DotDll, BOOL ReadOnly
554 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(
555 HANDLE FileHandle, LPSTR FileName,
556 LPSTR SymbolPath, DWORD ImageBase
558 DWORD WINAPI MapFileAndCheckSumA(
559 LPSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
561 DWORD WINAPI MapFileAndCheckSumW(
562 LPWSTR Filename, LPDWORD HeaderSum, LPDWORD CheckSum
564 BOOL WINAPI ReBaseImage(
565 LPSTR CurrentImageName, LPSTR SymbolPath, BOOL fReBase,
566 BOOL fRebaseSysfileOk, BOOL fGoingDown, ULONG CheckImageSize,
567 ULONG *OldImageSize, ULONG *OldImageBase, ULONG *NewImageSize,
568 ULONG *NewImageBase, ULONG TimeStamp
570 BOOL WINAPI RemovePrivateCvSymbolic(
571 PCHAR DebugData, PCHAR *NewDebugData, ULONG *NewDebugSize
573 VOID WINAPI RemoveRelocations(
574 PCHAR ImageName
576 BOOL WINAPI SearchTreeForFile(
577 LPSTR RootPath, LPSTR InputPathName, LPSTR OutputPathBuffer
579 BOOL WINAPI SetImageConfigInformation(
580 PLOADED_IMAGE LoadedImage,
581 PIMAGE_LOAD_CONFIG_DIRECTORY ImageConfigInformation
583 BOOL WINAPI SplitSymbols(
584 LPSTR ImageName, LPSTR SymbolsPath,
585 LPSTR SymbolFilePath, DWORD Flags
587 BOOL WINAPI StackWalk(
588 DWORD MachineType, HANDLE hProcess, HANDLE hThread,
589 LPSTACKFRAME StackFrame, PVOID ContextRecord,
590 PREAD_PROCESS_MEMORY_ROUTINE ReadMemoryRoutine,
591 PFUNCTION_TABLE_ACCESS_ROUTINE FunctionTableAccessRoutine,
592 PGET_MODULE_BASE_ROUTINE GetModuleBaseRoutine,
593 PTRANSLATE_ADDRESS_ROUTINE TranslateAddress
595 BOOL WINAPI StackWalk64(
596 DWORD MachineType, HANDLE hProcess, HANDLE hThread,
597 LPSTACKFRAME64 StackFrame, PVOID ContextRecord,
598 PREAD_PROCESS_MEMORY_ROUTINE64 ReadMemoryRoutine,
599 PFUNCTION_TABLE_ACCESS_ROUTINE64 FunctionTableAccessRoutine,
600 PGET_MODULE_BASE_ROUTINE64 GetModuleBaseRoutine,
601 PTRANSLATE_ADDRESS_ROUTINE64 TranslateAddress
603 BOOL WINAPI SymCleanup(
604 HANDLE hProcess
606 BOOL WINAPI SymEnumerateModules(
607 HANDLE hProcess, PSYM_ENUMMODULES_CALLBACK EnumModulesCallback,
608 PVOID UserContext
610 BOOL WINAPI SymEnumerateSymbols(
611 HANDLE hProcess, DWORD BaseOfDll,
612 PSYM_ENUMSYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
614 BOOL WINAPI SymEnumSourceFiles(
615 HANDLE hProcess, DWORD ModBase, LPSTR Mask,
616 PSYM_ENUMSOURCEFILES_CALLBACK cbSrcFiles, PVOID UserContext
618 BOOL WINAPI SymEnumSymbols(
619 HANDLE hProcess, DWORD BaseOfDll, PCSTR Mask,
620 PSYM_ENUMERATESYMBOLS_CALLBACK EnumSymbolsCallback, PVOID UserContext
622 PVOID WINAPI SymFunctionTableAccess(
623 HANDLE hProcess, DWORD AddrBase
625 DWORD WINAPI SymGetModuleBase(
626 HANDLE hProcess, DWORD dwAddr
628 BOOL WINAPI SymGetModuleInfo(
629 HANDLE hProcess, DWORD dwAddr,
630 PIMAGEHLP_MODULE ModuleInfo
632 DWORD WINAPI SymGetOptions(
633 void
635 BOOL WINAPI SymGetSearchPath(
636 HANDLE hProcess, LPSTR szSearchPath, DWORD SearchPathLength
638 BOOL WINAPI SymGetSymFromAddr(
639 HANDLE hProcess, DWORD dwAddr,
640 PDWORD pdwDisplacement, PIMAGEHLP_SYMBOL Symbol
642 BOOL WINAPI SymGetSymFromName(
643 HANDLE hProcess, LPSTR Name, PIMAGEHLP_SYMBOL Symbol
645 BOOL WINAPI SymGetSymNext(
646 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
648 BOOL WINAPI SymGetSymPrev(
649 HANDLE hProcess, PIMAGEHLP_SYMBOL Symbol
651 BOOL WINAPI SymInitialize(
652 HANDLE hProcess, LPSTR UserSearchPath, BOOL fInvadeProcess
654 DWORD WINAPI SymLoadModule(
655 HANDLE hProcess, HANDLE hFile, LPSTR ImageName, LPSTR ModuleName,
656 DWORD BaseOfDll, DWORD SizeOfDll
658 BOOL WINAPI SymRegisterCallback(
659 HANDLE hProcess, PSYMBOL_REGISTERED_CALLBACK CallbackFunction,
660 PVOID UserContext
662 DWORD WINAPI SymSetContext(
663 HANDLE hProcess, PIMAGEHLP_STACK_FRAME StackFrame,
664 PIMAGEHLP_CONTEXT Context
666 DWORD WINAPI SymSetOptions(
667 DWORD SymOptions
669 BOOL WINAPI SymSetSearchPath(
670 HANDLE hProcess, LPSTR szSearchPath
672 BOOL WINAPI SymUnDName(
673 PIMAGEHLP_SYMBOL sym, LPSTR UnDecName, DWORD UnDecNameLength
675 BOOL WINAPI SymUnloadModule(
676 HANDLE hProcess, DWORD BaseOfDll
678 BOOL WINAPI TouchFileTimes(
679 HANDLE FileHandle, LPSYSTEMTIME lpSystemTime
681 DWORD WINAPI UnDecorateSymbolName(
682 LPCSTR DecoratedName, LPSTR UnDecoratedName,
683 DWORD UndecoratedLength, DWORD Flags
685 BOOL WINAPI UnMapAndLoad(
686 PLOADED_IMAGE LoadedImage
688 BOOL WINAPI UnmapDebugInformation(
689 PIMAGE_DEBUG_INFORMATION DebugInfo
691 BOOL WINAPI UpdateDebugInfoFile(
692 LPSTR ImageFileName, LPSTR SymbolPath,
693 LPSTR DebugFilePath, PIMAGE_NT_HEADERS NtHeaders
695 BOOL WINAPI UpdateDebugInfoFileEx(
696 LPSTR ImageFileName, LPSTR SymbolPath, LPSTR DebugFilePath,
697 PIMAGE_NT_HEADERS NtHeaders, DWORD OldChecksum
700 #ifdef __cplusplus
701 } /* extern "C" */
702 #endif /* defined(__cplusplus) */
704 #endif /* __WINE_IMAGEHLP_H */