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., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
21 #ifndef __WINE_DBGHELP_H
22 #define __WINE_DBGHELP_H
24 #include <minidumpapiset.h>
28 #endif /* defined(__cplusplus) */
36 #define IMAGEAPI WINAPI
37 #define DBHLPAPI IMAGEAPI
39 typedef struct _LOADED_IMAGE
44 PIMAGE_NT_HEADERS FileHeader
;
45 PIMAGE_SECTION_HEADER LastRvaSection
;
46 ULONG NumberOfSections
;
47 PIMAGE_SECTION_HEADER Sections
;
48 ULONG Characteristics
;
55 } LOADED_IMAGE
, *PLOADED_IMAGE
;
57 /*************************
59 *************************/
69 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
70 #define ADDRESS ADDRESS64
71 #define LPADDRESS LPADDRESS64
73 typedef struct _tagADDRESS
78 } ADDRESS
, *LPADDRESS
;
81 typedef struct _tagADDRESS64
86 } ADDRESS64
, *LPADDRESS64
;
88 #define SYMF_OMAP_GENERATED 0x00000001
89 #define SYMF_OMAP_MODIFIED 0x00000002
90 #define SYMF_USER_GENERATED 0x00000004
91 #define SYMF_REGISTER 0x00000008
92 #define SYMF_REGREL 0x00000010
93 #define SYMF_FRAMEREL 0x00000020
94 #define SYMF_PARAMETER 0x00000040
95 #define SYMF_LOCAL 0x00000080
96 #define SYMF_CONSTANT 0x00000100
97 #define SYMF_EXPORT 0x00000200
98 #define SYMF_FORWARDER 0x00000400
99 #define SYMF_FUNCTION 0x00000800
100 #define SYMF_VIRTUAL 0x00001000
101 #define SYMF_THUNK 0x00002000
102 #define SYMF_TLSREL 0x00004000
118 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
119 #define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
120 #define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64
121 #define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
122 #define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64
124 typedef struct _IMAGEHLP_SYMBOL
132 } IMAGEHLP_SYMBOL
, *PIMAGEHLP_SYMBOL
;
134 typedef struct _IMAGEHLP_SYMBOLW
142 } IMAGEHLP_SYMBOLW
, *PIMAGEHLP_SYMBOLW
;
145 typedef struct _IMAGEHLP_SYMBOL64
153 } IMAGEHLP_SYMBOL64
, *PIMAGEHLP_SYMBOL64
;
155 typedef struct _IMAGEHLP_SYMBOLW64
163 } IMAGEHLP_SYMBOLW64
, *PIMAGEHLP_SYMBOLW64
;
165 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
166 #define IMAGEHLP_MODULE IMAGEHLP_MODULE64
167 #define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
168 #define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
169 #define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
171 typedef struct _IMAGEHLP_MODULE
182 CHAR LoadedImageName
[256];
183 } IMAGEHLP_MODULE
, *PIMAGEHLP_MODULE
;
185 typedef struct _IMAGEHLP_MODULEW
194 WCHAR ModuleName
[32];
195 WCHAR ImageName
[256];
196 WCHAR LoadedImageName
[256];
197 } IMAGEHLP_MODULEW
, *PIMAGEHLP_MODULEW
;
200 typedef struct _IMAGEHLP_MODULE64
211 CHAR LoadedImageName
[256];
212 CHAR LoadedPdbName
[256];
214 CHAR CVData
[MAX_PATH
*3];
227 } IMAGEHLP_MODULE64
, *PIMAGEHLP_MODULE64
;
229 typedef struct _IMAGEHLP_MODULEW64
238 WCHAR ModuleName
[32];
239 WCHAR ImageName
[256];
240 WCHAR LoadedImageName
[256];
241 WCHAR LoadedPdbName
[256];
243 WCHAR CVData
[MAX_PATH
*3];
256 } IMAGEHLP_MODULEW64
, *PIMAGEHLP_MODULEW64
;
258 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
259 #define IMAGEHLP_LINE IMAGEHLP_LINE64
260 #define PIMAGEHLP_LINE PIMAGEHLP_LINE64
261 #define IMAGEHLP_LINEW IMAGEHLP_LINEW64
262 #define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64
264 typedef struct _IMAGEHLP_LINE
271 } IMAGEHLP_LINE
, *PIMAGEHLP_LINE
;
273 typedef struct _IMAGEHLP_LINEW
280 } IMAGEHLP_LINEW
, *PIMAGEHLP_LINEW
;
283 typedef struct _IMAGEHLP_LINE64
290 } IMAGEHLP_LINE64
, *PIMAGEHLP_LINE64
;
292 typedef struct _IMAGEHLP_LINEW64
299 } IMAGEHLP_LINEW64
, *PIMAGEHLP_LINEW64
;
301 typedef struct _SOURCEFILE
305 } SOURCEFILE
, *PSOURCEFILE
;
307 typedef struct _SOURCEFILEW
311 } SOURCEFILEW
, *PSOURCEFILEW
;
313 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
314 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
315 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
316 #define CBA_SYMBOLS_UNLOADED 0x00000004
317 #define CBA_DUPLICATE_SYMBOL 0x00000005
318 #define CBA_READ_MEMORY 0x00000006
319 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
320 #define CBA_SET_OPTIONS 0x00000008
321 #define CBA_EVENT 0x00000010
322 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
323 #define CBA_DEBUG_INFO 0x10000000
325 typedef struct _IMAGEHLP_CBA_READ_MEMORY
331 } IMAGEHLP_CBA_READ_MEMORY
, *PIMAGEHLP_CBA_READ_MEMORY
;
342 #define EVENT_SRCSPEW_START 100
343 #define EVENT_SRCSPEW 100
344 #define EVENT_SRCSPEW_END 199
346 typedef struct _IMAGEHLP_CBA_EVENT
352 } IMAGEHLP_CBA_EVENT
, *PIMAGEHLP_CBA_EVENT
;
354 typedef struct _IMAGEHLP_CBA_EVENTW
360 } IMAGEHLP_CBA_EVENTW
, *PIMAGEHLP_CBA_EVENTW
;
362 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
363 #define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
364 #define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
366 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
372 CHAR FileName
[MAX_PATH
];
375 } IMAGEHLP_DEFERRED_SYMBOL_LOAD
, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD
;
378 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
384 CHAR FileName
[MAX_PATH
];
388 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64
, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
;
390 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64
396 WCHAR FileName
[MAX_PATH
+ 1];
400 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64
, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64
;
402 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
403 #define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
404 #define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
406 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
410 PIMAGEHLP_SYMBOL Symbol
;
411 DWORD SelectedSymbol
;
412 } IMAGEHLP_DUPLICATE_SYMBOL
, *PIMAGEHLP_DUPLICATE_SYMBOL
;
415 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
419 PIMAGEHLP_SYMBOL64 Symbol
;
420 DWORD SelectedSymbol
;
421 } IMAGEHLP_DUPLICATE_SYMBOL64
, *PIMAGEHLP_DUPLICATE_SYMBOL64
;
423 #define SYMOPT_CASE_INSENSITIVE 0x00000001
424 #define SYMOPT_UNDNAME 0x00000002
425 #define SYMOPT_DEFERRED_LOADS 0x00000004
426 #define SYMOPT_NO_CPP 0x00000008
427 #define SYMOPT_LOAD_LINES 0x00000010
428 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
429 #define SYMOPT_LOAD_ANYTHING 0x00000040
430 #define SYMOPT_IGNORE_CVREC 0x00000080
431 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
432 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
433 #define SYMOPT_EXACT_SYMBOLS 0x00000400
434 #define SYMOPT_WILD_UNDERSCORE 0x00000800
435 #define SYMOPT_USE_DEFAULTS 0x00001000
436 /* latest SDK defines:
437 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
438 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
440 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
441 #define SYMOPT_PUBLICS_ONLY 0x00004000
442 #define SYMOPT_NO_PUBLICS 0x00008000
443 #define SYMOPT_AUTO_PUBLICS 0x00010000
444 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
445 #define SYMOPT_SECURE 0x00040000
446 #define SYMOPT_NO_PROMPTS 0x00080000
447 #define SYMOPT_OVERWRITE 0x00100000
448 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000
449 #define SYMOPT_FLAT_DIRECTORY 0x00400000
450 #define SYMOPT_FAVOR_COMPRESSED 0x00800000
451 #define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000
452 #define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000
453 #define SYMOPT_READONLY_CACHE 0x04000000
454 #define SYMOPT_SYMPATH_LAST 0x08000000
455 #define SYMOPT_DISABLE_FAST_SYMBOLS 0x10000000
456 #define SYMOPT_DISABLE_SYMSRV_TIMEOUT 0x20000000
457 #define SYMOPT_DISABLE_SRVSTAR_ON_STARTUP 0x40000000
458 #define SYMOPT_DEBUG 0x80000000
460 typedef struct _IMAGEHLP_STACK_FRAME
462 ULONG64 InstructionOffset
;
463 ULONG64 ReturnOffset
;
466 ULONG64 BackingStoreOffset
;
467 ULONG64 FuncTableEntry
;
472 } IMAGEHLP_STACK_FRAME
, *PIMAGEHLP_STACK_FRAME
;
474 typedef VOID IMAGEHLP_CONTEXT
, *PIMAGEHLP_CONTEXT
;
476 #define DBHHEADER_DEBUGDIRS 0x1
477 typedef struct _DBGHELP_MODLOAD_DATA
484 } MODLOAD_DATA
, *PMODLOAD_DATA
;
486 /*************************
488 *************************/
490 /* flags for SymLoadModuleEx */
491 #define SLMFLAG_VIRTUAL 0x1
492 #define SLMFLAG_NO_SYMBOLS 0x4
494 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK64
)(PCSTR
, DWORD64
, ULONG
, PVOID
);
495 BOOL WINAPI
EnumerateLoadedModules64(HANDLE
, PENUMLOADED_MODULES_CALLBACK64
, PVOID
);
496 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACKW64
)(PCWSTR
, DWORD64
, ULONG
, PVOID
);
497 BOOL WINAPI
EnumerateLoadedModulesW64(HANDLE
, PENUMLOADED_MODULES_CALLBACKW64
, PVOID
);
498 BOOL WINAPI
EnumerateLoadedModulesEx(HANDLE
, PENUMLOADED_MODULES_CALLBACK64
, PVOID
);
499 BOOL WINAPI
EnumerateLoadedModulesExW(HANDLE
, PENUMLOADED_MODULES_CALLBACKW64
, PVOID
);
500 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK64
)(PCSTR
, DWORD64
, PVOID
);
501 BOOL WINAPI
SymEnumerateModules64(HANDLE
, PSYM_ENUMMODULES_CALLBACK64
, PVOID
);
502 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACKW64
)(PCWSTR
, DWORD64
, PVOID
);
503 BOOL WINAPI
SymEnumerateModulesW64(HANDLE
, PSYM_ENUMMODULES_CALLBACKW64
, PVOID
);
504 BOOL WINAPI
SymGetModuleInfo64(HANDLE
, DWORD64
, PIMAGEHLP_MODULE64
);
505 BOOL WINAPI
SymGetModuleInfoW64(HANDLE
, DWORD64
, PIMAGEHLP_MODULEW64
);
506 DWORD64 WINAPI
SymGetModuleBase64(HANDLE
, DWORD64
);
507 DWORD64 WINAPI
SymLoadModule64(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD64
, DWORD
);
508 DWORD64 WINAPI
SymLoadModuleEx(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD64
, DWORD
,
509 PMODLOAD_DATA
, DWORD
);
510 DWORD64 WINAPI
SymLoadModuleExW(HANDLE
, HANDLE
, PCWSTR
, PCWSTR
, DWORD64
, DWORD
,
511 PMODLOAD_DATA
, DWORD
);
512 BOOL WINAPI
SymUnloadModule64(HANDLE
, DWORD64
);
514 /*************************
516 *************************/
518 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
519 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
520 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
521 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
522 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
523 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
524 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
525 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
527 #define SYMFLAG_VALUEPRESENT 0x00000001
528 #define SYMFLAG_REGISTER 0x00000008
529 #define SYMFLAG_REGREL 0x00000010
530 #define SYMFLAG_FRAMEREL 0x00000020
531 #define SYMFLAG_PARAMETER 0x00000040
532 #define SYMFLAG_LOCAL 0x00000080
533 #define SYMFLAG_CONSTANT 0x00000100
534 #define SYMFLAG_EXPORT 0x00000200
535 #define SYMFLAG_FORWARDER 0x00000400
536 #define SYMFLAG_FUNCTION 0x00000800
537 #define SYMFLAG_VIRTUAL 0x00001000
538 #define SYMFLAG_THUNK 0x00002000
539 #define SYMFLAG_TLSREL 0x00004000
540 #define SYMFLAG_SLOT 0x00008000
541 #define SYMFLAG_ILREL 0x00010000
542 #define SYMFLAG_METADATA 0x00020000
543 #define SYMFLAG_CLR_TOKEN 0x00040000
544 #define SYMFLAG_NULL 0x00080000
545 #define SYMFLAG_FUNC_NO_RETURN 0x00100000
546 #define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000
547 #define SYMFLAG_PUBLIC_CODE 0x00400000
549 #define MAX_SYM_NAME 2000
551 typedef struct _SYMBOL_INFO
568 } SYMBOL_INFO
, *PSYMBOL_INFO
;
570 typedef struct _SYMBOL_INFOW
587 } SYMBOL_INFOW
, *PSYMBOL_INFOW
;
589 typedef struct _SYMBOL_INFO_PACKAGE
592 CHAR name
[MAX_SYM_NAME
+1];
593 } SYMBOL_INFO_PACKAGE
, *PSYMBOL_INFO_PACKAGE
;
595 typedef struct _SYMBOL_INFO_PACKAGEW
598 WCHAR name
[MAX_SYM_NAME
+1];
599 } SYMBOL_INFO_PACKAGEW
, *PSYMBOL_INFO_PACKAGEW
;
601 typedef struct _SYMSRV_INDEX_INFO
604 CHAR file
[MAX_PATH
+ 1];
608 CHAR dbgfile
[MAX_PATH
+ 1];
609 CHAR pdbfile
[MAX_PATH
+ 1];
613 } SYMSRV_INDEX_INFO
, *PSYMSRV_INDEX_INFO
;
618 WCHAR file
[MAX_PATH
+ 1];
622 WCHAR dbgfile
[MAX_PATH
+ 1];
623 WCHAR pdbfile
[MAX_PATH
+ 1];
627 } SYMSRV_INDEX_INFOW
, *PSYMSRV_INDEX_INFOW
;
629 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
637 TI_GET_ARRAYINDEXTYPEID
,
640 TI_GET_ADDRESSOFFSET
,
644 TI_GET_CHILDRENCOUNT
,
646 TI_GET_VIRTUALBASECLASS
,
647 TI_GET_VIRTUALTABLESHAPEID
,
648 TI_GET_VIRTUALBASEPOINTEROFFSET
,
649 TI_GET_CLASSPARENTID
,
652 TI_GET_LEXICALPARENT
,
657 TI_GET_CALLING_CONVENTION
,
658 TI_IS_CLOSE_EQUIV_TO
,
660 TI_GET_VIRTUALBASEOFFSET
,
661 TI_GET_VIRTUALBASEDISPINDEX
,
663 TI_GET_INDIRECTVIRTUALBASECLASS
,
664 TI_GET_VIRTUALBASETABLETYPE
,
665 TI_GET_OBJECTPOINTERTYPE
,
666 IMAGEHLP_SYMBOL_TYPE_INFO_MAX
667 } IMAGEHLP_SYMBOL_TYPE_INFO
;
669 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
670 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
671 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
679 IMAGEHLP_SYMBOL_TYPE_INFO
* ReqKinds
;
680 PULONG_PTR ReqOffsets
;
683 ULONG_PTR BufferSize
;
685 ULONG EntriesMatched
;
688 ULONG64 AllReqsValid
;
691 } IMAGEHLP_GET_TYPE_INFO_PARAMS
, *PIMAGEHLP_GET_TYPE_INFO_PARAMS
;
693 typedef struct _TI_FINDCHILDREN_PARAMS
698 } TI_FINDCHILDREN_PARAMS
;
700 #define UNDNAME_COMPLETE (0x0000)
701 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
702 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
703 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
704 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
705 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
706 #define UNDNAME_NO_MS_THISTYPE (0x0020)
707 #define UNDNAME_NO_CV_THISTYPE (0x0040)
708 #define UNDNAME_NO_THISTYPE (0x0060)
709 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
710 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
711 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
712 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
713 #define UNDNAME_32_BIT_DECODE (0x0800)
714 #define UNDNAME_NAME_ONLY (0x1000)
715 #define UNDNAME_NO_ARGUMENTS (0x2000)
716 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
718 #define SYMSEARCH_MASKOBJS 0x01
719 #define SYMSEARCH_RECURSE 0x02
720 #define SYMSEARCH_GLOBALSONLY 0x04
722 BOOL WINAPI
SymGetTypeInfo(HANDLE
, DWORD64
, ULONG
, IMAGEHLP_SYMBOL_TYPE_INFO
, PVOID
);
723 BOOL WINAPI
SymGetTypeInfoEx(HANDLE
, DWORD64
, PIMAGEHLP_GET_TYPE_INFO_PARAMS
);
724 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACK
)(PSYMBOL_INFO
, ULONG
, PVOID
);
725 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACKW
)(PSYMBOL_INFOW
, ULONG
, PVOID
);
726 BOOL WINAPI
SymEnumTypes(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
727 BOOL WINAPI
SymEnumTypesW(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
728 BOOL WINAPI
SymEnumTypesByName(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
729 BOOL WINAPI
SymEnumTypesByNameW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
730 BOOL WINAPI
SymFromAddr(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFO
*);
731 BOOL WINAPI
SymFromAddrW(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFOW
*);
732 BOOL WINAPI
SymFromInlineContext(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFO
);
733 BOOL WINAPI
SymFromInlineContextW(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFOW
);
734 BOOL WINAPI
SymFromToken(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFO
);
735 BOOL WINAPI
SymFromTokenW(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFOW
);
736 BOOL WINAPI
SymFromName(HANDLE
, PCSTR
, PSYMBOL_INFO
);
737 BOOL WINAPI
SymFromNameW(HANDLE
, PCWSTR
, PSYMBOL_INFOW
);
738 BOOL WINAPI
SymGetSymFromAddr64(HANDLE
, DWORD64
, PDWORD64
, PIMAGEHLP_SYMBOL64
);
739 BOOL WINAPI
SymGetSymFromName64(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL64
);
740 BOOL WINAPI
SymGetTypeFromName(HANDLE
, ULONG64
, PCSTR
, PSYMBOL_INFO
);
741 BOOL WINAPI
SymGetTypeFromNameW(HANDLE
, ULONG64
, PCWSTR
, PSYMBOL_INFOW
);
742 BOOL WINAPI
SymGetSymNext64(HANDLE
, PIMAGEHLP_SYMBOL64
);
743 BOOL WINAPI
SymGetSymNextW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
744 BOOL WINAPI
SymGetSymPrev64(HANDLE
, PIMAGEHLP_SYMBOL64
);
745 BOOL WINAPI
SymGetSymPrevW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
746 BOOL WINAPI
SymEnumSym(HANDLE
,ULONG64
,PSYM_ENUMERATESYMBOLS_CALLBACK
,PVOID
);
747 BOOL WINAPI
SymEnumSymbols(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
,
749 BOOL WINAPI
SymEnumSymbolsW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
,
751 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64
)(PCSTR
, DWORD64
, ULONG
, PVOID
);
752 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64W
)(PCWSTR
, DWORD64
, ULONG
, PVOID
);
753 BOOL WINAPI
SymEnumerateSymbols64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64
, PVOID
);
754 BOOL WINAPI
SymEnumerateSymbolsW64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64W
, PVOID
);
755 BOOL WINAPI
SymEnumSymbolsForAddr(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
756 BOOL WINAPI
SymEnumSymbolsForAddrW(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
757 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK64
)(HANDLE
, ULONG
, ULONG64
, ULONG64
);
758 BOOL WINAPI
SymRegisterCallback64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
759 BOOL WINAPI
SymRegisterCallbackW64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
760 BOOL WINAPI
SymUnDName64(PIMAGEHLP_SYMBOL64
, PSTR
, DWORD
);
761 BOOL WINAPI
SymMatchString(PCSTR
, PCSTR
, BOOL
);
762 BOOL WINAPI
SymMatchStringA(PCSTR
, PCSTR
, BOOL
);
763 BOOL WINAPI
SymMatchStringW(PCWSTR
, PCWSTR
, BOOL
);
764 BOOL WINAPI
SymSearch(HANDLE
, ULONG64
, DWORD
, DWORD
, PCSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
, DWORD
);
765 BOOL WINAPI
SymSearchW(HANDLE
, ULONG64
, DWORD
, DWORD
, PCWSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
, DWORD
);
766 DWORD WINAPI
UnDecorateSymbolName(PCSTR
, PSTR
, DWORD
, DWORD
);
767 DWORD WINAPI
UnDecorateSymbolNameW(PCWSTR
, PWSTR
, DWORD
, DWORD
);
768 BOOL WINAPI
SymGetScope(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
769 BOOL WINAPI
SymGetScopeW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
770 BOOL WINAPI
SymFromIndex(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
771 BOOL WINAPI
SymFromIndexW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
772 BOOL WINAPI
SymAddSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
, DWORD
);
773 BOOL WINAPI
SymAddSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
, DWORD
);
774 BOOL WINAPI
SymDeleteSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
);
775 BOOL WINAPI
SymDeleteSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
);
783 BOOL WINAPI
SymGetOmaps(HANDLE
, DWORD64
, POMAP
*, PDWORD64
, POMAP
*, PDWORD64
);
785 /*************************
787 *************************/
788 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACK
)(PSOURCEFILE
, PVOID
);
789 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACKW
)(PSOURCEFILEW
, PVOID
);
791 BOOL WINAPI
SymEnumSourceFiles(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMSOURCEFILES_CALLBACK
,
793 BOOL WINAPI
SymEnumSourceFilesW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMSOURCEFILES_CALLBACKW
, PVOID
);
794 BOOL WINAPI
SymGetLineFromAddr64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
795 BOOL WINAPI
SymGetLineFromAddrW64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
796 BOOL WINAPI
SymGetLineFromInlineContext(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
797 BOOL WINAPI
SymGetLineFromInlineContextW(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
798 BOOL WINAPI
SymGetLinePrev64(HANDLE
, PIMAGEHLP_LINE64
);
799 BOOL WINAPI
SymGetLinePrevW64(HANDLE
, PIMAGEHLP_LINEW64
);
800 BOOL WINAPI
SymGetLineNext64(HANDLE
, PIMAGEHLP_LINE64
);
801 BOOL WINAPI
SymGetLineNextW64(HANDLE
, PIMAGEHLP_LINEW64
);
802 BOOL WINAPI
SymGetLineFromName64(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE64
);
803 BOOL WINAPI
SymGetLineFromNameW64(HANDLE
, PCWSTR
, PCWSTR
, DWORD
, PLONG
, PIMAGEHLP_LINEW64
);
804 ULONG WINAPI
SymGetFileLineOffsets64(HANDLE
, PCSTR
, PCSTR
, PDWORD64
, ULONG
);
805 BOOL WINAPI
SymGetSourceFile(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSTR
, DWORD
);
806 BOOL WINAPI
SymGetSourceFileW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
807 BOOL WINAPI
SymGetSourceFileToken(HANDLE
, ULONG64
, PCSTR
, PVOID
*, DWORD
*);
808 BOOL WINAPI
SymGetSourceFileTokenW(HANDLE
, ULONG64
, PCWSTR
, PVOID
*, DWORD
*);
809 BOOL WINAPI
SymGetSourceFileFromToken(HANDLE
, PVOID
, PCSTR
, PSTR
, DWORD
);
810 BOOL WINAPI
SymGetSourceFileFromTokenW(HANDLE
, PVOID
, PCWSTR
, PWSTR
, DWORD
);
811 BOOL WINAPI
SymGetSourceVarFromToken(HANDLE
, PVOID
, PCSTR
, PCSTR
, PSTR
, DWORD
);
812 BOOL WINAPI
SymGetSourceVarFromTokenW(HANDLE
, PVOID
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
814 typedef struct _SRCCODEINFO
819 CHAR Obj
[MAX_PATH
+1];
820 CHAR FileName
[MAX_PATH
+1];
823 } SRCCODEINFO
, *PSRCCODEINFO
;
825 typedef struct _SRCCODEINFOW
830 WCHAR Obj
[MAX_PATH
+1];
831 WCHAR FileName
[MAX_PATH
+1];
834 } SRCCODEINFOW
, *PSRCCODEINFOW
;
836 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACK
)(PSRCCODEINFO
, PVOID
);
837 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACKW
)(PSRCCODEINFOW
, PVOID
);
838 BOOL WINAPI
SymEnumLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
839 BOOL WINAPI
SymEnumLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
840 BOOL WINAPI
SymEnumSourceLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
841 BOOL WINAPI
SymEnumSourceLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
843 /*************************
844 * File & image handling *
845 *************************/
846 BOOL WINAPI
SymInitialize(HANDLE
, PCSTR
, BOOL
);
847 BOOL WINAPI
SymInitializeW(HANDLE
, PCWSTR
, BOOL
);
848 BOOL WINAPI
SymCleanup(HANDLE
);
850 HANDLE WINAPI
FindDebugInfoFile(PCSTR
, PCSTR
, PSTR
);
851 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACK
)(HANDLE
, PCSTR
, PVOID
);
852 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACKW
)(HANDLE
, PCWSTR
, PVOID
);
853 HANDLE WINAPI
FindDebugInfoFileEx(PCSTR
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
854 HANDLE WINAPI
FindDebugInfoFileExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
855 HANDLE WINAPI
SymFindDebugInfoFile(HANDLE
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
856 HANDLE WINAPI
SymFindDebugInfoFileW(HANDLE
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
857 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACK
)(PCSTR
, PVOID
);
858 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACKW
)(PCWSTR
, PVOID
);
859 BOOL WINAPI
FindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
860 PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
861 BOOL WINAPI
SymFindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
862 PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
863 BOOL WINAPI
SymFindFileInPathW(HANDLE
, PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
864 PWSTR
, PFINDFILEINPATHCALLBACKW
, PVOID
);
865 HANDLE WINAPI
FindExecutableImage(PCSTR
, PCSTR
, PSTR
);
866 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACK
)(HANDLE
, PCSTR
, PVOID
);
867 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACKW
)(HANDLE
, PCWSTR
, PVOID
);
868 HANDLE WINAPI
FindExecutableImageEx(PCSTR
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
869 HANDLE WINAPI
FindExecutableImageExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
870 HANDLE WINAPI
SymFindExecutableImage(HANDLE
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
871 HANDLE WINAPI
SymFindExecutableImageW(HANDLE
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
872 PIMAGE_NT_HEADERS WINAPI
ImageNtHeader(PVOID
);
873 PVOID WINAPI
ImageDirectoryEntryToDataEx(PVOID
, BOOLEAN
, USHORT
, PULONG
,
874 PIMAGE_SECTION_HEADER
*);
875 PVOID WINAPI
ImageDirectoryEntryToData(PVOID
, BOOLEAN
, USHORT
, PULONG
);
876 PIMAGE_SECTION_HEADER WINAPI
ImageRvaToSection(PIMAGE_NT_HEADERS
, PVOID
, ULONG
);
877 PVOID WINAPI
ImageRvaToVa(PIMAGE_NT_HEADERS
, PVOID
, ULONG
, PIMAGE_SECTION_HEADER
*);
878 BOOL WINAPI
SymGetSearchPath(HANDLE
, PSTR
, DWORD
);
879 BOOL WINAPI
SymGetSearchPathW(HANDLE
, PWSTR
, DWORD
);
880 BOOL WINAPI
SymSetSearchPath(HANDLE
, PCSTR
);
881 BOOL WINAPI
SymSetSearchPathW(HANDLE
, PCWSTR
);
882 DWORD WINAPI
GetTimestampForLoadedLibrary(HMODULE
);
883 BOOL WINAPI
MakeSureDirectoryPathExists(PCSTR
);
884 BOOL WINAPI
SearchTreeForFile(PCSTR
, PCSTR
, PSTR
);
885 BOOL WINAPI
SearchTreeForFileW(PCWSTR
, PCWSTR
, PWSTR
);
886 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACK
)(PCSTR
, PVOID
);
887 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACKW
)(PCWSTR
, PVOID
);
888 BOOL WINAPI
EnumDirTree(HANDLE
, PCSTR
, PCSTR
, PSTR
, PENUMDIRTREE_CALLBACK
, PVOID
);
889 BOOL WINAPI
EnumDirTreeW(HANDLE
, PCWSTR
, PCWSTR
, PWSTR
, PENUMDIRTREE_CALLBACKW
, PVOID
);
890 BOOL WINAPI
SymMatchFileName(PCSTR
, PCSTR
, PSTR
*, PSTR
*);
891 BOOL WINAPI
SymMatchFileNameW(PCWSTR
, PCWSTR
, PWSTR
*, PWSTR
*);
892 PCHAR WINAPI
SymSetHomeDirectory(HANDLE
, PCSTR
);
893 PWSTR WINAPI
SymSetHomeDirectoryW(HANDLE
, PCWSTR
);
894 PCHAR WINAPI
SymGetHomeDirectory(DWORD
, PSTR
, size_t);
895 PWSTR WINAPI
SymGetHomeDirectoryW(DWORD
, PWSTR
, size_t);
901 /*************************
902 * Context management *
903 *************************/
904 BOOL WINAPI
SymSetContext(HANDLE
, PIMAGEHLP_STACK_FRAME
, PIMAGEHLP_CONTEXT
);
905 BOOL WINAPI
SymSetScopeFromIndex(HANDLE
, ULONG64
, ULONG
);
906 BOOL WINAPI
SymSetScopeFromAddr(HANDLE
, ULONG64
);
907 BOOL WINAPI
SymSetScopeFromInlineContext(HANDLE
, ULONG64
, ULONG
);
909 /*************************
911 *************************/
913 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
914 #define KDHELP KDHELP64
915 #define PKDHELP PKDHELP64
917 typedef struct _KDHELP
920 DWORD ThCallbackStack
;
923 DWORD KiCallUserMode
;
924 DWORD KeUserCallbackDispatcher
;
925 DWORD SystemRangeStart
;
929 typedef struct _KDHELP64
932 DWORD ThCallbackStack
;
933 DWORD ThCallbackBStore
;
936 DWORD64 KiCallUserMode
;
937 DWORD64 KeUserCallbackDispatcher
;
938 DWORD64 SystemRangeStart
;
940 } KDHELP64
, *PKDHELP64
;
942 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
943 #define STACKFRAME STACKFRAME64
944 #define LPSTACKFRAME LPSTACKFRAME64
946 typedef struct _STACKFRAME
952 PVOID FuncTableEntry
;
959 } STACKFRAME
, *LPSTACKFRAME
;
962 typedef struct _STACKFRAME64
965 ADDRESS64 AddrReturn
;
968 ADDRESS64 AddrBStore
;
969 PVOID FuncTableEntry
;
975 } STACKFRAME64
, *LPSTACKFRAME64
;
977 #define INLINE_FRAME_CONTEXT_INIT 0
978 #define INLINE_FRAME_CONTEXT_IGNORE 0xFFFFFFFF
980 typedef struct _tagSTACKFRAME_EX
983 ADDRESS64 AddrReturn
;
986 ADDRESS64 AddrBStore
;
987 PVOID FuncTableEntry
;
994 DWORD StackFrameSize
;
995 DWORD InlineFrameContext
;
996 } STACKFRAME_EX
, *LPSTACKFRAME_EX
;
999 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE64
)
1000 (HANDLE
, DWORD64
, PVOID
, DWORD
, PDWORD
);
1001 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE64
)(HANDLE
, DWORD64
);
1002 typedef DWORD64 (CALLBACK
*PGET_MODULE_BASE_ROUTINE64
)(HANDLE
, DWORD64
);
1003 typedef DWORD64 (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE64
)(HANDLE
, HANDLE
, LPADDRESS64
);
1004 BOOL WINAPI
StackWalk64(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME64
, PVOID
,
1005 PREAD_PROCESS_MEMORY_ROUTINE64
,
1006 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1007 PGET_MODULE_BASE_ROUTINE64
,
1008 PTRANSLATE_ADDRESS_ROUTINE64
);
1009 #define SYM_STKWALK_DEFAULT 0x00000000
1010 #define SYM_STKWALK_FORCE_FRAMEPTR 0x00000001
1011 BOOL WINAPI
StackWalkEx(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME_EX
, PVOID
,
1012 PREAD_PROCESS_MEMORY_ROUTINE64
,
1013 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1014 PGET_MODULE_BASE_ROUTINE64
,
1015 PTRANSLATE_ADDRESS_ROUTINE64
,
1017 PVOID WINAPI
SymFunctionTableAccess64(HANDLE
, DWORD64
);
1019 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK64
)(HANDLE
, ULONG64
, ULONG64
);
1021 BOOL WINAPI
SymRegisterFunctionEntryCallback64(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK64
, ULONG64
);
1022 BOOL WINAPI
SymGetUnwindInfo(HANDLE
, DWORD64
, PVOID
, PULONG
);
1024 /* Inline context related APIs */
1025 DWORD WINAPI
SymAddrIncludeInlineTrace(HANDLE
, DWORD64
);
1027 #define SYM_INLINE_COMP_ERROR 0
1028 #define SYM_INLINE_COMP_IDENTICAL 1
1029 #define SYM_INLINE_COMP_STEPIN 2
1030 #define SYM_INLINE_COMP_STEPOUT 3
1031 #define SYM_INLINE_COMP_STEPOVER 4
1032 #define SYM_INLINE_COMP_DIFFERENT 5
1034 DWORD WINAPI
SymCompareInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, DWORD64
);
1035 BOOL WINAPI
SymQueryInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, LPDWORD
, LPDWORD
);
1037 /*************************
1038 * Version, global stuff *
1039 *************************/
1041 #define API_VERSION_NUMBER 9
1043 typedef struct API_VERSION
1045 USHORT MajorVersion
;
1046 USHORT MinorVersion
;
1049 } API_VERSION
, *LPAPI_VERSION
;
1051 LPAPI_VERSION WINAPI
ImagehlpApiVersion(void);
1052 LPAPI_VERSION WINAPI
ImagehlpApiVersionEx(LPAPI_VERSION
);
1055 typedef struct _IMAGE_DEBUG_INFORMATION
1059 PVOID ReservedMappedBase
;
1060 USHORT ReservedMachine
;
1061 USHORT ReservedCharacteristics
;
1062 DWORD ReservedCheckSum
;
1065 DWORD ReservedNumberOfSections
;
1066 PIMAGE_SECTION_HEADER ReservedSections
;
1067 DWORD ReservedExportedNamesSize
;
1068 PSTR ReservedExportedNames
;
1069 DWORD ReservedNumberOfFunctionTableEntries
;
1070 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries
;
1071 DWORD ReservedLowestFunctionStartingAddress
;
1072 DWORD ReservedHighestFunctionEndingAddress
;
1073 DWORD ReservedNumberOfFpoTableEntries
;
1074 PFPO_DATA ReservedFpoTableEntries
;
1075 DWORD SizeOfCoffSymbols
;
1076 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols
;
1077 DWORD ReservedSizeOfCodeViewSymbols
;
1078 PVOID ReservedCodeViewSymbols
;
1081 PSTR ReservedDebugFilePath
;
1082 DWORD ReservedTimeDateStamp
;
1083 BOOL ReservedRomImage
;
1084 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory
;
1085 DWORD ReservedNumberOfDebugDirectories
;
1086 DWORD ReservedOriginalFunctionTableBaseAddress
;
1087 DWORD Reserved
[ 2 ];
1088 } IMAGE_DEBUG_INFORMATION
, *PIMAGE_DEBUG_INFORMATION
;
1090 PIMAGE_DEBUG_INFORMATION WINAPI
MapDebugInformation(HANDLE
, PCSTR
, PCSTR
, ULONG
);
1091 BOOL WINAPI
UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION
);
1096 SYMOPT_EX_DISABLEACCESSTIMEUPDATE
,
1100 SYMOPT_EX_WINE_NATIVE_MODULES
= 1000,
1102 } IMAGEHLP_EXTENDED_OPTIONS
;
1104 DWORD WINAPI
SymGetOptions(void);
1105 DWORD WINAPI
SymSetOptions(DWORD
);
1107 BOOL WINAPI
SymGetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
);
1108 BOOL WINAPI
SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
, BOOL value
);
1110 BOOL WINAPI
SymSetParentWindow(HWND
);
1112 /*************************
1113 * Version, global stuff *
1114 *************************/
1116 typedef BOOL (WINAPI
* PSYMBOLSERVERPROC
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1117 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCA
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1118 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCW
)(PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, PWSTR
);
1119 typedef BOOL (WINAPI
* PSYMBOLSERVEROPENPROC
)(void);
1120 typedef BOOL (WINAPI
* PSYMBOLSERVERCLOSEPROC
)(void);
1121 typedef BOOL (WINAPI
* PSYMBOLSERVERSETOPTIONSPROC
)(UINT_PTR
, ULONG64
);
1122 typedef BOOL (CALLBACK
* PSYMBOLSERVERCALLBACKPROC
)(UINT_PTR
, ULONG64
, ULONG64
);
1123 typedef UINT_PTR (WINAPI
* PSYMBOLSERVERGETOPTIONSPROC
)(void);
1124 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROC
)(PCSTR
);
1125 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCA
)(PCSTR
);
1126 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCW
)(PCWSTR
);
1128 #define SSRVOPT_CALLBACK 0x0001
1129 #define SSRVOPT_DWORD 0x0002
1130 #define SSRVOPT_DWORDPTR 0x0004
1131 #define SSRVOPT_GUIDPTR 0x0008
1132 #define SSRVOPT_OLDGUIDPTR 0x0010
1133 #define SSRVOPT_UNATTENDED 0x0020
1134 #define SSRVOPT_NOCOPY 0x0040
1135 #define SSRVOPT_PARENTWIN 0x0080
1136 #define SSRVOPT_PARAMTYPE 0x0100
1137 #define SSRVOPT_SECURE 0x0200
1138 #define SSRVOPT_TRACE 0x0400
1139 #define SSRVOPT_SETCONTEXT 0x0800
1140 #define SSRVOPT_PROXY 0x1000
1141 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1142 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1144 #define SSRVACTION_TRACE 1
1145 #define SSRVACTION_QUERYCANCEL 2
1146 #define SSRVACTION_EVENT 3
1148 /* 32-bit functions */
1150 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1152 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
1153 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
1154 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
1155 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
1156 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
1157 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
1158 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
1159 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
1160 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
1161 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
1163 #define EnumerateLoadedModules EnumerateLoadedModules64
1164 #define StackWalk StackWalk64
1165 #define SymEnumerateModules SymEnumerateModules64
1166 #define SymEnumerateSymbols SymEnumerateSymbols64
1167 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
1168 #define SymFunctionTableAccess SymFunctionTableAccess64
1169 #define SymGetLineFromAddr SymGetLineFromAddr64
1170 #define SymGetLineFromAddrW SymGetLineFromAddrW64
1171 #define SymGetLineFromName SymGetLineFromName64
1172 #define SymGetLineNext SymGetLineNext64
1173 #define SymGetLineNextW SymGetLineNextW64
1174 #define SymGetLinePrev SymGetLinePrev64
1175 #define SymGetLinePrevW SymGetLinePrevW64
1176 #define SymGetModuleBase SymGetModuleBase64
1177 #define SymGetModuleInfo SymGetModuleInfo64
1178 #define SymGetModuleInfoW SymGetModuleInfoW64
1179 #define SymGetSymFromAddr SymGetSymFromAddr64
1180 #define SymGetSymFromName SymGetSymFromName64
1181 #define SymGetSymNext SymGetSymNext64
1182 #define SymGetSymNextW SymGetSymNextW64
1183 #define SymGetSymPrev SymGetSymPrev64
1184 #define SymGetSymPrevW SymGetSymPrevW64
1185 #define SymLoadModule SymLoadModule64
1186 #define SymRegisterCallback SymRegisterCallback64
1187 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
1188 #define SymUnDName SymUnDName64
1189 #define SymUnloadModule SymUnloadModule64
1193 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1194 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE
)(HANDLE
, DWORD
);
1195 typedef DWORD (CALLBACK
*PGET_MODULE_BASE_ROUTINE
)(HANDLE
, DWORD
);
1196 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE
)(HANDLE
, DWORD
, PVOID
, DWORD
, PDWORD
);
1197 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK
)(PCSTR
, ULONG
, PVOID
);
1198 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1199 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACKW
)(PCWSTR
, ULONG
, ULONG
, PVOID
);
1200 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK
)(HANDLE
, ULONG
, PVOID
, PVOID
);
1201 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK
)(HANDLE
, DWORD
, PVOID
);
1202 typedef DWORD (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE
)(HANDLE
, HANDLE
, LPADDRESS
);
1204 BOOL WINAPI
EnumerateLoadedModules(HANDLE
, PENUMLOADED_MODULES_CALLBACK
, PVOID
);
1205 BOOL WINAPI
StackWalk(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME
, PVOID
, PREAD_PROCESS_MEMORY_ROUTINE
, PFUNCTION_TABLE_ACCESS_ROUTINE
, PGET_MODULE_BASE_ROUTINE
, PTRANSLATE_ADDRESS_ROUTINE
);
1206 BOOL WINAPI
SymEnumerateModules(HANDLE
, PSYM_ENUMMODULES_CALLBACK
, PVOID
);
1207 BOOL WINAPI
SymEnumerateSymbols(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACK
, PVOID
);
1208 BOOL WINAPI
SymEnumerateSymbolsW(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACKW
, PVOID
);
1209 PVOID WINAPI
SymFunctionTableAccess(HANDLE
, DWORD
);
1210 BOOL WINAPI
SymGetLineFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINE
);
1211 BOOL WINAPI
SymGetLineFromAddrW(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINEW
);
1212 BOOL WINAPI
SymGetLineFromName(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE
);
1213 BOOL WINAPI
SymGetLineNext(HANDLE
, PIMAGEHLP_LINE
);
1214 BOOL WINAPI
SymGetLineNextW(HANDLE
, PIMAGEHLP_LINEW
);
1215 BOOL WINAPI
SymGetLinePrev(HANDLE
, PIMAGEHLP_LINE
);
1216 BOOL WINAPI
SymGetLinePrevW(HANDLE
, PIMAGEHLP_LINEW
);
1217 DWORD WINAPI
SymGetModuleBase(HANDLE
, DWORD
);
1218 BOOL WINAPI
SymGetModuleInfo(HANDLE
, DWORD
, PIMAGEHLP_MODULE
);
1219 BOOL WINAPI
SymGetModuleInfoW(HANDLE
, DWORD
, PIMAGEHLP_MODULEW
);
1220 BOOL WINAPI
SymGetSymFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_SYMBOL
);
1221 BOOL WINAPI
SymGetSymFromName(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL
);
1222 BOOL WINAPI
SymGetSymNext(HANDLE
, PIMAGEHLP_SYMBOL
);
1223 BOOL WINAPI
SymGetSymNextW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1224 BOOL WINAPI
SymGetSymPrev(HANDLE
, PIMAGEHLP_SYMBOL
);
1225 BOOL WINAPI
SymGetSymPrevW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1226 DWORD WINAPI
SymLoadModule(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD
, DWORD
);
1227 BOOL WINAPI
SymRegisterCallback(HANDLE
, PSYMBOL_REGISTERED_CALLBACK
, PVOID
);
1228 BOOL WINAPI
SymRegisterFunctionEntryCallback(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK
, PVOID
);
1229 BOOL WINAPI
SymRefreshModuleList(HANDLE
);
1230 BOOL WINAPI
SymUnDName(PIMAGEHLP_SYMBOL
, PSTR
, DWORD
);
1231 BOOL WINAPI
SymUnloadModule(HANDLE
, DWORD
);
1237 #endif /* defined(__cplusplus) */
1239 #endif /* __WINE_DBGHELP_H */