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 0x504D444D /* 'MDMP' */
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,
267 MiniDumpWithUnloadedModules
= 0x0020,
268 MiniDumpWithIndirectlyReferencedMemory
= 0x0040,
269 MiniDumpFilterModulePaths
= 0x0080,
270 MiniDumpWithProcessThreadData
= 0x0100,
271 MiniDumpWithPrivateReadWriteMemory
= 0x0200,
272 MiniDumpWithoutOptionalData
= 0x0400,
273 MiniDumpWithFullMemoryInfo
= 0x0800,
274 MiniDumpWithThreadInfo
= 0x1000,
275 MiniDumpWithCodeSegs
= 0x2000
278 typedef enum _MINIDUMP_CALLBACK_TYPE
283 IncludeThreadCallback
,
284 IncludeModuleCallback
,
286 } MINIDUMP_CALLBACK_TYPE
;
288 typedef struct _MINIDUMP_THREAD_CALLBACK
296 } MINIDUMP_THREAD_CALLBACK
, *PMINIDUMP_THREAD_CALLBACK
;
298 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
306 ULONG64 BackingStoreBase
;
307 ULONG64 BackingStoreEnd
;
308 } MINIDUMP_THREAD_EX_CALLBACK
, *PMINIDUMP_THREAD_EX_CALLBACK
;
310 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
313 } MINIDUMP_INCLUDE_THREAD_CALLBACK
, *PMINIDUMP_INCLUDE_THREAD_CALLBACK
;
315 typedef enum _THREAD_WRITE_FLAGS
317 ThreadWriteThread
= 0x0001,
318 ThreadWriteStack
= 0x0002,
319 ThreadWriteContext
= 0x0004,
320 ThreadWriteBackingStore
= 0x0008,
321 ThreadWriteInstructionWindow
= 0x0010,
322 ThreadWriteThreadData
= 0x0020,
323 ThreadWriteThreadInfo
= 0x0040
324 } THREAD_WRITE_FLAGS
;
326 typedef struct _MINIDUMP_MODULE_CALLBACK
333 VS_FIXEDFILEINFO VersionInfo
;
335 ULONG SizeOfCvRecord
;
337 ULONG SizeOfMiscRecord
;
338 } MINIDUMP_MODULE_CALLBACK
, *PMINIDUMP_MODULE_CALLBACK
;
340 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
343 } MINIDUMP_INCLUDE_MODULE_CALLBACK
, *PMINIDUMP_INCLUDE_MODULE_CALLBACK
;
345 typedef enum _MODULE_WRITE_FLAGS
347 ModuleWriteModule
= 0x0001,
348 ModuleWriteDataSeg
= 0x0002,
349 ModuleWriteMiscRecord
= 0x0004,
350 ModuleWriteCvRecord
= 0x0008,
351 ModuleReferencedByMemory
= 0x0010,
352 ModuleWriteTlsData
= 0x0020,
353 ModuleWriteCodeSegs
= 0x0040,
354 } MODULE_WRITE_FLAGS
;
356 typedef struct _MINIDUMP_CALLBACK_INPUT
359 HANDLE ProcessHandle
;
363 MINIDUMP_THREAD_CALLBACK Thread
;
364 MINIDUMP_THREAD_EX_CALLBACK ThreadEx
;
365 MINIDUMP_MODULE_CALLBACK Module
;
366 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread
;
367 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule
;
369 } MINIDUMP_CALLBACK_INPUT
, *PMINIDUMP_CALLBACK_INPUT
;
371 typedef struct _MINIDUMP_CALLBACK_OUTPUT
375 ULONG ModuleWriteFlags
;
376 ULONG ThreadWriteFlags
;
383 } MINIDUMP_CALLBACK_OUTPUT
, *PMINIDUMP_CALLBACK_OUTPUT
;
385 typedef BOOL (WINAPI
* MINIDUMP_CALLBACK_ROUTINE
)(PVOID
, const PMINIDUMP_CALLBACK_INPUT
, PMINIDUMP_CALLBACK_OUTPUT
);
387 typedef struct _MINIDUMP_CALLBACK_INFORMATION
389 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine
;
391 } MINIDUMP_CALLBACK_INFORMATION
, *PMINIDUMP_CALLBACK_INFORMATION
;
393 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
397 } MINIDUMP_LOCATION_DESCRIPTOR
;
399 typedef struct _MINIDUMP_DIRECTORY
402 MINIDUMP_LOCATION_DESCRIPTOR Location
;
403 } MINIDUMP_DIRECTORY
, *PMINIDUMP_DIRECTORY
;
405 typedef struct _MINIDUMP_EXCEPTION
408 ULONG ExceptionFlags
;
409 ULONG64 ExceptionRecord
;
410 ULONG64 ExceptionAddress
;
411 ULONG NumberParameters
;
412 ULONG __unusedAlignment
;
413 ULONG64 ExceptionInformation
[EXCEPTION_MAXIMUM_PARAMETERS
];
414 } MINIDUMP_EXCEPTION
, *PMINIDUMP_EXCEPTION
;
416 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
419 PEXCEPTION_POINTERS ExceptionPointers
;
421 } MINIDUMP_EXCEPTION_INFORMATION
, *PMINIDUMP_EXCEPTION_INFORMATION
;
423 typedef struct MINIDUMP_EXCEPTION_STREAM
427 MINIDUMP_EXCEPTION ExceptionRecord
;
428 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
429 } MINIDUMP_EXCEPTION_STREAM
, *PMINIDUMP_EXCEPTION_STREAM
;
431 typedef struct _MINIDUMP_HEADER
435 DWORD NumberOfStreams
;
436 RVA StreamDirectoryRva
;
444 } MINIDUMP_HEADER
, *PMINIDUMP_HEADER
;
446 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
448 ULONG64 StartOfMemoryRange
;
449 MINIDUMP_LOCATION_DESCRIPTOR Memory
;
450 } MINIDUMP_MEMORY_DESCRIPTOR
, *PMINIDUMP_MEMORY_DESCRIPTOR
;
452 typedef struct _MINIDUMP_MEMORY_LIST
454 ULONG NumberOfMemoryRanges
;
455 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges
[1]; /* FIXME: 0-sized array not supported */
456 } MINIDUMP_MEMORY_LIST
, *PMINIDUMP_MEMORY_LIST
;
458 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
459 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
461 typedef struct _MINIDUMP_MISC_INFO
466 ULONG ProcessCreateTime
;
467 ULONG ProcessUserTime
;
468 ULONG ProcessKernelTime
;
469 } MINIDUMP_MISC_INFO
, *PMINIDUMP_MISC_INFO
;
471 typedef struct _MINIDUMP_MODULE
478 VS_FIXEDFILEINFO VersionInfo
;
479 MINIDUMP_LOCATION_DESCRIPTOR CvRecord
;
480 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord
;
483 } MINIDUMP_MODULE
, *PMINIDUMP_MODULE
;
485 typedef struct _MINIDUMP_MODULE_LIST
487 ULONG NumberOfModules
;
488 MINIDUMP_MODULE Modules
[1]; /* FIXME: 0-sized array not supported */
489 } MINIDUMP_MODULE_LIST
, *PMINIDUMP_MODULE_LIST
;
491 typedef struct _MINIDUMP_STRING
494 WCHAR Buffer
[1]; /* FIXME: O-sized array not supported */
495 } MINIDUMP_STRING
, *PMINIDUMP_STRING
;
497 typedef struct _MINIDUMP_SYSTEM_INFO
499 USHORT ProcessorArchitecture
;
500 USHORT ProcessorLevel
;
501 USHORT ProcessorRevision
;
507 UCHAR NumberOfProcessors
;
527 union _CPU_INFORMATION
532 ULONG VersionInformation
;
533 ULONG FeatureInformation
;
534 ULONG AMDExtendedCpuFeatures
;
538 ULONG64 ProcessorFeatures
[2];
542 } MINIDUMP_SYSTEM_INFO
, *PMINIDUMP_SYSTEM_INFO
;
544 typedef struct _MINIDUMP_THREAD
551 MINIDUMP_MEMORY_DESCRIPTOR Stack
;
552 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext
;
553 } MINIDUMP_THREAD
, *PMINIDUMP_THREAD
;
555 typedef struct _MINIDUMP_THREAD_LIST
557 ULONG NumberOfThreads
;
558 MINIDUMP_THREAD Threads
[1]; /* FIXME: no support of 0 sized array */
559 } MINIDUMP_THREAD_LIST
, *PMINIDUMP_THREAD_LIST
;
561 typedef struct _MINIDUMP_USER_STREAM
566 } MINIDUMP_USER_STREAM
, *PMINIDUMP_USER_STREAM
;
568 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
570 ULONG UserStreamCount
;
571 PMINIDUMP_USER_STREAM UserStreamArray
;
572 } MINIDUMP_USER_STREAM_INFORMATION
, *PMINIDUMP_USER_STREAM_INFORMATION
;
574 typedef enum _MINIDUMP_STREAM_TYPE
579 ThreadListStream
= 3,
580 ModuleListStream
= 4,
581 MemoryListStream
= 5,
583 SystemInfoStream
= 7,
584 ThreadExListStream
= 8,
585 Memory64ListStream
= 9,
588 HandleDataStream
= 12,
589 FunctionTableStream
= 13,
590 UnloadedModuleListStream
= 14,
592 MemoryInfoListStream
= 16,
593 ThreadInfoListStream
= 17,
595 LastReservedStream
= 0xffff
596 } MINIDUMP_STREAM_TYPE
;
598 BOOL WINAPI
MiniDumpWriteDump(HANDLE
, DWORD
, HANDLE
, MINIDUMP_TYPE
,
599 const PMINIDUMP_EXCEPTION_INFORMATION
,
600 const PMINIDUMP_USER_STREAM_INFORMATION
,
601 const PMINIDUMP_CALLBACK_INFORMATION
);
602 BOOL WINAPI
MiniDumpReadDumpStream(PVOID
, ULONG
, PMINIDUMP_DIRECTORY
*, PVOID
*,
606 /*************************
608 *************************/
609 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK
)(PSTR
, DWORD
, ULONG
, PVOID
);
610 BOOL WINAPI
EnumerateLoadedModules(HANDLE
, PENUMLOADED_MODULES_CALLBACK
, PVOID
);
611 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK
)(PSTR
, DWORD
, PVOID
);
612 BOOL WINAPI
SymEnumerateModules(HANDLE
, PSYM_ENUMMODULES_CALLBACK
, PVOID
);
613 BOOL WINAPI
SymGetModuleInfo(HANDLE
, DWORD
, PIMAGEHLP_MODULE
);
614 BOOL WINAPI
SymGetModuleInfoW(HANDLE
, DWORD
, PIMAGEHLP_MODULEW
);
615 DWORD WINAPI
SymGetModuleBase(HANDLE
, DWORD
);
616 DWORD WINAPI
SymLoadModule(HANDLE
, HANDLE
, PSTR
, PSTR
, DWORD
, DWORD
);
617 DWORD64 WINAPI
SymLoadModuleEx(HANDLE
, HANDLE
, PSTR
, PSTR
, DWORD64
, DWORD
,
618 PMODLOAD_DATA
, DWORD
);
619 BOOL WINAPI
SymUnloadModule(HANDLE
, DWORD
);
621 /*************************
623 *************************/
625 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
626 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
627 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
628 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
629 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
630 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
631 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
632 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
634 #define SYMFLAG_VALUEPRESENT 0x00000001
635 #define SYMFLAG_REGISTER 0x00000008
636 #define SYMFLAG_REGREL 0x00000010
637 #define SYMFLAG_FRAMEREL 0x00000020
638 #define SYMFLAG_PARAMETER 0x00000040
639 #define SYMFLAG_LOCAL 0x00000080
640 #define SYMFLAG_CONSTANT 0x00000100
641 #define SYMFLAG_EXPORT 0x00000200
642 #define SYMFLAG_FORWARDER 0x00000400
643 #define SYMFLAG_FUNCTION 0x00000800
644 #define SYMFLAG_VIRTUAL 0x00001000
645 #define SYMFLAG_THUNK 0x00002000
646 #define SYMFLAG_TLSREL 0x00004000
648 typedef struct _SYMBOL_INFO
653 ULONG info
; /* sdk states info, while MSDN says it's Index... */
665 } SYMBOL_INFO
, *PSYMBOL_INFO
;
667 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
675 TI_GET_ARRAYINDEXTYPEID
,
678 TI_GET_ADDRESSOFFSET
,
682 TI_GET_CHILDRENCOUNT
,
684 TI_GET_VIRTUALBASECLASS
,
685 TI_GET_VIRTUALTABLESHAPEID
,
686 TI_GET_VIRTUALBASEPOINTEROFFSET
,
687 TI_GET_CLASSPARENTID
,
690 TI_GET_LEXICALPARENT
,
695 TI_GET_CALLING_CONVENTION
,
696 } IMAGEHLP_SYMBOL_TYPE_INFO
;
698 typedef struct _TI_FINDCHILDREN_PARAMS
703 } TI_FINDCHILDREN_PARAMS
;
705 #define UNDNAME_COMPLETE (0x0000)
706 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
707 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
708 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
709 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
710 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
711 #define UNDNAME_NO_MS_THISTYPE (0x0020)
712 #define UNDNAME_NO_CV_THISTYPE (0x0040)
713 #define UNDNAME_NO_THISTYPE (0x0060)
714 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
715 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
716 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
717 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
718 #define UNDNAME_32_BIT_DECODE (0x0800)
719 #define UNDNAME_NAME_ONLY (0x1000)
720 #define UNDNAME_NO_ARGUMENTS (0x2000)
721 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
723 BOOL WINAPI
SymGetTypeInfo(HANDLE
, DWORD64
, ULONG
, IMAGEHLP_SYMBOL_TYPE_INFO
, PVOID
);
724 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACK
)(PSYMBOL_INFO
, ULONG
, PVOID
);
725 BOOL WINAPI
SymEnumTypes(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
726 BOOL WINAPI
SymFromAddr(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFO
*);
727 BOOL WINAPI
SymFromName(HANDLE
, LPSTR
, PSYMBOL_INFO
);
728 BOOL WINAPI
SymGetSymFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_SYMBOL
);
729 BOOL WINAPI
SymGetSymFromName(HANDLE
, PSTR
, PIMAGEHLP_SYMBOL
);
730 BOOL WINAPI
SymGetTypeFromName(HANDLE
, ULONG64
, LPSTR
, PSYMBOL_INFO
);
731 BOOL WINAPI
SymGetSymNext(HANDLE
, PIMAGEHLP_SYMBOL
);
732 BOOL WINAPI
SymGetSymPrev(HANDLE
, PIMAGEHLP_SYMBOL
);
733 BOOL WINAPI
SymEnumSymbols(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
,
735 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK
)(PSTR
, DWORD
, ULONG
, PVOID
);
736 BOOL WINAPI
SymEnumerateSymbols(HANDLE
, DWORD
, PSYM_ENUMSYMBOLS_CALLBACK
, PVOID
);
737 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK
)(HANDLE
, ULONG
, PVOID
, PVOID
);
738 BOOL WINAPI
SymRegisterCallback(HANDLE
, PSYMBOL_REGISTERED_CALLBACK
, PVOID
);
739 BOOL WINAPI
SymUnDName(PIMAGEHLP_SYMBOL
, PSTR
, DWORD
);
740 DWORD WINAPI
UnDecorateSymbolName(LPCSTR
, LPSTR
, DWORD
, DWORD
);
742 /*************************
744 *************************/
745 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCFILES_CALLBACK
)(PSOURCEFILE
, PVOID
);
747 BOOL WINAPI
SymEnumSourceFiles(HANDLE
, ULONG64
, LPSTR
, PSYM_ENUMSOURCFILES_CALLBACK
,
749 BOOL WINAPI
SymGetLineFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINE
);
750 BOOL WINAPI
SymGetLinePrev(HANDLE
, PIMAGEHLP_LINE
);
751 BOOL WINAPI
SymGetLineNext(HANDLE
, PIMAGEHLP_LINE
);
753 /*************************
754 * File & image handling *
755 *************************/
756 BOOL WINAPI
SymInitialize(HANDLE
, PSTR
, BOOL
);
757 BOOL WINAPI
SymCleanup(HANDLE
);
759 HANDLE WINAPI
FindDebugInfoFile(PSTR
, PSTR
, PSTR
);
760 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACK
)(HANDLE
, PSTR
, PVOID
);
761 HANDLE WINAPI
FindDebugInfoFileEx(PSTR
, PSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
762 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACK
)(PSTR
, PVOID
);
763 BOOL WINAPI
SymFindFileInPath(HANDLE
, LPSTR
, LPSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
764 LPSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
765 HANDLE WINAPI
FindExecutableImage(PSTR
, PSTR
, PSTR
);
766 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACK
)(HANDLE
, PSTR
, PVOID
);
767 HANDLE WINAPI
FindExecutableImageEx(PSTR
, PSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
768 PIMAGE_NT_HEADERS WINAPI
ImageNtHeader(PVOID
);
769 PVOID WINAPI
ImageDirectoryEntryToDataEx(PVOID
, BOOLEAN
, USHORT
, PULONG
,
770 PIMAGE_SECTION_HEADER
*);
771 PVOID WINAPI
ImageDirectoryEntryToData(PVOID
, BOOLEAN
, USHORT
, PULONG
);
772 PIMAGE_SECTION_HEADER WINAPI
ImageRvaToSection(PIMAGE_NT_HEADERS
, PVOID
, ULONG
);
773 PVOID WINAPI
ImageRvaToVa(PIMAGE_NT_HEADERS
, PVOID
, ULONG
, PIMAGE_SECTION_HEADER
*);
774 BOOL WINAPI
SymGetSearchPath(HANDLE
, PSTR
, DWORD
);
775 BOOL WINAPI
SymSetSearchPath(HANDLE
, PSTR
);
776 DWORD WINAPI
GetTimestampForLoadedLibrary(HMODULE
);
777 BOOL WINAPI
MakeSureDirectoryPathExists(PCSTR
);
778 BOOL WINAPI
SearchTreeForFile(PSTR
, PSTR
, PSTR
);
779 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACK
)(LPCSTR
, PVOID
);
780 BOOL WINAPI
EnumDirTree(HANDLE
, PCSTR
, PCSTR
, LPSTR
, PENUMDIRTREE_CALLBACK
, void*);
781 BOOL WINAPI
SymMatchFileName(LPSTR
, LPSTR
, LPSTR
*, LPSTR
*);
783 /*************************
784 * Context management *
785 *************************/
786 BOOL WINAPI
SymSetContext(HANDLE
, PIMAGEHLP_STACK_FRAME
, PIMAGEHLP_CONTEXT
);
789 /*************************
791 *************************/
793 typedef struct _KDHELP
796 DWORD ThCallbackStack
;
799 DWORD KiCallUserMode
;
800 DWORD KeUserCallbackDispatcher
;
801 DWORD SystemRangeStart
;
804 typedef struct _STACKFRAME
810 PVOID FuncTableEntry
;
817 } STACKFRAME
, *LPSTACKFRAME
;
819 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE
)
820 (HANDLE
, DWORD
, PVOID
, DWORD
, PDWORD
);
821 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE
)(HANDLE
, DWORD
);
822 typedef DWORD (CALLBACK
*PGET_MODULE_BASE_ROUTINE
)(HANDLE
, DWORD
);
823 typedef DWORD (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE
)(HANDLE
, HANDLE
, LPADDRESS
);
824 BOOL WINAPI
StackWalk(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME
, PVOID
,
825 PREAD_PROCESS_MEMORY_ROUTINE
,
826 PFUNCTION_TABLE_ACCESS_ROUTINE
,
827 PGET_MODULE_BASE_ROUTINE
,
828 PTRANSLATE_ADDRESS_ROUTINE
);
830 PVOID WINAPI
SymFunctionTableAccess(HANDLE
, DWORD
);
832 /*************************
833 * Version, global stuff *
834 *************************/
836 typedef struct API_VERSION
842 } API_VERSION
, *LPAPI_VERSION
;
844 LPAPI_VERSION WINAPI
ImagehlpApiVersion(void);
845 LPAPI_VERSION WINAPI
ImagehlpApiVersionEx(LPAPI_VERSION
);
847 typedef struct _IMAGE_DEBUG_INFORMATION
851 PVOID ReservedMappedBase
;
852 USHORT ReservedMachine
;
853 USHORT ReservedCharacteristics
;
854 DWORD ReservedCheckSum
;
857 DWORD ReservedNumberOfSections
;
858 PIMAGE_SECTION_HEADER ReservedSections
;
859 DWORD ReservedExportedNamesSize
;
860 PSTR ReservedExportedNames
;
861 DWORD ReservedNumberOfFunctionTableEntries
;
862 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries
;
863 DWORD ReservedLowestFunctionStartingAddress
;
864 DWORD ReservedHighestFunctionEndingAddress
;
865 DWORD ReservedNumberOfFpoTableEntries
;
866 PFPO_DATA ReservedFpoTableEntries
;
867 DWORD SizeOfCoffSymbols
;
868 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols
;
869 DWORD ReservedSizeOfCodeViewSymbols
;
870 PVOID ReservedCodeViewSymbols
;
873 PSTR ReservedDebugFilePath
;
874 DWORD ReservedTimeDateStamp
;
875 BOOL ReservedRomImage
;
876 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory
;
877 DWORD ReservedNumberOfDebugDirectories
;
878 DWORD ReservedOriginalFunctionTableBaseAddress
;
880 } IMAGE_DEBUG_INFORMATION
, *PIMAGE_DEBUG_INFORMATION
;
883 PIMAGE_DEBUG_INFORMATION WINAPI
MapDebugInformation(HANDLE
, PSTR
, PSTR
, DWORD
);
885 BOOL WINAPI
UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION
);
887 DWORD WINAPI
SymGetOptions(void);
888 DWORD WINAPI
SymSetOptions(DWORD
);
890 /* Symbol server bits */
891 typedef BOOL (WINAPI
* PSYMBOLSERVERPROC
)(LPCSTR
, LPCSTR
, PVOID
, DWORD
, DWORD
, LPSTR
);
892 typedef BOOL (WINAPI
* PSYMBOLSERVEROPENPROC
)(void);
893 typedef BOOL (WINAPI
* PSYMBOLSERVERCLOSEPROC
)(void);
894 typedef BOOL (WINAPI
* PSYMBOLSERVERSETOPTIONSPROC
)(UINT_PTR
, ULONG64
);
895 typedef BOOL (CALLBACK
* PSYMBOLSERVERCALLBACKPROC
)(UINT_PTR
, ULONG64
, ULONG64
);
896 typedef UINT_PTR (WINAPI
* PSYMBOLSERVERGETOPTIONSPROC
)();
897 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROC
)(LPCSTR
);
899 #define SSRVOPT_CALLBACK 0x0001
900 #define SSRVOPT_DWORD 0x0002
901 #define SSRVOPT_DWORDPTR 0x0004
902 #define SSRVOPT_GUIDPTR 0x0008
903 #define SSRVOPT_OLDGUIDPTR 0x0010
904 #define SSRVOPT_UNATTENDED 0x0020
905 #define SSRVOPT_NOCOPY 0x0040
906 #define SSRVOPT_PARENTWIN 0x0080
907 #define SSRVOPT_PARAMTYPE 0x0100
908 #define SSRVOPT_SECURE 0x0200
909 #define SSRVOPT_TRACE 0x0400
910 #define SSRVOPT_SETCONTEXT 0x0800
911 #define SSRVOPT_PROXY 0x1000
912 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
913 #define SSRVOPT_RESET ((ULONG_PTR)-1)
915 #define SSRVACTION_TRACE 1
916 #define SSRVACTION_QUERYCANCEL 2
917 #define SSRVACTION_EVENT 3
921 #endif /* defined(__cplusplus) */
923 #endif /* __WINE_DBGHELP_H */