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
);
513 BOOL WINAPI
SymRefreshModuleList(HANDLE
);
515 /*************************
517 *************************/
519 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
520 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
521 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
522 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
523 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
524 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
525 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
526 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
528 #define SYMFLAG_VALUEPRESENT 0x00000001
529 #define SYMFLAG_REGISTER 0x00000008
530 #define SYMFLAG_REGREL 0x00000010
531 #define SYMFLAG_FRAMEREL 0x00000020
532 #define SYMFLAG_PARAMETER 0x00000040
533 #define SYMFLAG_LOCAL 0x00000080
534 #define SYMFLAG_CONSTANT 0x00000100
535 #define SYMFLAG_EXPORT 0x00000200
536 #define SYMFLAG_FORWARDER 0x00000400
537 #define SYMFLAG_FUNCTION 0x00000800
538 #define SYMFLAG_VIRTUAL 0x00001000
539 #define SYMFLAG_THUNK 0x00002000
540 #define SYMFLAG_TLSREL 0x00004000
541 #define SYMFLAG_SLOT 0x00008000
542 #define SYMFLAG_ILREL 0x00010000
543 #define SYMFLAG_METADATA 0x00020000
544 #define SYMFLAG_CLR_TOKEN 0x00040000
545 #define SYMFLAG_NULL 0x00080000
546 #define SYMFLAG_FUNC_NO_RETURN 0x00100000
547 #define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000
548 #define SYMFLAG_PUBLIC_CODE 0x00400000
550 #define MAX_SYM_NAME 2000
552 typedef struct _SYMBOL_INFO
569 } SYMBOL_INFO
, *PSYMBOL_INFO
;
571 typedef struct _SYMBOL_INFOW
588 } SYMBOL_INFOW
, *PSYMBOL_INFOW
;
590 typedef struct _SYMBOL_INFO_PACKAGE
593 CHAR name
[MAX_SYM_NAME
+1];
594 } SYMBOL_INFO_PACKAGE
, *PSYMBOL_INFO_PACKAGE
;
596 typedef struct _SYMBOL_INFO_PACKAGEW
599 WCHAR name
[MAX_SYM_NAME
+1];
600 } SYMBOL_INFO_PACKAGEW
, *PSYMBOL_INFO_PACKAGEW
;
602 typedef struct _SYMSRV_INDEX_INFO
605 CHAR file
[MAX_PATH
+ 1];
609 CHAR dbgfile
[MAX_PATH
+ 1];
610 CHAR pdbfile
[MAX_PATH
+ 1];
614 } SYMSRV_INDEX_INFO
, *PSYMSRV_INDEX_INFO
;
619 WCHAR file
[MAX_PATH
+ 1];
623 WCHAR dbgfile
[MAX_PATH
+ 1];
624 WCHAR pdbfile
[MAX_PATH
+ 1];
628 } SYMSRV_INDEX_INFOW
, *PSYMSRV_INDEX_INFOW
;
630 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
638 TI_GET_ARRAYINDEXTYPEID
,
641 TI_GET_ADDRESSOFFSET
,
645 TI_GET_CHILDRENCOUNT
,
647 TI_GET_VIRTUALBASECLASS
,
648 TI_GET_VIRTUALTABLESHAPEID
,
649 TI_GET_VIRTUALBASEPOINTEROFFSET
,
650 TI_GET_CLASSPARENTID
,
653 TI_GET_LEXICALPARENT
,
658 TI_GET_CALLING_CONVENTION
,
659 TI_IS_CLOSE_EQUIV_TO
,
661 TI_GET_VIRTUALBASEOFFSET
,
662 TI_GET_VIRTUALBASEDISPINDEX
,
664 TI_GET_INDIRECTVIRTUALBASECLASS
,
665 TI_GET_VIRTUALBASETABLETYPE
,
666 TI_GET_OBJECTPOINTERTYPE
,
667 IMAGEHLP_SYMBOL_TYPE_INFO_MAX
668 } IMAGEHLP_SYMBOL_TYPE_INFO
;
670 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
671 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
672 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
680 IMAGEHLP_SYMBOL_TYPE_INFO
* ReqKinds
;
681 PULONG_PTR ReqOffsets
;
684 ULONG_PTR BufferSize
;
686 ULONG EntriesMatched
;
689 ULONG64 AllReqsValid
;
692 } IMAGEHLP_GET_TYPE_INFO_PARAMS
, *PIMAGEHLP_GET_TYPE_INFO_PARAMS
;
694 typedef struct _TI_FINDCHILDREN_PARAMS
699 } TI_FINDCHILDREN_PARAMS
;
701 #define UNDNAME_COMPLETE (0x0000)
702 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
703 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
704 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
705 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
706 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
707 #define UNDNAME_NO_MS_THISTYPE (0x0020)
708 #define UNDNAME_NO_CV_THISTYPE (0x0040)
709 #define UNDNAME_NO_THISTYPE (0x0060)
710 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
711 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
712 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
713 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
714 #define UNDNAME_32_BIT_DECODE (0x0800)
715 #define UNDNAME_NAME_ONLY (0x1000)
716 #define UNDNAME_NO_ARGUMENTS (0x2000)
717 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
719 #define SYMSEARCH_MASKOBJS 0x01
720 #define SYMSEARCH_RECURSE 0x02
721 #define SYMSEARCH_GLOBALSONLY 0x04
723 BOOL WINAPI
SymGetTypeInfo(HANDLE
, DWORD64
, ULONG
, IMAGEHLP_SYMBOL_TYPE_INFO
, PVOID
);
724 BOOL WINAPI
SymGetTypeInfoEx(HANDLE
, DWORD64
, PIMAGEHLP_GET_TYPE_INFO_PARAMS
);
725 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACK
)(PSYMBOL_INFO
, ULONG
, PVOID
);
726 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACKW
)(PSYMBOL_INFOW
, ULONG
, PVOID
);
727 BOOL WINAPI
SymEnumTypes(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
728 BOOL WINAPI
SymEnumTypesW(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
729 BOOL WINAPI
SymEnumTypesByName(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
730 BOOL WINAPI
SymEnumTypesByNameW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
731 BOOL WINAPI
SymFromAddr(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFO
*);
732 BOOL WINAPI
SymFromAddrW(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFOW
*);
733 BOOL WINAPI
SymFromInlineContext(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFO
);
734 BOOL WINAPI
SymFromInlineContextW(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFOW
);
735 BOOL WINAPI
SymFromToken(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFO
);
736 BOOL WINAPI
SymFromTokenW(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFOW
);
737 BOOL WINAPI
SymFromName(HANDLE
, PCSTR
, PSYMBOL_INFO
);
738 BOOL WINAPI
SymFromNameW(HANDLE
, PCWSTR
, PSYMBOL_INFOW
);
739 BOOL WINAPI
SymGetSymFromAddr64(HANDLE
, DWORD64
, PDWORD64
, PIMAGEHLP_SYMBOL64
);
740 BOOL WINAPI
SymGetSymFromName64(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL64
);
741 BOOL WINAPI
SymGetTypeFromName(HANDLE
, ULONG64
, PCSTR
, PSYMBOL_INFO
);
742 BOOL WINAPI
SymGetTypeFromNameW(HANDLE
, ULONG64
, PCWSTR
, PSYMBOL_INFOW
);
743 BOOL WINAPI
SymGetSymNext64(HANDLE
, PIMAGEHLP_SYMBOL64
);
744 BOOL WINAPI
SymGetSymNextW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
745 BOOL WINAPI
SymGetSymPrev64(HANDLE
, PIMAGEHLP_SYMBOL64
);
746 BOOL WINAPI
SymGetSymPrevW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
747 BOOL WINAPI
SymEnumSym(HANDLE
,ULONG64
,PSYM_ENUMERATESYMBOLS_CALLBACK
,PVOID
);
748 BOOL WINAPI
SymEnumSymbols(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
,
750 BOOL WINAPI
SymEnumSymbolsW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
,
752 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64
)(PCSTR
, DWORD64
, ULONG
, PVOID
);
753 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64W
)(PCWSTR
, DWORD64
, ULONG
, PVOID
);
754 BOOL WINAPI
SymEnumerateSymbols64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64
, PVOID
);
755 BOOL WINAPI
SymEnumerateSymbolsW64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64W
, PVOID
);
756 BOOL WINAPI
SymEnumSymbolsForAddr(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
757 BOOL WINAPI
SymEnumSymbolsForAddrW(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
758 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK64
)(HANDLE
, ULONG
, ULONG64
, ULONG64
);
759 BOOL WINAPI
SymRegisterCallback64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
760 BOOL WINAPI
SymRegisterCallbackW64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
761 BOOL WINAPI
SymUnDName64(PIMAGEHLP_SYMBOL64
, PSTR
, DWORD
);
762 BOOL WINAPI
SymMatchString(PCSTR
, PCSTR
, BOOL
);
763 BOOL WINAPI
SymMatchStringA(PCSTR
, PCSTR
, BOOL
);
764 BOOL WINAPI
SymMatchStringW(PCWSTR
, PCWSTR
, BOOL
);
765 BOOL WINAPI
SymSearch(HANDLE
, ULONG64
, DWORD
, DWORD
, PCSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
, DWORD
);
766 BOOL WINAPI
SymSearchW(HANDLE
, ULONG64
, DWORD
, DWORD
, PCWSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
, DWORD
);
767 DWORD WINAPI
UnDecorateSymbolName(PCSTR
, PSTR
, DWORD
, DWORD
);
768 DWORD WINAPI
UnDecorateSymbolNameW(PCWSTR
, PWSTR
, DWORD
, DWORD
);
769 BOOL WINAPI
SymGetScope(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
770 BOOL WINAPI
SymGetScopeW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
771 BOOL WINAPI
SymFromIndex(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
772 BOOL WINAPI
SymFromIndexW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
773 BOOL WINAPI
SymAddSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
, DWORD
);
774 BOOL WINAPI
SymAddSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
, DWORD
);
775 BOOL WINAPI
SymDeleteSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
);
776 BOOL WINAPI
SymDeleteSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
);
784 BOOL WINAPI
SymGetOmaps(HANDLE
, DWORD64
, POMAP
*, PDWORD64
, POMAP
*, PDWORD64
);
786 /*************************
788 *************************/
789 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACK
)(PSOURCEFILE
, PVOID
);
790 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACKW
)(PSOURCEFILEW
, PVOID
);
792 BOOL WINAPI
SymEnumSourceFiles(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMSOURCEFILES_CALLBACK
,
794 BOOL WINAPI
SymEnumSourceFilesW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMSOURCEFILES_CALLBACKW
, PVOID
);
795 BOOL WINAPI
SymGetLineFromAddr64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
796 BOOL WINAPI
SymGetLineFromAddrW64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
797 BOOL WINAPI
SymGetLineFromInlineContext(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
798 BOOL WINAPI
SymGetLineFromInlineContextW(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
799 BOOL WINAPI
SymGetLinePrev64(HANDLE
, PIMAGEHLP_LINE64
);
800 BOOL WINAPI
SymGetLinePrevW64(HANDLE
, PIMAGEHLP_LINEW64
);
801 BOOL WINAPI
SymGetLineNext64(HANDLE
, PIMAGEHLP_LINE64
);
802 BOOL WINAPI
SymGetLineNextW64(HANDLE
, PIMAGEHLP_LINEW64
);
803 BOOL WINAPI
SymGetLineFromName64(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE64
);
804 BOOL WINAPI
SymGetLineFromNameW64(HANDLE
, PCWSTR
, PCWSTR
, DWORD
, PLONG
, PIMAGEHLP_LINEW64
);
805 ULONG WINAPI
SymGetFileLineOffsets64(HANDLE
, PCSTR
, PCSTR
, PDWORD64
, ULONG
);
806 BOOL WINAPI
SymGetSourceFile(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSTR
, DWORD
);
807 BOOL WINAPI
SymGetSourceFileW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
808 BOOL WINAPI
SymGetSourceFileToken(HANDLE
, ULONG64
, PCSTR
, PVOID
*, DWORD
*);
809 BOOL WINAPI
SymGetSourceFileTokenW(HANDLE
, ULONG64
, PCWSTR
, PVOID
*, DWORD
*);
810 BOOL WINAPI
SymGetSourceFileFromToken(HANDLE
, PVOID
, PCSTR
, PSTR
, DWORD
);
811 BOOL WINAPI
SymGetSourceFileFromTokenW(HANDLE
, PVOID
, PCWSTR
, PWSTR
, DWORD
);
812 BOOL WINAPI
SymGetSourceVarFromToken(HANDLE
, PVOID
, PCSTR
, PCSTR
, PSTR
, DWORD
);
813 BOOL WINAPI
SymGetSourceVarFromTokenW(HANDLE
, PVOID
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
815 typedef struct _SRCCODEINFO
820 CHAR Obj
[MAX_PATH
+1];
821 CHAR FileName
[MAX_PATH
+1];
824 } SRCCODEINFO
, *PSRCCODEINFO
;
826 typedef struct _SRCCODEINFOW
831 WCHAR Obj
[MAX_PATH
+1];
832 WCHAR FileName
[MAX_PATH
+1];
835 } SRCCODEINFOW
, *PSRCCODEINFOW
;
837 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACK
)(PSRCCODEINFO
, PVOID
);
838 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACKW
)(PSRCCODEINFOW
, PVOID
);
839 BOOL WINAPI
SymEnumLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
840 BOOL WINAPI
SymEnumLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
841 BOOL WINAPI
SymEnumSourceLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
842 BOOL WINAPI
SymEnumSourceLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
844 /*************************
845 * File & image handling *
846 *************************/
847 BOOL WINAPI
SymInitialize(HANDLE
, PCSTR
, BOOL
);
848 BOOL WINAPI
SymInitializeW(HANDLE
, PCWSTR
, BOOL
);
849 BOOL WINAPI
SymCleanup(HANDLE
);
851 HANDLE WINAPI
FindDebugInfoFile(PCSTR
, PCSTR
, PSTR
);
852 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACK
)(HANDLE
, PCSTR
, PVOID
);
853 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACKW
)(HANDLE
, PCWSTR
, PVOID
);
854 HANDLE WINAPI
FindDebugInfoFileEx(PCSTR
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
855 HANDLE WINAPI
FindDebugInfoFileExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
856 HANDLE WINAPI
SymFindDebugInfoFile(HANDLE
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
857 HANDLE WINAPI
SymFindDebugInfoFileW(HANDLE
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
858 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACK
)(PCSTR
, PVOID
);
859 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACKW
)(PCWSTR
, PVOID
);
860 BOOL WINAPI
FindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
861 PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
862 BOOL WINAPI
SymFindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
863 PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
864 BOOL WINAPI
SymFindFileInPathW(HANDLE
, PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, DWORD
,
865 PWSTR
, PFINDFILEINPATHCALLBACKW
, PVOID
);
866 HANDLE WINAPI
FindExecutableImage(PCSTR
, PCSTR
, PSTR
);
867 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACK
)(HANDLE
, PCSTR
, PVOID
);
868 typedef BOOL (CALLBACK
*PFIND_EXE_FILE_CALLBACKW
)(HANDLE
, PCWSTR
, PVOID
);
869 HANDLE WINAPI
FindExecutableImageEx(PCSTR
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
870 HANDLE WINAPI
FindExecutableImageExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
871 HANDLE WINAPI
SymFindExecutableImage(HANDLE
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
872 HANDLE WINAPI
SymFindExecutableImageW(HANDLE
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
873 PIMAGE_NT_HEADERS WINAPI
ImageNtHeader(PVOID
);
874 PVOID WINAPI
ImageDirectoryEntryToDataEx(PVOID
, BOOLEAN
, USHORT
, PULONG
,
875 PIMAGE_SECTION_HEADER
*);
876 PVOID WINAPI
ImageDirectoryEntryToData(PVOID
, BOOLEAN
, USHORT
, PULONG
);
877 PIMAGE_SECTION_HEADER WINAPI
ImageRvaToSection(PIMAGE_NT_HEADERS
, PVOID
, ULONG
);
878 PVOID WINAPI
ImageRvaToVa(PIMAGE_NT_HEADERS
, PVOID
, ULONG
, PIMAGE_SECTION_HEADER
*);
879 BOOL WINAPI
SymGetSearchPath(HANDLE
, PSTR
, DWORD
);
880 BOOL WINAPI
SymGetSearchPathW(HANDLE
, PWSTR
, DWORD
);
881 BOOL WINAPI
SymSetSearchPath(HANDLE
, PCSTR
);
882 BOOL WINAPI
SymSetSearchPathW(HANDLE
, PCWSTR
);
883 DWORD WINAPI
GetTimestampForLoadedLibrary(HMODULE
);
884 BOOL WINAPI
MakeSureDirectoryPathExists(PCSTR
);
885 BOOL WINAPI
SearchTreeForFile(PCSTR
, PCSTR
, PSTR
);
886 BOOL WINAPI
SearchTreeForFileW(PCWSTR
, PCWSTR
, PWSTR
);
887 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACK
)(PCSTR
, PVOID
);
888 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACKW
)(PCWSTR
, PVOID
);
889 BOOL WINAPI
EnumDirTree(HANDLE
, PCSTR
, PCSTR
, PSTR
, PENUMDIRTREE_CALLBACK
, PVOID
);
890 BOOL WINAPI
EnumDirTreeW(HANDLE
, PCWSTR
, PCWSTR
, PWSTR
, PENUMDIRTREE_CALLBACKW
, PVOID
);
891 BOOL WINAPI
SymMatchFileName(PCSTR
, PCSTR
, PSTR
*, PSTR
*);
892 BOOL WINAPI
SymMatchFileNameW(PCWSTR
, PCWSTR
, PWSTR
*, PWSTR
*);
893 PCHAR WINAPI
SymSetHomeDirectory(HANDLE
, PCSTR
);
894 PWSTR WINAPI
SymSetHomeDirectoryW(HANDLE
, PCWSTR
);
895 PCHAR WINAPI
SymGetHomeDirectory(DWORD
, PSTR
, size_t);
896 PWSTR WINAPI
SymGetHomeDirectoryW(DWORD
, PWSTR
, size_t);
902 /*************************
903 * Context management *
904 *************************/
905 BOOL WINAPI
SymSetContext(HANDLE
, PIMAGEHLP_STACK_FRAME
, PIMAGEHLP_CONTEXT
);
906 BOOL WINAPI
SymSetScopeFromIndex(HANDLE
, ULONG64
, ULONG
);
907 BOOL WINAPI
SymSetScopeFromAddr(HANDLE
, ULONG64
);
908 BOOL WINAPI
SymSetScopeFromInlineContext(HANDLE
, ULONG64
, ULONG
);
910 /*************************
912 *************************/
914 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
915 #define KDHELP KDHELP64
916 #define PKDHELP PKDHELP64
918 typedef struct _KDHELP
921 DWORD ThCallbackStack
;
924 DWORD KiCallUserMode
;
925 DWORD KeUserCallbackDispatcher
;
926 DWORD SystemRangeStart
;
930 typedef struct _KDHELP64
933 DWORD ThCallbackStack
;
934 DWORD ThCallbackBStore
;
937 DWORD64 KiCallUserMode
;
938 DWORD64 KeUserCallbackDispatcher
;
939 DWORD64 SystemRangeStart
;
941 } KDHELP64
, *PKDHELP64
;
943 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
944 #define STACKFRAME STACKFRAME64
945 #define LPSTACKFRAME LPSTACKFRAME64
947 typedef struct _STACKFRAME
953 PVOID FuncTableEntry
;
960 } STACKFRAME
, *LPSTACKFRAME
;
963 typedef struct _STACKFRAME64
966 ADDRESS64 AddrReturn
;
969 ADDRESS64 AddrBStore
;
970 PVOID FuncTableEntry
;
976 } STACKFRAME64
, *LPSTACKFRAME64
;
978 #define INLINE_FRAME_CONTEXT_INIT 0
979 #define INLINE_FRAME_CONTEXT_IGNORE 0xFFFFFFFF
981 typedef struct _tagSTACKFRAME_EX
984 ADDRESS64 AddrReturn
;
987 ADDRESS64 AddrBStore
;
988 PVOID FuncTableEntry
;
995 DWORD StackFrameSize
;
996 DWORD InlineFrameContext
;
997 } STACKFRAME_EX
, *LPSTACKFRAME_EX
;
1000 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE64
)
1001 (HANDLE
, DWORD64
, PVOID
, DWORD
, PDWORD
);
1002 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE64
)(HANDLE
, DWORD64
);
1003 typedef DWORD64 (CALLBACK
*PGET_MODULE_BASE_ROUTINE64
)(HANDLE
, DWORD64
);
1004 typedef DWORD64 (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE64
)(HANDLE
, HANDLE
, LPADDRESS64
);
1005 BOOL WINAPI
StackWalk64(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME64
, PVOID
,
1006 PREAD_PROCESS_MEMORY_ROUTINE64
,
1007 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1008 PGET_MODULE_BASE_ROUTINE64
,
1009 PTRANSLATE_ADDRESS_ROUTINE64
);
1010 #define SYM_STKWALK_DEFAULT 0x00000000
1011 #define SYM_STKWALK_FORCE_FRAMEPTR 0x00000001
1012 BOOL WINAPI
StackWalkEx(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME_EX
, PVOID
,
1013 PREAD_PROCESS_MEMORY_ROUTINE64
,
1014 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1015 PGET_MODULE_BASE_ROUTINE64
,
1016 PTRANSLATE_ADDRESS_ROUTINE64
,
1018 PVOID WINAPI
SymFunctionTableAccess64(HANDLE
, DWORD64
);
1020 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK64
)(HANDLE
, ULONG64
, ULONG64
);
1022 BOOL WINAPI
SymRegisterFunctionEntryCallback64(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK64
, ULONG64
);
1023 BOOL WINAPI
SymGetUnwindInfo(HANDLE
, DWORD64
, PVOID
, PULONG
);
1025 /* Inline context related APIs */
1026 DWORD WINAPI
SymAddrIncludeInlineTrace(HANDLE
, DWORD64
);
1028 #define SYM_INLINE_COMP_ERROR 0
1029 #define SYM_INLINE_COMP_IDENTICAL 1
1030 #define SYM_INLINE_COMP_STEPIN 2
1031 #define SYM_INLINE_COMP_STEPOUT 3
1032 #define SYM_INLINE_COMP_STEPOVER 4
1033 #define SYM_INLINE_COMP_DIFFERENT 5
1035 DWORD WINAPI
SymCompareInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, DWORD64
);
1036 BOOL WINAPI
SymQueryInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, LPDWORD
, LPDWORD
);
1038 /*************************
1039 * Version, global stuff *
1040 *************************/
1042 #define API_VERSION_NUMBER 9
1044 typedef struct API_VERSION
1046 USHORT MajorVersion
;
1047 USHORT MinorVersion
;
1050 } API_VERSION
, *LPAPI_VERSION
;
1052 LPAPI_VERSION WINAPI
ImagehlpApiVersion(void);
1053 LPAPI_VERSION WINAPI
ImagehlpApiVersionEx(LPAPI_VERSION
);
1056 typedef struct _IMAGE_DEBUG_INFORMATION
1060 PVOID ReservedMappedBase
;
1061 USHORT ReservedMachine
;
1062 USHORT ReservedCharacteristics
;
1063 DWORD ReservedCheckSum
;
1066 DWORD ReservedNumberOfSections
;
1067 PIMAGE_SECTION_HEADER ReservedSections
;
1068 DWORD ReservedExportedNamesSize
;
1069 PSTR ReservedExportedNames
;
1070 DWORD ReservedNumberOfFunctionTableEntries
;
1071 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries
;
1072 DWORD ReservedLowestFunctionStartingAddress
;
1073 DWORD ReservedHighestFunctionEndingAddress
;
1074 DWORD ReservedNumberOfFpoTableEntries
;
1075 PFPO_DATA ReservedFpoTableEntries
;
1076 DWORD SizeOfCoffSymbols
;
1077 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols
;
1078 DWORD ReservedSizeOfCodeViewSymbols
;
1079 PVOID ReservedCodeViewSymbols
;
1082 PSTR ReservedDebugFilePath
;
1083 DWORD ReservedTimeDateStamp
;
1084 BOOL ReservedRomImage
;
1085 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory
;
1086 DWORD ReservedNumberOfDebugDirectories
;
1087 DWORD ReservedOriginalFunctionTableBaseAddress
;
1088 DWORD Reserved
[ 2 ];
1089 } IMAGE_DEBUG_INFORMATION
, *PIMAGE_DEBUG_INFORMATION
;
1091 PIMAGE_DEBUG_INFORMATION WINAPI
MapDebugInformation(HANDLE
, PCSTR
, PCSTR
, ULONG
);
1092 BOOL WINAPI
UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION
);
1097 SYMOPT_EX_DISABLEACCESSTIMEUPDATE
,
1101 /* Include ELF/Mach-O modules in module operations */
1102 SYMOPT_EX_WINE_NATIVE_MODULES
= 1000,
1103 /* Return the Unix actual path of loaded module */
1104 SYMOPT_EX_WINE_MODULE_REAL_PATH
,
1105 /* Return the raw source file path from debug info (not always mapped to DOS) */
1106 SYMOPT_EX_WINE_SOURCE_ACTUAL_PATH
,
1108 } IMAGEHLP_EXTENDED_OPTIONS
;
1110 DWORD WINAPI
SymGetOptions(void);
1111 DWORD WINAPI
SymSetOptions(DWORD
);
1113 BOOL WINAPI
SymGetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
);
1114 BOOL WINAPI
SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
, BOOL value
);
1116 BOOL WINAPI
SymSetParentWindow(HWND
);
1118 /*************************
1119 * Version, global stuff *
1120 *************************/
1122 typedef BOOL (WINAPI
* PSYMBOLSERVERPROC
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1123 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCA
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1124 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCW
)(PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, PWSTR
);
1125 typedef BOOL (WINAPI
* PSYMBOLSERVEROPENPROC
)(void);
1126 typedef BOOL (WINAPI
* PSYMBOLSERVERCLOSEPROC
)(void);
1127 typedef BOOL (WINAPI
* PSYMBOLSERVERSETOPTIONSPROC
)(UINT_PTR
, ULONG64
);
1128 typedef BOOL (CALLBACK
* PSYMBOLSERVERCALLBACKPROC
)(UINT_PTR
, ULONG64
, ULONG64
);
1129 typedef UINT_PTR (WINAPI
* PSYMBOLSERVERGETOPTIONSPROC
)(void);
1130 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROC
)(PCSTR
);
1131 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCA
)(PCSTR
);
1132 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCW
)(PCWSTR
);
1134 #define SSRVOPT_CALLBACK 0x0001
1135 #define SSRVOPT_DWORD 0x0002
1136 #define SSRVOPT_DWORDPTR 0x0004
1137 #define SSRVOPT_GUIDPTR 0x0008
1138 #define SSRVOPT_OLDGUIDPTR 0x0010
1139 #define SSRVOPT_UNATTENDED 0x0020
1140 #define SSRVOPT_NOCOPY 0x0040
1141 #define SSRVOPT_PARENTWIN 0x0080
1142 #define SSRVOPT_PARAMTYPE 0x0100
1143 #define SSRVOPT_SECURE 0x0200
1144 #define SSRVOPT_TRACE 0x0400
1145 #define SSRVOPT_SETCONTEXT 0x0800
1146 #define SSRVOPT_PROXY 0x1000
1147 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1148 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1150 #define SSRVACTION_TRACE 1
1151 #define SSRVACTION_QUERYCANCEL 2
1152 #define SSRVACTION_EVENT 3
1154 /* 32-bit functions */
1156 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1158 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
1159 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
1160 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
1161 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
1162 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
1163 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
1164 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
1165 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
1166 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
1167 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
1169 #define EnumerateLoadedModules EnumerateLoadedModules64
1170 #define StackWalk StackWalk64
1171 #define SymEnumerateModules SymEnumerateModules64
1172 #define SymEnumerateSymbols SymEnumerateSymbols64
1173 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
1174 #define SymFunctionTableAccess SymFunctionTableAccess64
1175 #define SymGetLineFromAddr SymGetLineFromAddr64
1176 #define SymGetLineFromAddrW SymGetLineFromAddrW64
1177 #define SymGetLineFromName SymGetLineFromName64
1178 #define SymGetLineNext SymGetLineNext64
1179 #define SymGetLineNextW SymGetLineNextW64
1180 #define SymGetLinePrev SymGetLinePrev64
1181 #define SymGetLinePrevW SymGetLinePrevW64
1182 #define SymGetModuleBase SymGetModuleBase64
1183 #define SymGetModuleInfo SymGetModuleInfo64
1184 #define SymGetModuleInfoW SymGetModuleInfoW64
1185 #define SymGetSymFromAddr SymGetSymFromAddr64
1186 #define SymGetSymFromName SymGetSymFromName64
1187 #define SymGetSymNext SymGetSymNext64
1188 #define SymGetSymNextW SymGetSymNextW64
1189 #define SymGetSymPrev SymGetSymPrev64
1190 #define SymGetSymPrevW SymGetSymPrevW64
1191 #define SymLoadModule SymLoadModule64
1192 #define SymRegisterCallback SymRegisterCallback64
1193 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
1194 #define SymUnDName SymUnDName64
1195 #define SymUnloadModule SymUnloadModule64
1199 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1200 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE
)(HANDLE
, DWORD
);
1201 typedef DWORD (CALLBACK
*PGET_MODULE_BASE_ROUTINE
)(HANDLE
, DWORD
);
1202 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE
)(HANDLE
, DWORD
, PVOID
, DWORD
, PDWORD
);
1203 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK
)(PCSTR
, ULONG
, PVOID
);
1204 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1205 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACKW
)(PCWSTR
, ULONG
, ULONG
, PVOID
);
1206 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK
)(HANDLE
, ULONG
, PVOID
, PVOID
);
1207 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK
)(HANDLE
, DWORD
, PVOID
);
1208 typedef DWORD (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE
)(HANDLE
, HANDLE
, LPADDRESS
);
1210 BOOL WINAPI
EnumerateLoadedModules(HANDLE
, PENUMLOADED_MODULES_CALLBACK
, PVOID
);
1211 BOOL WINAPI
StackWalk(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME
, PVOID
, PREAD_PROCESS_MEMORY_ROUTINE
, PFUNCTION_TABLE_ACCESS_ROUTINE
, PGET_MODULE_BASE_ROUTINE
, PTRANSLATE_ADDRESS_ROUTINE
);
1212 BOOL WINAPI
SymEnumerateModules(HANDLE
, PSYM_ENUMMODULES_CALLBACK
, PVOID
);
1213 BOOL WINAPI
SymEnumerateSymbols(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACK
, PVOID
);
1214 BOOL WINAPI
SymEnumerateSymbolsW(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACKW
, PVOID
);
1215 PVOID WINAPI
SymFunctionTableAccess(HANDLE
, DWORD
);
1216 BOOL WINAPI
SymGetLineFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINE
);
1217 BOOL WINAPI
SymGetLineFromAddrW(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINEW
);
1218 BOOL WINAPI
SymGetLineFromName(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE
);
1219 BOOL WINAPI
SymGetLineNext(HANDLE
, PIMAGEHLP_LINE
);
1220 BOOL WINAPI
SymGetLineNextW(HANDLE
, PIMAGEHLP_LINEW
);
1221 BOOL WINAPI
SymGetLinePrev(HANDLE
, PIMAGEHLP_LINE
);
1222 BOOL WINAPI
SymGetLinePrevW(HANDLE
, PIMAGEHLP_LINEW
);
1223 DWORD WINAPI
SymGetModuleBase(HANDLE
, DWORD
);
1224 BOOL WINAPI
SymGetModuleInfo(HANDLE
, DWORD
, PIMAGEHLP_MODULE
);
1225 BOOL WINAPI
SymGetModuleInfoW(HANDLE
, DWORD
, PIMAGEHLP_MODULEW
);
1226 BOOL WINAPI
SymGetSymFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_SYMBOL
);
1227 BOOL WINAPI
SymGetSymFromName(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL
);
1228 BOOL WINAPI
SymGetSymNext(HANDLE
, PIMAGEHLP_SYMBOL
);
1229 BOOL WINAPI
SymGetSymNextW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1230 BOOL WINAPI
SymGetSymPrev(HANDLE
, PIMAGEHLP_SYMBOL
);
1231 BOOL WINAPI
SymGetSymPrevW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1232 DWORD WINAPI
SymLoadModule(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD
, DWORD
);
1233 BOOL WINAPI
SymRegisterCallback(HANDLE
, PSYMBOL_REGISTERED_CALLBACK
, PVOID
);
1234 BOOL WINAPI
SymRegisterFunctionEntryCallback(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK
, PVOID
);
1235 BOOL WINAPI
SymUnDName(PIMAGEHLP_SYMBOL
, PSTR
, DWORD
);
1236 BOOL WINAPI
SymUnloadModule(HANDLE
, DWORD
);
1242 #endif /* defined(__cplusplus) */
1244 #endif /* __WINE_DBGHELP_H */