2 * Declarations for DBGHELP
4 * Copyright (C) 2003 Eric Pouech
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_DBGHELP_H
22 #define __WINE_DBGHELP_H
26 #endif /* defined(__cplusplus) */
28 typedef struct _LOADED_IMAGE
33 PIMAGE_NT_HEADERS FileHeader;
34 PIMAGE_SECTION_HEADER LastRvaSection;
35 ULONG NumberOfSections;
36 PIMAGE_SECTION_HEADER Sections;
37 ULONG Characteristics;
42 } LOADED_IMAGE, *PLOADED_IMAGE;
44 /*************************
46 *************************/
56 typedef struct _tagADDRESS
61 } ADDRESS, *LPADDRESS;
63 #define SYMF_OMAP_GENERATED 0x00000001
64 #define SYMF_OMAP_MODIFIED 0x00000002
65 #define SYMF_USER_GENERATED 0x00000004
66 #define SYMF_REGISTER 0x00000008
67 #define SYMF_REGREL 0x00000010
68 #define SYMF_FRAMEREL 0x00000020
69 #define SYMF_PARAMETER 0x00000040
70 #define SYMF_LOCAL 0x00000080
71 #define SYMF_CONSTANT 0x00000100
72 #define SYMF_EXPORT 0x00000200
73 #define SYMF_FORWARDER 0x00000400
74 #define SYMF_FUNCTION 0x00000800
75 #define SYMF_VIRTUAL 0x00001000
76 #define SYMF_THUNK 0x00002000
77 #define SYMF_TLSREL 0x00004000
92 typedef struct _IMAGEHLP_SYMBOL
100 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
102 typedef struct _IMAGEHLP_MODULE
113 CHAR LoadedImageName[256];
114 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
116 typedef struct _IMAGEHLP_MODULEW {
124 WCHAR ModuleName[32];
125 WCHAR ImageName[256];
126 WCHAR LoadedImageName[256];
127 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
129 typedef struct _IMAGEHLP_LINE
136 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
138 typedef struct _SOURCEFILE
142 } SOURCEFILE, *PSOURCEFILE;
144 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
145 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
146 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
147 #define CBA_SYMBOLS_UNLOADED 0x00000004
148 #define CBA_DUPLICATE_SYMBOL 0x00000005
149 #define CBA_READ_MEMORY 0x00000006
150 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
151 #define CBA_SET_OPTIONS 0x00000008
152 #define CBA_EVENT 0x00000010
153 #define CBA_DEBUG_INFO 0x10000000
155 typedef struct _IMAGEHLP_CBA_READ_MEMORY
161 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY;
172 typedef struct _IMAGEHLP_CBA_EVENT
178 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT;
180 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
186 CHAR FileName[MAX_PATH];
188 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
190 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
194 PIMAGEHLP_SYMBOL Symbol;
195 DWORD SelectedSymbol;
196 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
198 #define SYMOPT_CASE_INSENSITIVE 0x00000001
199 #define SYMOPT_UNDNAME 0x00000002
200 #define SYMOPT_DEFERRED_LOADS 0x00000004
201 #define SYMOPT_NO_CPP 0x00000008
202 #define SYMOPT_LOAD_LINES 0x00000010
203 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
204 #define SYMOPT_LOAD_ANYTHING 0x00000040
205 #define SYMOPT_IGNORE_CVREC 0x00000080
206 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
207 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
208 #define SYMOPT_EXACT_SYMBOLS 0x00000400
209 #define SYMOPT_WILD_UNDERSCORE 0x00000800
210 #define SYMOPT_USE_DEFAULTS 0x00001000
211 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
212 #define SYMOPT_PUBLICS_ONLY 0x00004000
213 #define SYMOPT_NO_PUBLICS 0x00008000
214 #define SYMOPT_AUTO_PUBLICS 0x00010000
215 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
216 #define SYMOPT_SECURE 0x00040000
217 #define SYMOPT_NO_PROMPTS 0x00080000
219 #define SYMOPT_DEBUG 0x80000000
221 typedef struct _IMAGEHLP_STACK_FRAME
223 ULONG64 InstructionOffset;
224 ULONG64 ReturnOffset;
227 ULONG64 BackingStoreOffset;
228 ULONG64 FuncTableEntry;
233 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
235 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
237 #define DBHHEADER_DEBUGDIRS 0x1
238 typedef struct _DBGHELP_MODLOAD_DATA
245 } MODLOAD_DATA, *PMODLOAD_DATA;
247 /*************************
249 *************************/
253 #define MINIDUMP_SIGNATURE 0x4D444D50 /* 'PMDM' */
254 #define MINIDUMP_VERSION (42899)
257 typedef ULONG64 RVA64;
259 typedef enum _MINIDUMP_TYPE
261 MiniDumpNormal = 0x0000,
262 MiniDumpWithDataSegs = 0x0001,
263 MiniDumpWithFullMemory = 0x0002,
264 MiniDumpWithHandleData = 0x0004,
265 MiniDumpFilterMemory = 0x0008,
266 MiniDumpScanMemory = 0x0010
269 typedef enum _MINIDUMP_CALLBACK_TYPE
274 IncludeThreadCallback,
275 IncludeModuleCallback,
276 } MINIDUMP_CALLBACK_TYPE;
278 typedef struct _MINIDUMP_THREAD_CALLBACK
286 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
288 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
296 ULONGLONG BackingStoreBase;
297 ULONGLONG BackingStoreEnd;
298 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
300 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
303 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
305 typedef enum _THREAD_WRITE_FLAGS
307 ThreadWriteThread = 0x0001,
308 ThreadWriteStack = 0x0002,
309 ThreadWriteContext = 0x0004,
310 ThreadWriteBackingStore = 0x0008,
311 ThreadWriteInstructionWindow = 0x0010
312 } THREAD_WRITE_FLAGS;
314 typedef struct _MINIDUMP_MODULE_CALLBACK
317 ULONGLONG BaseOfImage;
321 VS_FIXEDFILEINFO VersionInfo;
323 ULONG SizeOfCvRecord;
325 ULONG SizeOfMiscRecord;
326 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
328 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
331 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
333 typedef enum _MODULE_WRITE_FLAGS
335 ModuleWriteModule = 0x0001,
336 ModuleWriteDataSeg = 0x0002,
337 ModuleWriteMiscRecord = 0x0004,
338 ModuleWriteCvRecord = 0x0008,
339 ModuleReferencedByMemory = 0x0010
340 } MODULE_WRITE_FLAGS;
342 typedef struct _MINIDUMP_CALLBACK_INPUT
345 HANDLE ProcessHandle;
349 MINIDUMP_THREAD_CALLBACK Thread;
350 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
351 MINIDUMP_MODULE_CALLBACK Module;
352 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
353 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
355 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
357 typedef struct _MINIDUMP_CALLBACK_OUTPUT
361 ULONG ModuleWriteFlags;
362 ULONG ThreadWriteFlags;
364 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
366 typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID CallbackParam,
367 const PMINIDUMP_CALLBACK_INPUT CallbackInput,
368 PMINIDUMP_CALLBACK_OUTPUT CallbackOutput);
370 typedef struct _MINIDUMP_CALLBACK_INFORMATION
372 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
374 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
376 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
380 } MINIDUMP_LOCATION_DESCRIPTOR;
382 typedef struct _MINIDUMP_DIRECTORY
385 MINIDUMP_LOCATION_DESCRIPTOR Location;
386 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
388 typedef struct _MINIDUMP_EXCEPTION
391 ULONG ExceptionFlags;
392 ULONGLONG ExceptionRecord;
393 ULONGLONG ExceptionAddress;
394 ULONG NumberParameters;
395 ULONG __unusedAlignment;
396 ULONGLONG ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
397 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
399 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
402 PEXCEPTION_POINTERS ExceptionPointers;
404 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
406 typedef struct MINIDUMP_EXCEPTION_STREAM
410 MINIDUMP_EXCEPTION ExceptionRecord;
411 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
412 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
414 typedef struct _MINIDUMP_HEADER
418 DWORD NumberOfStreams;
419 RVA StreamDirectoryRva;
427 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
429 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
431 ULONGLONG StartOfMemoryRange;
432 MINIDUMP_LOCATION_DESCRIPTOR Memory;
433 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
435 typedef struct _MINIDUMP_MODULE
437 ULONGLONG BaseOfImage;
442 VS_FIXEDFILEINFO VersionInfo;
443 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
444 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
447 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
449 typedef struct _MINIDUMP_MODULE_LIST
451 ULONG NumberOfModules;
452 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */
453 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
455 typedef struct _MINIDUMP_USER_STREAM
460 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
462 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
464 ULONG UserStreamCount;
465 PMINIDUMP_USER_STREAM UserStreamArray;
466 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
468 typedef enum _MINIDUMP_STREAM_TYPE
473 ThreadListStream = 3,
474 ModuleListStream = 4,
475 MemoryListStream = 5,
477 SystemInfoStream = 7,
478 ThreadExListStream = 8,
479 Memory64ListStream = 9,
482 HandleDataStream = 12,
483 FunctionTableStream = 13,
485 LastReservedStream = 0xffff
486 } MINIDUMP_STREAM_TYPE;
488 typedef struct _MINIDUMP_SYSTEM_INFO
490 USHORT ProcessorArchitecture;
491 USHORT ProcessorLevel;
492 USHORT ProcessorRevision;
502 union _CPU_INFORMATION
507 ULONG VersionInformation;
508 ULONG FeatureInformation;
509 ULONG AMDExtendedCpuFeatures;
513 ULONGLONG ProcessorFeatures[2];
517 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
519 typedef struct _MINIDUMP_THREAD
526 MINIDUMP_MEMORY_DESCRIPTOR Stack;
527 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
528 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
530 typedef struct _MINIDUMP_THREAD_LIST
532 ULONG NumberOfThreads;
533 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */
534 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
536 BOOL WINAPI MiniDumpWriteDump(HANDLE,DWORD,HANDLE,MINIDUMP_TYPE,const PMINIDUMP_EXCEPTION_INFORMATION,
537 const PMINIDUMP_USER_STREAM_INFORMATION,const PMINIDUMP_CALLBACK_INFORMATION);
538 BOOL WINAPI MiniDumpReadDumpStream(PVOID,ULONG,PMINIDUMP_DIRECTORY*,PVOID*,ULONG*);
541 /*************************
543 *************************/
544 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PSTR, DWORD, ULONG, PVOID);
545 BOOL WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
546 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, DWORD, PVOID);
547 BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
548 BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
549 BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
550 DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
551 DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PSTR, PSTR, DWORD, DWORD);
552 DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PSTR, PSTR, DWORD64, DWORD,
553 PMODLOAD_DATA, DWORD);
554 BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
556 /*************************
558 *************************/
560 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
561 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
562 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
563 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
564 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
565 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
566 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
567 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
569 #define SYMFLAG_VALUEPRESENT 0x00000001
570 #define SYMFLAG_REGISTER 0x00000008
571 #define SYMFLAG_REGREL 0x00000010
572 #define SYMFLAG_FRAMEREL 0x00000020
573 #define SYMFLAG_PARAMETER 0x00000040
574 #define SYMFLAG_LOCAL 0x00000080
575 #define SYMFLAG_CONSTANT 0x00000100
576 #define SYMFLAG_EXPORT 0x00000200
577 #define SYMFLAG_FORWARDER 0x00000400
578 #define SYMFLAG_FUNCTION 0x00000800
579 #define SYMFLAG_VIRTUAL 0x00001000
580 #define SYMFLAG_THUNK 0x00002000
581 #define SYMFLAG_TLSREL 0x00004000
583 typedef struct _SYMBOL_INFO
588 ULONG info; /* sdk states info, while MSDN says it's Index... */
600 } SYMBOL_INFO, *PSYMBOL_INFO;
602 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
610 TI_GET_ARRAYINDEXTYPEID,
613 TI_GET_ADDRESSOFFSET,
617 TI_GET_CHILDRENCOUNT,
619 TI_GET_VIRTUALBASECLASS,
620 TI_GET_VIRTUALTABLESHAPEID,
621 TI_GET_VIRTUALBASEPOINTEROFFSET,
622 TI_GET_CLASSPARENTID,
625 TI_GET_LEXICALPARENT,
630 TI_GET_CALLING_CONVENTION,
631 } IMAGEHLP_SYMBOL_TYPE_INFO;
633 typedef struct _TI_FINDCHILDREN_PARAMS
638 } TI_FINDCHILDREN_PARAMS;
640 #define UNDNAME_COMPLETE (0x0000)
641 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
642 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
643 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
644 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
645 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
646 #define UNDNAME_NO_MS_THISTYPE (0x0020)
647 #define UNDNAME_NO_CV_THISTYPE (0x0040)
648 #define UNDNAME_NO_THISTYPE (0x0060)
649 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
650 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
651 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
652 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
653 #define UNDNAME_32_BIT_DECODE (0x0800)
654 #define UNDNAME_NAME_ONLY (0x1000)
655 #define UNDNAME_NO_ARGUMENTS (0x2000)
656 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
658 BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
659 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID);
660 BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
661 BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
662 BOOL WINAPI SymFromName(HANDLE, LPSTR, PSYMBOL_INFO);
663 BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
664 BOOL WINAPI SymGetSymFromName(HANDLE, PSTR, PIMAGEHLP_SYMBOL);
665 BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, LPSTR, PSYMBOL_INFO);
666 BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
667 BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
668 BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK,
670 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PSTR, DWORD, ULONG, PVOID);
671 BOOL WINAPI SymEnumerateSymbols(HANDLE, DWORD, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
672 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
673 BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
674 BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
675 DWORD WINAPI UnDecorateSymbolName(LPCSTR, LPSTR, DWORD, DWORD);
677 /*************************
679 *************************/
680 typedef BOOL (CALLBACK *PSYM_ENUMSOURCFILES_CALLBACK)(PSOURCEFILE, PVOID);
682 BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, LPSTR, PSYM_ENUMSOURCFILES_CALLBACK,
684 BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
685 BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
686 BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
688 /*************************
689 * File & image handling *
690 *************************/
691 BOOL WINAPI SymInitialize(HANDLE, PSTR, BOOL);
692 BOOL WINAPI SymCleanup(HANDLE);
694 HANDLE WINAPI FindDebugInfoFile(PSTR, PSTR, PSTR);
695 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PSTR, PVOID);
696 HANDLE WINAPI FindDebugInfoFileEx(PSTR, PSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
697 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR, PVOID);
698 BOOL WINAPI SymFindFileInPath(HANDLE, LPSTR, LPSTR, PVOID, DWORD, DWORD, DWORD,
699 LPSTR, PFINDFILEINPATHCALLBACK, PVOID);
700 HANDLE WINAPI FindExecutableImage(PSTR, PSTR, PSTR);
701 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PSTR, PVOID);
702 HANDLE WINAPI FindExecutableImageEx(PSTR, PSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
703 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
704 PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
705 PIMAGE_SECTION_HEADER *);
706 PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG);
707 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG);
708 PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*);
709 BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD);
710 BOOL WINAPI SymSetSearchPath(HANDLE, PSTR);
711 DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE);
712 BOOL WINAPI MakeSureDirectoryPathExists(PCSTR);
713 BOOL WINAPI SearchTreeForFile(PSTR, PSTR, PSTR);
714 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR, PVOID);
715 BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, LPSTR, PENUMDIRTREE_CALLBACK, void*);
716 BOOL WINAPI SymMatchFileName(LPSTR, LPSTR, LPSTR*, LPSTR*);
718 /*************************
719 * Context management *
720 *************************/
721 BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT);
724 /*************************
726 *************************/
728 typedef struct _KDHELP
731 DWORD ThCallbackStack;
734 DWORD KiCallUserMode;
735 DWORD KeUserCallbackDispatcher;
736 DWORD SystemRangeStart;
739 typedef struct _STACKFRAME
745 PVOID FuncTableEntry;
752 } STACKFRAME, *LPSTACKFRAME;
754 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)
755 (HANDLE, LPCVOID, PVOID, DWORD, PDWORD);
756 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
757 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
758 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
759 BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID,
760 PREAD_PROCESS_MEMORY_ROUTINE,
761 PFUNCTION_TABLE_ACCESS_ROUTINE,
762 PGET_MODULE_BASE_ROUTINE,
763 PTRANSLATE_ADDRESS_ROUTINE);
765 PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
767 /*************************
768 * Version, global stuff *
769 *************************/
771 typedef struct API_VERSION
777 } API_VERSION, *LPAPI_VERSION;
779 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
780 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION);
782 typedef struct _IMAGE_DEBUG_INFORMATION
786 PVOID ReservedMappedBase;
787 USHORT ReservedMachine;
788 USHORT ReservedCharacteristics;
789 DWORD ReservedCheckSum;
792 DWORD ReservedNumberOfSections;
793 PIMAGE_SECTION_HEADER ReservedSections;
794 DWORD ReservedExportedNamesSize;
795 PSTR ReservedExportedNames;
796 DWORD ReservedNumberOfFunctionTableEntries;
797 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
798 DWORD ReservedLowestFunctionStartingAddress;
799 DWORD ReservedHighestFunctionEndingAddress;
800 DWORD ReservedNumberOfFpoTableEntries;
801 PFPO_DATA ReservedFpoTableEntries;
802 DWORD SizeOfCoffSymbols;
803 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
804 DWORD ReservedSizeOfCodeViewSymbols;
805 PVOID ReservedCodeViewSymbols;
808 PSTR ReservedDebugFilePath;
809 DWORD ReservedTimeDateStamp;
810 BOOL ReservedRomImage;
811 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
812 DWORD ReservedNumberOfDebugDirectories;
813 DWORD ReservedOriginalFunctionTableBaseAddress;
815 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
818 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PSTR, PSTR, DWORD);
820 BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
822 DWORD WINAPI SymGetOptions(void);
823 DWORD WINAPI SymSetOptions(DWORD);
827 #endif /* defined(__cplusplus) */
829 #endif /* __WINE_DBGHELP_H */