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 typedef struct _tagADDRESS64
68 } ADDRESS64
, *LPADDRESS64
;
70 #define SYMF_OMAP_GENERATED 0x00000001
71 #define SYMF_OMAP_MODIFIED 0x00000002
72 #define SYMF_USER_GENERATED 0x00000004
73 #define SYMF_REGISTER 0x00000008
74 #define SYMF_REGREL 0x00000010
75 #define SYMF_FRAMEREL 0x00000020
76 #define SYMF_PARAMETER 0x00000040
77 #define SYMF_LOCAL 0x00000080
78 #define SYMF_CONSTANT 0x00000100
79 #define SYMF_EXPORT 0x00000200
80 #define SYMF_FORWARDER 0x00000400
81 #define SYMF_FUNCTION 0x00000800
82 #define SYMF_VIRTUAL 0x00001000
83 #define SYMF_THUNK 0x00002000
84 #define SYMF_TLSREL 0x00004000
99 typedef struct _IMAGEHLP_SYMBOL
107 } IMAGEHLP_SYMBOL
, *PIMAGEHLP_SYMBOL
;
109 typedef struct _IMAGEHLP_MODULE
120 CHAR LoadedImageName
[256];
121 } IMAGEHLP_MODULE
, *PIMAGEHLP_MODULE
;
123 typedef struct _IMAGEHLP_MODULEW
132 WCHAR ModuleName
[32];
133 WCHAR ImageName
[256];
134 WCHAR LoadedImageName
[256];
135 } IMAGEHLP_MODULEW
, *PIMAGEHLP_MODULEW
;
137 typedef struct _IMAGEHLP_MODULE64
148 CHAR LoadedImageName
[256];
149 CHAR LoadedPdbName
[256];
151 CHAR CVData
[MAX_PATH
*3];
162 } IMAGEHLP_MODULE64
, *PIMAGEHLP_MODULE64
;
164 typedef struct _IMAGEHLP_MODULE64W
173 WCHAR ModuleName
[32];
174 WCHAR ImageName
[256];
175 WCHAR LoadedImageName
[256];
176 WCHAR LoadedPdbName
[256];
178 WCHAR CVData
[MAX_PATH
*3];
189 } IMAGEHLP_MODULEW64
, *PIMAGEHLP_MODULEW64
;
191 typedef struct _IMAGEHLP_LINE
198 } IMAGEHLP_LINE
, *PIMAGEHLP_LINE
;
200 typedef struct _IMAGEHLP_LINE64
207 } IMAGEHLP_LINE64
, *PIMAGEHLP_LINE64
;
209 typedef struct _SOURCEFILE
213 } SOURCEFILE
, *PSOURCEFILE
;
215 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
216 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
217 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
218 #define CBA_SYMBOLS_UNLOADED 0x00000004
219 #define CBA_DUPLICATE_SYMBOL 0x00000005
220 #define CBA_READ_MEMORY 0x00000006
221 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
222 #define CBA_SET_OPTIONS 0x00000008
223 #define CBA_EVENT 0x00000010
224 #define CBA_DEBUG_INFO 0x10000000
226 typedef struct _IMAGEHLP_CBA_READ_MEMORY
232 } IMAGEHLP_CBA_READ_MEMORY
, *PIMAGEHLP_CBA_READ_MEMORY
;
243 typedef struct _IMAGEHLP_CBA_EVENT
249 } IMAGEHLP_CBA_EVENT
, *PIMAGEHLP_CBA_EVENT
;
251 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
257 CHAR FileName
[MAX_PATH
];
259 } IMAGEHLP_DEFERRED_SYMBOL_LOAD
, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD
;
261 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
265 PIMAGEHLP_SYMBOL Symbol
;
266 DWORD SelectedSymbol
;
267 } IMAGEHLP_DUPLICATE_SYMBOL
, *PIMAGEHLP_DUPLICATE_SYMBOL
;
269 #define SYMOPT_CASE_INSENSITIVE 0x00000001
270 #define SYMOPT_UNDNAME 0x00000002
271 #define SYMOPT_DEFERRED_LOADS 0x00000004
272 #define SYMOPT_NO_CPP 0x00000008
273 #define SYMOPT_LOAD_LINES 0x00000010
274 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
275 #define SYMOPT_LOAD_ANYTHING 0x00000040
276 #define SYMOPT_IGNORE_CVREC 0x00000080
277 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
278 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
279 #define SYMOPT_EXACT_SYMBOLS 0x00000400
280 #define SYMOPT_WILD_UNDERSCORE 0x00000800
281 #define SYMOPT_USE_DEFAULTS 0x00001000
282 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
283 #define SYMOPT_PUBLICS_ONLY 0x00004000
284 #define SYMOPT_NO_PUBLICS 0x00008000
285 #define SYMOPT_AUTO_PUBLICS 0x00010000
286 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
287 #define SYMOPT_SECURE 0x00040000
288 #define SYMOPT_NO_PROMPTS 0x00080000
290 #define SYMOPT_DEBUG 0x80000000
292 typedef struct _IMAGEHLP_STACK_FRAME
294 ULONG64 InstructionOffset
;
295 ULONG64 ReturnOffset
;
298 ULONG64 BackingStoreOffset
;
299 ULONG64 FuncTableEntry
;
304 } IMAGEHLP_STACK_FRAME
, *PIMAGEHLP_STACK_FRAME
;
306 typedef VOID IMAGEHLP_CONTEXT
, *PIMAGEHLP_CONTEXT
;
308 #define DBHHEADER_DEBUGDIRS 0x1
309 typedef struct _DBGHELP_MODLOAD_DATA
316 } MODLOAD_DATA
, *PMODLOAD_DATA
;
318 /*************************
320 *************************/
324 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
325 #define MINIDUMP_VERSION (42899)
328 typedef ULONG64 RVA64
;
330 typedef enum _MINIDUMP_TYPE
332 MiniDumpNormal
= 0x0000,
333 MiniDumpWithDataSegs
= 0x0001,
334 MiniDumpWithFullMemory
= 0x0002,
335 MiniDumpWithHandleData
= 0x0004,
336 MiniDumpFilterMemory
= 0x0008,
337 MiniDumpScanMemory
= 0x0010,
338 MiniDumpWithUnloadedModules
= 0x0020,
339 MiniDumpWithIndirectlyReferencedMemory
= 0x0040,
340 MiniDumpFilterModulePaths
= 0x0080,
341 MiniDumpWithProcessThreadData
= 0x0100,
342 MiniDumpWithPrivateReadWriteMemory
= 0x0200,
343 MiniDumpWithoutOptionalData
= 0x0400,
344 MiniDumpWithFullMemoryInfo
= 0x0800,
345 MiniDumpWithThreadInfo
= 0x1000,
346 MiniDumpWithCodeSegs
= 0x2000
349 typedef enum _MINIDUMP_CALLBACK_TYPE
354 IncludeThreadCallback
,
355 IncludeModuleCallback
,
357 } MINIDUMP_CALLBACK_TYPE
;
359 typedef struct _MINIDUMP_THREAD_CALLBACK
367 } MINIDUMP_THREAD_CALLBACK
, *PMINIDUMP_THREAD_CALLBACK
;
369 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
377 ULONG64 BackingStoreBase
;
378 ULONG64 BackingStoreEnd
;
379 } MINIDUMP_THREAD_EX_CALLBACK
, *PMINIDUMP_THREAD_EX_CALLBACK
;
381 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
384 } MINIDUMP_INCLUDE_THREAD_CALLBACK
, *PMINIDUMP_INCLUDE_THREAD_CALLBACK
;
386 typedef enum _THREAD_WRITE_FLAGS
388 ThreadWriteThread
= 0x0001,
389 ThreadWriteStack
= 0x0002,
390 ThreadWriteContext
= 0x0004,
391 ThreadWriteBackingStore
= 0x0008,
392 ThreadWriteInstructionWindow
= 0x0010,
393 ThreadWriteThreadData
= 0x0020,
394 ThreadWriteThreadInfo
= 0x0040
395 } THREAD_WRITE_FLAGS
;
397 typedef struct _MINIDUMP_MODULE_CALLBACK
404 VS_FIXEDFILEINFO VersionInfo
;
406 ULONG SizeOfCvRecord
;
408 ULONG SizeOfMiscRecord
;
409 } MINIDUMP_MODULE_CALLBACK
, *PMINIDUMP_MODULE_CALLBACK
;
411 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
414 } MINIDUMP_INCLUDE_MODULE_CALLBACK
, *PMINIDUMP_INCLUDE_MODULE_CALLBACK
;
416 typedef enum _MODULE_WRITE_FLAGS
418 ModuleWriteModule
= 0x0001,
419 ModuleWriteDataSeg
= 0x0002,
420 ModuleWriteMiscRecord
= 0x0004,
421 ModuleWriteCvRecord
= 0x0008,
422 ModuleReferencedByMemory
= 0x0010,
423 ModuleWriteTlsData
= 0x0020,
424 ModuleWriteCodeSegs
= 0x0040,
425 } MODULE_WRITE_FLAGS
;
427 typedef struct _MINIDUMP_CALLBACK_INPUT
430 HANDLE ProcessHandle
;
434 MINIDUMP_THREAD_CALLBACK Thread
;
435 MINIDUMP_THREAD_EX_CALLBACK ThreadEx
;
436 MINIDUMP_MODULE_CALLBACK Module
;
437 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread
;
438 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule
;
440 } MINIDUMP_CALLBACK_INPUT
, *PMINIDUMP_CALLBACK_INPUT
;
442 typedef struct _MINIDUMP_CALLBACK_OUTPUT
446 ULONG ModuleWriteFlags
;
447 ULONG ThreadWriteFlags
;
454 } MINIDUMP_CALLBACK_OUTPUT
, *PMINIDUMP_CALLBACK_OUTPUT
;
456 typedef BOOL (WINAPI
* MINIDUMP_CALLBACK_ROUTINE
)(PVOID
, const PMINIDUMP_CALLBACK_INPUT
, PMINIDUMP_CALLBACK_OUTPUT
);
458 typedef struct _MINIDUMP_CALLBACK_INFORMATION
460 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine
;
462 } MINIDUMP_CALLBACK_INFORMATION
, *PMINIDUMP_CALLBACK_INFORMATION
;
464 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
468 } MINIDUMP_LOCATION_DESCRIPTOR
;
470 typedef struct _MINIDUMP_DIRECTORY
473 MINIDUMP_LOCATION_DESCRIPTOR Location
;
474 } MINIDUMP_DIRECTORY
, *PMINIDUMP_DIRECTORY
;
476 typedef struct _MINIDUMP_EXCEPTION
479 ULONG ExceptionFlags
;
480 ULONG64 ExceptionRecord
;
481 ULONG64 ExceptionAddress
;
482 ULONG NumberParameters
;
483 ULONG __unusedAlignment
;
484 ULONG64 ExceptionInformation
[EXCEPTION_MAXIMUM_PARAMETERS
];
485 } MINIDUMP_EXCEPTION
, *PMINIDUMP_EXCEPTION
;
487 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
490 PEXCEPTION_POINTERS ExceptionPointers
;
492 } MINIDUMP_EXCEPTION_INFORMATION
, *PMINIDUMP_EXCEPTION_INFORMATION
;
494 typedef struct MINIDUMP_EXCEPTION_STREAM
498 MINIDUMP_EXCEPTION ExceptionRecord
;
499 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
500 } MINIDUMP_EXCEPTION_STREAM
, *PMINIDUMP_EXCEPTION_STREAM
;
502 typedef struct _MINIDUMP_HEADER
506 DWORD NumberOfStreams
;
507 RVA StreamDirectoryRva
;
515 } MINIDUMP_HEADER
, *PMINIDUMP_HEADER
;
517 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
519 ULONG64 StartOfMemoryRange
;
520 MINIDUMP_LOCATION_DESCRIPTOR Memory
;
521 } MINIDUMP_MEMORY_DESCRIPTOR
, *PMINIDUMP_MEMORY_DESCRIPTOR
;
523 typedef struct _MINIDUMP_MEMORY_LIST
525 ULONG NumberOfMemoryRanges
;
526 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges
[1]; /* FIXME: 0-sized array not supported */
527 } MINIDUMP_MEMORY_LIST
, *PMINIDUMP_MEMORY_LIST
;
529 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
530 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
532 typedef struct _MINIDUMP_MISC_INFO
537 ULONG ProcessCreateTime
;
538 ULONG ProcessUserTime
;
539 ULONG ProcessKernelTime
;
540 } MINIDUMP_MISC_INFO
, *PMINIDUMP_MISC_INFO
;
542 typedef struct _MINIDUMP_MODULE
549 VS_FIXEDFILEINFO VersionInfo
;
550 MINIDUMP_LOCATION_DESCRIPTOR CvRecord
;
551 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord
;
554 } MINIDUMP_MODULE
, *PMINIDUMP_MODULE
;
556 typedef struct _MINIDUMP_MODULE_LIST
558 ULONG NumberOfModules
;
559 MINIDUMP_MODULE Modules
[1]; /* FIXME: 0-sized array not supported */
560 } MINIDUMP_MODULE_LIST
, *PMINIDUMP_MODULE_LIST
;
562 typedef struct _MINIDUMP_STRING
565 WCHAR Buffer
[1]; /* FIXME: O-sized array not supported */
566 } MINIDUMP_STRING
, *PMINIDUMP_STRING
;
568 typedef struct _MINIDUMP_SYSTEM_INFO
570 USHORT ProcessorArchitecture
;
571 USHORT ProcessorLevel
;
572 USHORT ProcessorRevision
;
578 UCHAR NumberOfProcessors
;
598 union _CPU_INFORMATION
603 ULONG VersionInformation
;
604 ULONG FeatureInformation
;
605 ULONG AMDExtendedCpuFeatures
;
609 ULONG64 ProcessorFeatures
[2];
613 } MINIDUMP_SYSTEM_INFO
, *PMINIDUMP_SYSTEM_INFO
;
615 typedef struct _MINIDUMP_THREAD
622 MINIDUMP_MEMORY_DESCRIPTOR Stack
;
623 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
624 } MINIDUMP_THREAD
, *PMINIDUMP_THREAD
;
626 typedef struct _MINIDUMP_THREAD_LIST
628 ULONG NumberOfThreads
;
629 MINIDUMP_THREAD Threads
[1]; /* FIXME: no support of 0 sized array */
630 } MINIDUMP_THREAD_LIST
, *PMINIDUMP_THREAD_LIST
;
632 typedef struct _MINIDUMP_USER_STREAM
637 } MINIDUMP_USER_STREAM
, *PMINIDUMP_USER_STREAM
;
639 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
641 ULONG UserStreamCount
;
642 PMINIDUMP_USER_STREAM UserStreamArray
;
643 } MINIDUMP_USER_STREAM_INFORMATION
, *PMINIDUMP_USER_STREAM_INFORMATION
;
645 typedef enum _MINIDUMP_STREAM_TYPE
650 ThreadListStream
= 3,
651 ModuleListStream
= 4,
652 MemoryListStream
= 5,
654 SystemInfoStream
= 7,
655 ThreadExListStream
= 8,
656 Memory64ListStream
= 9,
659 HandleDataStream
= 12,
660 FunctionTableStream
= 13,
661 UnloadedModuleListStream
= 14,
663 MemoryInfoListStream
= 16,
664 ThreadInfoListStream
= 17,
666 LastReservedStream
= 0xffff
667 } MINIDUMP_STREAM_TYPE
;
669 BOOL WINAPI
MiniDumpWriteDump(HANDLE
, DWORD
, HANDLE
, MINIDUMP_TYPE
,
670 const PMINIDUMP_EXCEPTION_INFORMATION
,
671 const PMINIDUMP_USER_STREAM_INFORMATION
,
672 const PMINIDUMP_CALLBACK_INFORMATION
);
673 BOOL WINAPI
MiniDumpReadDumpStream(PVOID
, ULONG
, PMINIDUMP_DIRECTORY
*, PVOID
*,
677 /*************************
679 *************************/
681 /* flags for SymLoadModuleEx */
682 #define SLMFLAG_VIRTUAL 0x1
683 #define SLMFLAG_NO_SYMBOLS 0x4
685 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK
)(PSTR
, DWORD
, ULONG
, PVOID
);
686 BOOL WINAPI
EnumerateLoadedModules(HANDLE
, PENUMLOADED_MODULES_CALLBACK
, PVOID
);
687 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK
)(PSTR
, DWORD
, PVOID
);
688 BOOL WINAPI
SymEnumerateModules(HANDLE
, PSYM_ENUMMODULES_CALLBACK
, PVOID
);
689 BOOL WINAPI
SymGetModuleInfo(HANDLE
, DWORD
, PIMAGEHLP_MODULE
);
690 BOOL WINAPI
SymGetModuleInfoW(HANDLE
, DWORD
, PIMAGEHLP_MODULEW
);
691 BOOL WINAPI
SymGetModuleInfo64(HANDLE
, DWORD64
, PIMAGEHLP_MODULE64
);
692 BOOL WINAPI
SymGetModuleInfoW64(HANDLE
, DWORD64
, PIMAGEHLP_MODULEW64
);
693 DWORD WINAPI
SymGetModuleBase(HANDLE
, DWORD
);
694 DWORD WINAPI
SymLoadModule(HANDLE
, HANDLE
, PSTR
, PSTR
, DWORD
, DWORD
);
695 DWORD64 WINAPI
SymLoadModule64(HANDLE
, HANDLE
, PSTR
, PSTR
, DWORD64
, DWORD
);
696 DWORD64 WINAPI
SymLoadModuleEx(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD64
, DWORD
,
697 PMODLOAD_DATA
, DWORD
);
698 BOOL WINAPI
SymUnloadModule(HANDLE
, DWORD
);
699 BOOL WINAPI
SymUnloadModule64(HANDLE
, DWORD64
);
701 /*************************
703 *************************/
705 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
706 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
707 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
708 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
709 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
710 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
711 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
712 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
714 #define SYMFLAG_VALUEPRESENT 0x00000001
715 #define SYMFLAG_REGISTER 0x00000008
716 #define SYMFLAG_REGREL 0x00000010
717 #define SYMFLAG_FRAMEREL 0x00000020
718 #define SYMFLAG_PARAMETER 0x00000040
719 #define SYMFLAG_LOCAL 0x00000080
720 #define SYMFLAG_CONSTANT 0x00000100
721 #define SYMFLAG_EXPORT 0x00000200
722 #define SYMFLAG_FORWARDER 0x00000400
723 #define SYMFLAG_FUNCTION 0x00000800
724 #define SYMFLAG_VIRTUAL 0x00001000
725 #define SYMFLAG_THUNK 0x00002000
726 #define SYMFLAG_TLSREL 0x00004000
728 typedef struct _SYMBOL_INFO
733 ULONG info
; /* sdk states info, while MSDN says it's Index... */
745 } SYMBOL_INFO
, *PSYMBOL_INFO
;
747 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
755 TI_GET_ARRAYINDEXTYPEID
,
758 TI_GET_ADDRESSOFFSET
,
762 TI_GET_CHILDRENCOUNT
,
764 TI_GET_VIRTUALBASECLASS
,
765 TI_GET_VIRTUALTABLESHAPEID
,
766 TI_GET_VIRTUALBASEPOINTEROFFSET
,
767 TI_GET_CLASSPARENTID
,
770 TI_GET_LEXICALPARENT
,
775 TI_GET_CALLING_CONVENTION
,
776 } IMAGEHLP_SYMBOL_TYPE_INFO
;
778 typedef struct _TI_FINDCHILDREN_PARAMS
783 } TI_FINDCHILDREN_PARAMS
;
785 #define UNDNAME_COMPLETE (0x0000)
786 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
787 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
788 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
789 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
790 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
791 #define UNDNAME_NO_MS_THISTYPE (0x0020)
792 #define UNDNAME_NO_CV_THISTYPE (0x0040)
793 #define UNDNAME_NO_THISTYPE (0x0060)
794 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
795 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
796 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
797 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
798 #define UNDNAME_32_BIT_DECODE (0x0800)
799 #define UNDNAME_NAME_ONLY (0x1000)
800 #define UNDNAME_NO_ARGUMENTS (0x2000)
801 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
803 BOOL WINAPI
SymGetTypeInfo(HANDLE
, DWORD64
, ULONG
, IMAGEHLP_SYMBOL_TYPE_INFO
, PVOID
);
804 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACK
)(PSYMBOL_INFO
, ULONG
, PVOID
);
805 BOOL WINAPI
SymEnumTypes(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
806 BOOL WINAPI
SymFromAddr(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFO
*);
807 BOOL WINAPI
SymFromName(HANDLE
, LPSTR
, PSYMBOL_INFO
);
808 BOOL WINAPI
SymGetSymFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_SYMBOL
);
809 BOOL WINAPI
SymGetSymFromName(HANDLE
, PSTR
, PIMAGEHLP_SYMBOL
);
810 BOOL WINAPI
SymGetTypeFromName(HANDLE
, ULONG64
, LPSTR
, PSYMBOL_INFO
);
811 BOOL WINAPI
SymGetSymNext(HANDLE
, PIMAGEHLP_SYMBOL
);
812 BOOL WINAPI
SymGetSymPrev(HANDLE
, PIMAGEHLP_SYMBOL
);
813 BOOL WINAPI
SymEnumSymbols(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
,
815 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK
)(PSTR
, DWORD
, ULONG
, PVOID
);
816 BOOL WINAPI
SymEnumerateSymbols(HANDLE
, DWORD
, PSYM_ENUMSYMBOLS_CALLBACK
, PVOID
);
817 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK
)(HANDLE
, ULONG
, PVOID
, PVOID
);
818 BOOL WINAPI
SymRegisterCallback(HANDLE
, PSYMBOL_REGISTERED_CALLBACK
, PVOID
);
819 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK64
)(HANDLE
, ULONG
, ULONG64
, ULONG64
);
820 BOOL WINAPI
SymRegisterCallback64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
821 BOOL WINAPI
SymUnDName(PIMAGEHLP_SYMBOL
, PSTR
, DWORD
);
822 DWORD WINAPI
UnDecorateSymbolName(LPCSTR
, LPSTR
, DWORD
, DWORD
);
823 BOOL WINAPI
SymMatchString(PCSTR string
, PCSTR re
, BOOL _case
);
824 BOOL WINAPI
SymMatchStringW(PCWSTR string
, PCWSTR re
, BOOL _case
);
826 /*************************
828 *************************/
829 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACK
)(PSOURCEFILE
, PVOID
);
831 BOOL WINAPI
SymEnumSourceFiles(HANDLE
, ULONG64
, LPSTR
, PSYM_ENUMSOURCEFILES_CALLBACK
,
833 BOOL WINAPI
SymGetLineFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINE
);
834 BOOL WINAPI
SymGetLineFromAddr64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
835 BOOL WINAPI
SymGetLinePrev(HANDLE
, PIMAGEHLP_LINE
);
836 BOOL WINAPI
SymGetLinePrev64(HANDLE
, PIMAGEHLP_LINE64
);
837 BOOL WINAPI
SymGetLineNext(HANDLE
, PIMAGEHLP_LINE
);
838 BOOL WINAPI
SymGetLineNext64(HANDLE
, PIMAGEHLP_LINE64
);
840 typedef struct _SRCCODEINFO
845 char Obj
[MAX_PATH
+1];
846 char FileName
[MAX_PATH
+1];
849 } SRCCODEINFO
, *PSRCCODEINFO
;
851 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACK
)(PSRCCODEINFO
, PVOID
);
852 BOOL WINAPI
SymEnumLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
854 /*************************
855 * File & image handling *
856 *************************/
857 BOOL WINAPI
SymInitialize(HANDLE
, PSTR
, BOOL
);
858 BOOL WINAPI
SymCleanup(HANDLE
);
860 HANDLE WINAPI
FindDebugInfoFile(PSTR
, PSTR
, PSTR
);
861 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACK
)(HANDLE
, PSTR
, PVOID
);
862 HANDLE WINAPI
FindDebugInfoFileEx(PSTR
, PSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
863 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACK
)(PSTR
, PVOID
);
864 BOOL WINAPI
SymFindFileInPath(HANDLE
, LPSTR
, LPSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
865 LPSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
866 HANDLE WINAPI
FindExecutableImage(PSTR
, PSTR
, PSTR
);
867 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACK
)(HANDLE
, PSTR
, PVOID
);
868 HANDLE WINAPI
FindExecutableImageEx(PSTR
, PSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
869 PIMAGE_NT_HEADERS WINAPI
ImageNtHeader(PVOID
);
870 PVOID WINAPI
ImageDirectoryEntryToDataEx(PVOID
, BOOLEAN
, USHORT
, PULONG
,
871 PIMAGE_SECTION_HEADER
*);
872 PVOID WINAPI
ImageDirectoryEntryToData(PVOID
, BOOLEAN
, USHORT
, PULONG
);
873 PIMAGE_SECTION_HEADER WINAPI
ImageRvaToSection(PIMAGE_NT_HEADERS
, PVOID
, ULONG
);
874 PVOID WINAPI
ImageRvaToVa(PIMAGE_NT_HEADERS
, PVOID
, ULONG
, PIMAGE_SECTION_HEADER
*);
875 BOOL WINAPI
SymGetSearchPath(HANDLE
, PSTR
, DWORD
);
876 BOOL WINAPI
SymSetSearchPath(HANDLE
, PSTR
);
877 DWORD WINAPI
GetTimestampForLoadedLibrary(HMODULE
);
878 BOOL WINAPI
MakeSureDirectoryPathExists(PCSTR
);
879 BOOL WINAPI
SearchTreeForFile(PSTR
, PSTR
, PSTR
);
880 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACK
)(LPCSTR
, PVOID
);
881 BOOL WINAPI
EnumDirTree(HANDLE
, PCSTR
, PCSTR
, LPSTR
, PENUMDIRTREE_CALLBACK
, void*);
882 BOOL WINAPI
SymMatchFileName(LPSTR
, LPSTR
, LPSTR
*, LPSTR
*);
884 /*************************
885 * Context management *
886 *************************/
887 BOOL WINAPI
SymSetContext(HANDLE
, PIMAGEHLP_STACK_FRAME
, PIMAGEHLP_CONTEXT
);
890 /*************************
892 *************************/
894 typedef struct _KDHELP
897 DWORD ThCallbackStack
;
900 DWORD KiCallUserMode
;
901 DWORD KeUserCallbackDispatcher
;
902 DWORD SystemRangeStart
;
905 typedef struct _KDHELP64
908 DWORD ThCallbackStack
;
909 DWORD ThCallbackBStore
;
912 DWORD64 KiCallUserMode
;
913 DWORD64 KeUserCallbackDispatcher
;
914 DWORD64 SystemRangeStart
;
916 } KDHELP64
, *PKDHELP64
;
918 typedef struct _STACKFRAME
924 PVOID FuncTableEntry
;
931 } STACKFRAME
, *LPSTACKFRAME
;
933 typedef struct _STACKFRAME64
936 ADDRESS64 AddrReturn
;
939 ADDRESS64 AddrBStore
;
940 PVOID FuncTableEntry
;
946 } STACKFRAME64
, *LPSTACKFRAME64
;
948 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE
)
949 (HANDLE
, DWORD
, PVOID
, DWORD
, PDWORD
);
950 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE
)(HANDLE
, DWORD
);
951 typedef DWORD (CALLBACK
*PGET_MODULE_BASE_ROUTINE
)(HANDLE
, DWORD
);
952 typedef DWORD (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE
)(HANDLE
, HANDLE
, LPADDRESS
);
953 BOOL WINAPI
StackWalk(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME
, PVOID
,
954 PREAD_PROCESS_MEMORY_ROUTINE
,
955 PFUNCTION_TABLE_ACCESS_ROUTINE
,
956 PGET_MODULE_BASE_ROUTINE
,
957 PTRANSLATE_ADDRESS_ROUTINE
);
959 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE64
)
960 (HANDLE
, DWORD64
, PVOID
, DWORD
, PDWORD
);
961 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE64
)(HANDLE
, DWORD64
);
962 typedef DWORD64 (CALLBACK
*PGET_MODULE_BASE_ROUTINE64
)(HANDLE
, DWORD64
);
963 typedef DWORD64 (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE64
)(HANDLE
, HANDLE
, LPADDRESS64
);
964 BOOL WINAPI
StackWalk64(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME64
, PVOID
,
965 PREAD_PROCESS_MEMORY_ROUTINE64
,
966 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
967 PGET_MODULE_BASE_ROUTINE64
,
968 PTRANSLATE_ADDRESS_ROUTINE64
);
970 PVOID WINAPI
SymFunctionTableAccess(HANDLE
, DWORD
);
972 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK
)(HANDLE
, DWORD
, PVOID
);
973 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK64
)(HANDLE
, ULONG64
, ULONG64
);
975 BOOL WINAPI
SymRegisterFunctionEntryCallback(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK
, PVOID
);
976 BOOL WINAPI
SymRegisterFunctionEntryCallback64(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK64
, ULONG64
);
978 /*************************
979 * Version, global stuff *
980 *************************/
982 typedef struct API_VERSION
988 } API_VERSION
, *LPAPI_VERSION
;
990 LPAPI_VERSION WINAPI
ImagehlpApiVersion(void);
991 LPAPI_VERSION WINAPI
ImagehlpApiVersionEx(LPAPI_VERSION
);
993 typedef struct _IMAGE_DEBUG_INFORMATION
997 PVOID ReservedMappedBase
;
998 USHORT ReservedMachine
;
999 USHORT ReservedCharacteristics
;
1000 DWORD ReservedCheckSum
;
1003 DWORD ReservedNumberOfSections
;
1004 PIMAGE_SECTION_HEADER ReservedSections
;
1005 DWORD ReservedExportedNamesSize
;
1006 PSTR ReservedExportedNames
;
1007 DWORD ReservedNumberOfFunctionTableEntries
;
1008 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries
;
1009 DWORD ReservedLowestFunctionStartingAddress
;
1010 DWORD ReservedHighestFunctionEndingAddress
;
1011 DWORD ReservedNumberOfFpoTableEntries
;
1012 PFPO_DATA ReservedFpoTableEntries
;
1013 DWORD SizeOfCoffSymbols
;
1014 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols
;
1015 DWORD ReservedSizeOfCodeViewSymbols
;
1016 PVOID ReservedCodeViewSymbols
;
1019 PSTR ReservedDebugFilePath
;
1020 DWORD ReservedTimeDateStamp
;
1021 BOOL ReservedRomImage
;
1022 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory
;
1023 DWORD ReservedNumberOfDebugDirectories
;
1024 DWORD ReservedOriginalFunctionTableBaseAddress
;
1025 DWORD Reserved
[ 2 ];
1026 } IMAGE_DEBUG_INFORMATION
, *PIMAGE_DEBUG_INFORMATION
;
1029 PIMAGE_DEBUG_INFORMATION WINAPI
MapDebugInformation(HANDLE
, PSTR
, PSTR
, DWORD
);
1031 BOOL WINAPI
UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION
);
1033 DWORD WINAPI
SymGetOptions(void);
1034 DWORD WINAPI
SymSetOptions(DWORD
);
1036 BOOL WINAPI
SymSetParentWindow(HWND hwnd
);
1038 /* Symbol server bits */
1039 typedef BOOL (WINAPI
* PSYMBOLSERVERPROC
)(LPCSTR
, LPCSTR
, PVOID
, DWORD
, DWORD
, LPSTR
);
1040 typedef BOOL (WINAPI
* PSYMBOLSERVEROPENPROC
)(void);
1041 typedef BOOL (WINAPI
* PSYMBOLSERVERCLOSEPROC
)(void);
1042 typedef BOOL (WINAPI
* PSYMBOLSERVERSETOPTIONSPROC
)(UINT_PTR
, ULONG64
);
1043 typedef BOOL (CALLBACK
* PSYMBOLSERVERCALLBACKPROC
)(UINT_PTR
, ULONG64
, ULONG64
);
1044 typedef UINT_PTR (WINAPI
* PSYMBOLSERVERGETOPTIONSPROC
)(void);
1045 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROC
)(LPCSTR
);
1047 #define SSRVOPT_CALLBACK 0x0001
1048 #define SSRVOPT_DWORD 0x0002
1049 #define SSRVOPT_DWORDPTR 0x0004
1050 #define SSRVOPT_GUIDPTR 0x0008
1051 #define SSRVOPT_OLDGUIDPTR 0x0010
1052 #define SSRVOPT_UNATTENDED 0x0020
1053 #define SSRVOPT_NOCOPY 0x0040
1054 #define SSRVOPT_PARENTWIN 0x0080
1055 #define SSRVOPT_PARAMTYPE 0x0100
1056 #define SSRVOPT_SECURE 0x0200
1057 #define SSRVOPT_TRACE 0x0400
1058 #define SSRVOPT_SETCONTEXT 0x0800
1059 #define SSRVOPT_PROXY 0x1000
1060 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1061 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1063 #define SSRVACTION_TRACE 1
1064 #define SSRVACTION_QUERYCANCEL 2
1065 #define SSRVACTION_EVENT 3
1069 #endif /* defined(__cplusplus) */
1071 #endif /* __WINE_DBGHELP_H */