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 #ifdef _IMAGEHLP_SOURCE_
37 #define IMAGEAPI WINAPI
39 #define IMAGEAPI DECLSPEC_IMPORT WINAPI
42 #define DBHLPAPI IMAGEAPI
44 typedef struct _LOADED_IMAGE
49 PIMAGE_NT_HEADERS FileHeader
;
50 PIMAGE_SECTION_HEADER LastRvaSection
;
51 ULONG NumberOfSections
;
52 PIMAGE_SECTION_HEADER Sections
;
53 ULONG Characteristics
;
60 } LOADED_IMAGE
, *PLOADED_IMAGE
;
62 /*************************
64 *************************/
74 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
75 #define ADDRESS ADDRESS64
76 #define LPADDRESS LPADDRESS64
78 typedef struct _tagADDRESS
83 } ADDRESS
, *LPADDRESS
;
86 typedef struct _tagADDRESS64
91 } ADDRESS64
, *LPADDRESS64
;
93 #define SYMF_OMAP_GENERATED 0x00000001
94 #define SYMF_OMAP_MODIFIED 0x00000002
95 #define SYMF_USER_GENERATED 0x00000004
96 #define SYMF_REGISTER 0x00000008
97 #define SYMF_REGREL 0x00000010
98 #define SYMF_FRAMEREL 0x00000020
99 #define SYMF_PARAMETER 0x00000040
100 #define SYMF_LOCAL 0x00000080
101 #define SYMF_CONSTANT 0x00000100
102 #define SYMF_EXPORT 0x00000200
103 #define SYMF_FORWARDER 0x00000400
104 #define SYMF_FUNCTION 0x00000800
105 #define SYMF_VIRTUAL 0x00001000
106 #define SYMF_THUNK 0x00002000
107 #define SYMF_TLSREL 0x00004000
123 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
124 #define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
125 #define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64
126 #define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
127 #define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64
129 typedef struct _IMAGEHLP_SYMBOL
137 } IMAGEHLP_SYMBOL
, *PIMAGEHLP_SYMBOL
;
139 typedef struct _IMAGEHLP_SYMBOLW
147 } IMAGEHLP_SYMBOLW
, *PIMAGEHLP_SYMBOLW
;
150 typedef struct _IMAGEHLP_SYMBOL64
158 } IMAGEHLP_SYMBOL64
, *PIMAGEHLP_SYMBOL64
;
160 typedef struct _IMAGEHLP_SYMBOLW64
168 } IMAGEHLP_SYMBOLW64
, *PIMAGEHLP_SYMBOLW64
;
170 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
171 #define IMAGEHLP_MODULE IMAGEHLP_MODULE64
172 #define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
173 #define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
174 #define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
176 typedef struct _IMAGEHLP_MODULE
187 CHAR LoadedImageName
[256];
188 } IMAGEHLP_MODULE
, *PIMAGEHLP_MODULE
;
190 typedef struct _IMAGEHLP_MODULEW
199 WCHAR ModuleName
[32];
200 WCHAR ImageName
[256];
201 WCHAR LoadedImageName
[256];
202 } IMAGEHLP_MODULEW
, *PIMAGEHLP_MODULEW
;
205 typedef struct _IMAGEHLP_MODULE64
216 CHAR LoadedImageName
[256];
217 CHAR LoadedPdbName
[256];
219 CHAR CVData
[MAX_PATH
*3];
232 } IMAGEHLP_MODULE64
, *PIMAGEHLP_MODULE64
;
234 typedef struct _IMAGEHLP_MODULEW64
243 WCHAR ModuleName
[32];
244 WCHAR ImageName
[256];
245 WCHAR LoadedImageName
[256];
246 WCHAR LoadedPdbName
[256];
248 WCHAR CVData
[MAX_PATH
*3];
261 } IMAGEHLP_MODULEW64
, *PIMAGEHLP_MODULEW64
;
263 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
264 #define IMAGEHLP_LINE IMAGEHLP_LINE64
265 #define PIMAGEHLP_LINE PIMAGEHLP_LINE64
266 #define IMAGEHLP_LINEW IMAGEHLP_LINEW64
267 #define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64
269 typedef struct _IMAGEHLP_LINE
276 } IMAGEHLP_LINE
, *PIMAGEHLP_LINE
;
278 typedef struct _IMAGEHLP_LINEW
285 } IMAGEHLP_LINEW
, *PIMAGEHLP_LINEW
;
288 typedef struct _IMAGEHLP_LINE64
295 } IMAGEHLP_LINE64
, *PIMAGEHLP_LINE64
;
297 typedef struct _IMAGEHLP_LINEW64
304 } IMAGEHLP_LINEW64
, *PIMAGEHLP_LINEW64
;
306 typedef struct _SOURCEFILE
310 } SOURCEFILE
, *PSOURCEFILE
;
312 typedef struct _SOURCEFILEW
316 } SOURCEFILEW
, *PSOURCEFILEW
;
318 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
319 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
320 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
321 #define CBA_SYMBOLS_UNLOADED 0x00000004
322 #define CBA_DUPLICATE_SYMBOL 0x00000005
323 #define CBA_READ_MEMORY 0x00000006
324 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
325 #define CBA_SET_OPTIONS 0x00000008
326 #define CBA_EVENT 0x00000010
327 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
328 #define CBA_DEBUG_INFO 0x10000000
329 #define CBA_SRCSRV_INFO 0x20000000
330 #define CBA_SRCSRV_EVENT 0x40000000
332 typedef struct _IMAGEHLP_CBA_READ_MEMORY
338 } IMAGEHLP_CBA_READ_MEMORY
, *PIMAGEHLP_CBA_READ_MEMORY
;
349 #define EVENT_SRCSPEW_START 100
350 #define EVENT_SRCSPEW 100
351 #define EVENT_SRCSPEW_END 199
353 typedef struct _IMAGEHLP_CBA_EVENT
359 } IMAGEHLP_CBA_EVENT
, *PIMAGEHLP_CBA_EVENT
;
361 typedef struct _IMAGEHLP_CBA_EVENTW
367 } IMAGEHLP_CBA_EVENTW
, *PIMAGEHLP_CBA_EVENTW
;
369 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
370 #define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
371 #define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
373 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
379 CHAR FileName
[MAX_PATH
];
382 } IMAGEHLP_DEFERRED_SYMBOL_LOAD
, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD
;
385 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
391 CHAR FileName
[MAX_PATH
];
395 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64
, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
;
397 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64
403 WCHAR FileName
[MAX_PATH
+ 1];
407 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64
, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64
;
409 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
410 #define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
411 #define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
413 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
417 PIMAGEHLP_SYMBOL Symbol
;
418 DWORD SelectedSymbol
;
419 } IMAGEHLP_DUPLICATE_SYMBOL
, *PIMAGEHLP_DUPLICATE_SYMBOL
;
422 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
426 PIMAGEHLP_SYMBOL64 Symbol
;
427 DWORD SelectedSymbol
;
428 } IMAGEHLP_DUPLICATE_SYMBOL64
, *PIMAGEHLP_DUPLICATE_SYMBOL64
;
430 #define SYMOPT_CASE_INSENSITIVE 0x00000001
431 #define SYMOPT_UNDNAME 0x00000002
432 #define SYMOPT_DEFERRED_LOADS 0x00000004
433 #define SYMOPT_NO_CPP 0x00000008
434 #define SYMOPT_LOAD_LINES 0x00000010
435 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
436 #define SYMOPT_LOAD_ANYTHING 0x00000040
437 #define SYMOPT_IGNORE_CVREC 0x00000080
438 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
439 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
440 #define SYMOPT_EXACT_SYMBOLS 0x00000400
441 #define SYMOPT_WILD_UNDERSCORE 0x00000800
442 #define SYMOPT_USE_DEFAULTS 0x00001000
443 /* latest SDK defines:
444 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
445 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
447 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
448 #define SYMOPT_PUBLICS_ONLY 0x00004000
449 #define SYMOPT_NO_PUBLICS 0x00008000
450 #define SYMOPT_AUTO_PUBLICS 0x00010000
451 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
452 #define SYMOPT_SECURE 0x00040000
453 #define SYMOPT_NO_PROMPTS 0x00080000
454 #define SYMOPT_OVERWRITE 0x00100000
455 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000
456 #define SYMOPT_FLAT_DIRECTORY 0x00400000
457 #define SYMOPT_FAVOR_COMPRESSED 0x00800000
458 #define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000
459 #define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000
460 #define SYMOPT_READONLY_CACHE 0x04000000
461 #define SYMOPT_SYMPATH_LAST 0x08000000
462 #define SYMOPT_DISABLE_FAST_SYMBOLS 0x10000000
463 #define SYMOPT_DISABLE_SYMSRV_TIMEOUT 0x20000000
464 #define SYMOPT_DISABLE_SRVSTAR_ON_STARTUP 0x40000000
465 #define SYMOPT_DEBUG 0x80000000
467 typedef struct _IMAGEHLP_STACK_FRAME
469 ULONG64 InstructionOffset
;
470 ULONG64 ReturnOffset
;
473 ULONG64 BackingStoreOffset
;
474 ULONG64 FuncTableEntry
;
479 } IMAGEHLP_STACK_FRAME
, *PIMAGEHLP_STACK_FRAME
;
481 typedef VOID IMAGEHLP_CONTEXT
, *PIMAGEHLP_CONTEXT
;
483 #define DBHHEADER_DEBUGDIRS 0x1
484 typedef struct _DBGHELP_MODLOAD_DATA
491 } MODLOAD_DATA
, *PMODLOAD_DATA
;
493 /*************************
495 *************************/
497 /* flags for SymLoadModuleEx */
498 #define SLMFLAG_VIRTUAL 0x1
499 #define SLMFLAG_NO_SYMBOLS 0x4
501 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK64
)(PCSTR
, DWORD64
, ULONG
, PVOID
);
502 BOOL IMAGEAPI
EnumerateLoadedModules64(HANDLE
, PENUMLOADED_MODULES_CALLBACK64
, PVOID
);
503 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACKW64
)(PCWSTR
, DWORD64
, ULONG
, PVOID
);
504 BOOL IMAGEAPI
EnumerateLoadedModulesW64(HANDLE
, PENUMLOADED_MODULES_CALLBACKW64
, PVOID
);
505 BOOL IMAGEAPI
EnumerateLoadedModulesEx(HANDLE
, PENUMLOADED_MODULES_CALLBACK64
, PVOID
);
506 BOOL IMAGEAPI
EnumerateLoadedModulesExW(HANDLE
, PENUMLOADED_MODULES_CALLBACKW64
, PVOID
);
507 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK64
)(PCSTR
, DWORD64
, PVOID
);
508 BOOL IMAGEAPI
SymEnumerateModules64(HANDLE
, PSYM_ENUMMODULES_CALLBACK64
, PVOID
);
509 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACKW64
)(PCWSTR
, DWORD64
, PVOID
);
510 BOOL IMAGEAPI
SymEnumerateModulesW64(HANDLE
, PSYM_ENUMMODULES_CALLBACKW64
, PVOID
);
511 BOOL IMAGEAPI
SymGetModuleInfo64(HANDLE
, DWORD64
, PIMAGEHLP_MODULE64
);
512 BOOL IMAGEAPI
SymGetModuleInfoW64(HANDLE
, DWORD64
, PIMAGEHLP_MODULEW64
);
513 DWORD64 IMAGEAPI
SymGetModuleBase64(HANDLE
, DWORD64
);
514 DWORD64 IMAGEAPI
SymLoadModule64(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD64
, DWORD
);
515 DWORD64 IMAGEAPI
SymLoadModuleEx(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD64
, DWORD
, PMODLOAD_DATA
, DWORD
);
516 DWORD64 IMAGEAPI
SymLoadModuleExW(HANDLE
, HANDLE
, PCWSTR
, PCWSTR
, DWORD64
, DWORD
, PMODLOAD_DATA
, DWORD
);
517 BOOL IMAGEAPI
SymUnloadModule64(HANDLE
, DWORD64
);
518 BOOL IMAGEAPI
SymRefreshModuleList(HANDLE
);
520 /*************************
522 *************************/
524 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
525 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
526 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
527 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
528 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
529 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
530 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
531 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
533 #define SYMFLAG_VALUEPRESENT 0x00000001
534 #define SYMFLAG_REGISTER 0x00000008
535 #define SYMFLAG_REGREL 0x00000010
536 #define SYMFLAG_FRAMEREL 0x00000020
537 #define SYMFLAG_PARAMETER 0x00000040
538 #define SYMFLAG_LOCAL 0x00000080
539 #define SYMFLAG_CONSTANT 0x00000100
540 #define SYMFLAG_EXPORT 0x00000200
541 #define SYMFLAG_FORWARDER 0x00000400
542 #define SYMFLAG_FUNCTION 0x00000800
543 #define SYMFLAG_VIRTUAL 0x00001000
544 #define SYMFLAG_THUNK 0x00002000
545 #define SYMFLAG_TLSREL 0x00004000
546 #define SYMFLAG_SLOT 0x00008000
547 #define SYMFLAG_ILREL 0x00010000
548 #define SYMFLAG_METADATA 0x00020000
549 #define SYMFLAG_CLR_TOKEN 0x00040000
550 #define SYMFLAG_NULL 0x00080000
551 #define SYMFLAG_FUNC_NO_RETURN 0x00100000
552 #define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000
553 #define SYMFLAG_PUBLIC_CODE 0x00400000
555 #define MAX_SYM_NAME 2000
557 typedef struct _SYMBOL_INFO
574 } SYMBOL_INFO
, *PSYMBOL_INFO
;
576 typedef struct _SYMBOL_INFOW
593 } SYMBOL_INFOW
, *PSYMBOL_INFOW
;
595 typedef struct _SYMBOL_INFO_PACKAGE
598 CHAR name
[MAX_SYM_NAME
+1];
599 } SYMBOL_INFO_PACKAGE
, *PSYMBOL_INFO_PACKAGE
;
601 typedef struct _SYMBOL_INFO_PACKAGEW
604 WCHAR name
[MAX_SYM_NAME
+1];
605 } SYMBOL_INFO_PACKAGEW
, *PSYMBOL_INFO_PACKAGEW
;
607 typedef struct _SYMSRV_INDEX_INFO
610 CHAR file
[MAX_PATH
+ 1];
614 CHAR dbgfile
[MAX_PATH
+ 1];
615 CHAR pdbfile
[MAX_PATH
+ 1];
619 } SYMSRV_INDEX_INFO
, *PSYMSRV_INDEX_INFO
;
624 WCHAR file
[MAX_PATH
+ 1];
628 WCHAR dbgfile
[MAX_PATH
+ 1];
629 WCHAR pdbfile
[MAX_PATH
+ 1];
633 } SYMSRV_INDEX_INFOW
, *PSYMSRV_INDEX_INFOW
;
635 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
643 TI_GET_ARRAYINDEXTYPEID
,
646 TI_GET_ADDRESSOFFSET
,
650 TI_GET_CHILDRENCOUNT
,
652 TI_GET_VIRTUALBASECLASS
,
653 TI_GET_VIRTUALTABLESHAPEID
,
654 TI_GET_VIRTUALBASEPOINTEROFFSET
,
655 TI_GET_CLASSPARENTID
,
658 TI_GET_LEXICALPARENT
,
663 TI_GET_CALLING_CONVENTION
,
664 TI_IS_CLOSE_EQUIV_TO
,
666 TI_GET_VIRTUALBASEOFFSET
,
667 TI_GET_VIRTUALBASEDISPINDEX
,
669 TI_GET_INDIRECTVIRTUALBASECLASS
,
670 TI_GET_VIRTUALBASETABLETYPE
,
671 TI_GET_OBJECTPOINTERTYPE
,
672 IMAGEHLP_SYMBOL_TYPE_INFO_MAX
673 } IMAGEHLP_SYMBOL_TYPE_INFO
;
675 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
676 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
677 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
685 IMAGEHLP_SYMBOL_TYPE_INFO
* ReqKinds
;
686 PULONG_PTR ReqOffsets
;
689 ULONG_PTR BufferSize
;
691 ULONG EntriesMatched
;
694 ULONG64 AllReqsValid
;
697 } IMAGEHLP_GET_TYPE_INFO_PARAMS
, *PIMAGEHLP_GET_TYPE_INFO_PARAMS
;
699 typedef struct _TI_FINDCHILDREN_PARAMS
704 } TI_FINDCHILDREN_PARAMS
;
706 #define UNDNAME_COMPLETE (0x0000)
707 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
708 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
709 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
710 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
711 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
712 #define UNDNAME_NO_MS_THISTYPE (0x0020)
713 #define UNDNAME_NO_CV_THISTYPE (0x0040)
714 #define UNDNAME_NO_THISTYPE (0x0060)
715 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
716 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
717 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
718 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
719 #define UNDNAME_32_BIT_DECODE (0x0800)
720 #define UNDNAME_NAME_ONLY (0x1000)
721 #define UNDNAME_NO_ARGUMENTS (0x2000)
722 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
724 #define SYMSEARCH_MASKOBJS 0x01
725 #define SYMSEARCH_RECURSE 0x02
726 #define SYMSEARCH_GLOBALSONLY 0x04
728 BOOL IMAGEAPI
SymGetTypeInfo(HANDLE
, DWORD64
, ULONG
, IMAGEHLP_SYMBOL_TYPE_INFO
, PVOID
);
729 BOOL IMAGEAPI
SymGetTypeInfoEx(HANDLE
, DWORD64
, PIMAGEHLP_GET_TYPE_INFO_PARAMS
);
730 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACK
)(PSYMBOL_INFO
, ULONG
, PVOID
);
731 typedef BOOL (CALLBACK
*PSYM_ENUMERATESYMBOLS_CALLBACKW
)(PSYMBOL_INFOW
, ULONG
, PVOID
);
732 BOOL IMAGEAPI
SymEnumTypes(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
733 BOOL IMAGEAPI
SymEnumTypesW(HANDLE
, ULONG64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
734 BOOL IMAGEAPI
SymEnumTypesByName(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
735 BOOL IMAGEAPI
SymEnumTypesByNameW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
736 BOOL IMAGEAPI
SymFromAddr(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFO
*);
737 BOOL IMAGEAPI
SymFromAddrW(HANDLE
, DWORD64
, DWORD64
*, SYMBOL_INFOW
*);
738 BOOL IMAGEAPI
SymFromInlineContext(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFO
);
739 BOOL IMAGEAPI
SymFromInlineContextW(HANDLE
, DWORD64
, ULONG
, PDWORD64
, PSYMBOL_INFOW
);
740 BOOL IMAGEAPI
SymFromToken(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFO
);
741 BOOL IMAGEAPI
SymFromTokenW(HANDLE
, DWORD64
, DWORD
, PSYMBOL_INFOW
);
742 BOOL IMAGEAPI
SymFromName(HANDLE
, PCSTR
, PSYMBOL_INFO
);
743 BOOL IMAGEAPI
SymFromNameW(HANDLE
, PCWSTR
, PSYMBOL_INFOW
);
744 BOOL IMAGEAPI
SymGetSymFromAddr64(HANDLE
, DWORD64
, PDWORD64
, PIMAGEHLP_SYMBOL64
);
745 BOOL IMAGEAPI
SymGetSymFromName64(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL64
);
746 BOOL IMAGEAPI
SymGetTypeFromName(HANDLE
, ULONG64
, PCSTR
, PSYMBOL_INFO
);
747 BOOL IMAGEAPI
SymGetTypeFromNameW(HANDLE
, ULONG64
, PCWSTR
, PSYMBOL_INFOW
);
748 BOOL IMAGEAPI
SymGetSymNext64(HANDLE
, PIMAGEHLP_SYMBOL64
);
749 BOOL IMAGEAPI
SymGetSymNextW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
750 BOOL IMAGEAPI
SymGetSymPrev64(HANDLE
, PIMAGEHLP_SYMBOL64
);
751 BOOL IMAGEAPI
SymGetSymPrevW64(HANDLE
, PIMAGEHLP_SYMBOLW64
);
752 BOOL IMAGEAPI
SymEnumSym(HANDLE
,ULONG64
,PSYM_ENUMERATESYMBOLS_CALLBACK
,PVOID
);
753 BOOL IMAGEAPI
SymEnumSymbols(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
754 BOOL IMAGEAPI
SymEnumSymbolsW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
755 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64
)(PCSTR
, DWORD64
, ULONG
, PVOID
);
756 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK64W
)(PCWSTR
, DWORD64
, ULONG
, PVOID
);
757 BOOL IMAGEAPI
SymEnumerateSymbols64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64
, PVOID
);
758 BOOL IMAGEAPI
SymEnumerateSymbolsW64(HANDLE
, ULONG64
, PSYM_ENUMSYMBOLS_CALLBACK64W
, PVOID
);
759 BOOL IMAGEAPI
SymEnumSymbolsForAddr(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
);
760 BOOL IMAGEAPI
SymEnumSymbolsForAddrW(HANDLE
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
);
761 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK64
)(HANDLE
, ULONG
, ULONG64
, ULONG64
);
762 BOOL IMAGEAPI
SymRegisterCallback64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
763 BOOL IMAGEAPI
SymRegisterCallbackW64(HANDLE
, PSYMBOL_REGISTERED_CALLBACK64
, ULONG64
);
764 BOOL IMAGEAPI
SymUnDName64(PIMAGEHLP_SYMBOL64
, PSTR
, DWORD
);
765 BOOL IMAGEAPI
SymMatchString(PCSTR
, PCSTR
, BOOL
);
766 BOOL IMAGEAPI
SymMatchStringA(PCSTR
, PCSTR
, BOOL
);
767 BOOL IMAGEAPI
SymMatchStringW(PCWSTR
, PCWSTR
, BOOL
);
768 BOOL IMAGEAPI
SymSearch(HANDLE
, ULONG64
, DWORD
, DWORD
, PCSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACK
, PVOID
, DWORD
);
769 BOOL IMAGEAPI
SymSearchW(HANDLE
, ULONG64
, DWORD
, DWORD
, PCWSTR
, DWORD64
, PSYM_ENUMERATESYMBOLS_CALLBACKW
, PVOID
, DWORD
);
770 DWORD IMAGEAPI
UnDecorateSymbolName(PCSTR
, PSTR
, DWORD
, DWORD
);
771 DWORD IMAGEAPI
UnDecorateSymbolNameW(PCWSTR
, PWSTR
, DWORD
, DWORD
);
772 BOOL IMAGEAPI
SymGetScope(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
773 BOOL IMAGEAPI
SymGetScopeW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
774 BOOL IMAGEAPI
SymFromIndex(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFO
);
775 BOOL IMAGEAPI
SymFromIndexW(HANDLE
, ULONG64
, DWORD
, PSYMBOL_INFOW
);
776 BOOL IMAGEAPI
SymAddSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
, DWORD
);
777 BOOL IMAGEAPI
SymAddSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
, DWORD
);
778 BOOL IMAGEAPI
SymDeleteSymbol(HANDLE
, ULONG64
, PCSTR
, DWORD64
, DWORD
);
779 BOOL IMAGEAPI
SymDeleteSymbolW(HANDLE
, ULONG64
, PCWSTR
, DWORD64
, DWORD
);
787 BOOL IMAGEAPI
SymGetOmaps(HANDLE
, DWORD64
, POMAP
*, PDWORD64
, POMAP
*, PDWORD64
);
789 /*************************
791 *************************/
792 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACK
)(PSOURCEFILE
, PVOID
);
793 typedef BOOL (CALLBACK
*PSYM_ENUMSOURCEFILES_CALLBACKW
)(PSOURCEFILEW
, PVOID
);
795 BOOL IMAGEAPI
SymEnumSourceFiles(HANDLE
, ULONG64
, PCSTR
, PSYM_ENUMSOURCEFILES_CALLBACK
, PVOID
);
796 BOOL IMAGEAPI
SymEnumSourceFilesW(HANDLE
, ULONG64
, PCWSTR
, PSYM_ENUMSOURCEFILES_CALLBACKW
, PVOID
);
797 BOOL IMAGEAPI
SymGetLineFromAddr64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
798 BOOL IMAGEAPI
SymGetLineFromAddrW64(HANDLE
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
799 BOOL IMAGEAPI
SymGetLineFromInlineContext(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINE64
);
800 BOOL IMAGEAPI
SymGetLineFromInlineContextW(HANDLE
, DWORD64
, ULONG
, DWORD64
, PDWORD
, PIMAGEHLP_LINEW64
);
801 BOOL IMAGEAPI
SymGetLinePrev64(HANDLE
, PIMAGEHLP_LINE64
);
802 BOOL IMAGEAPI
SymGetLinePrevW64(HANDLE
, PIMAGEHLP_LINEW64
);
803 BOOL IMAGEAPI
SymGetLineNext64(HANDLE
, PIMAGEHLP_LINE64
);
804 BOOL IMAGEAPI
SymGetLineNextW64(HANDLE
, PIMAGEHLP_LINEW64
);
805 BOOL IMAGEAPI
SymGetLineFromName64(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE64
);
806 BOOL IMAGEAPI
SymGetLineFromNameW64(HANDLE
, PCWSTR
, PCWSTR
, DWORD
, PLONG
, PIMAGEHLP_LINEW64
);
807 ULONG IMAGEAPI
SymGetFileLineOffsets64(HANDLE
, PCSTR
, PCSTR
, PDWORD64
, ULONG
);
808 BOOL IMAGEAPI
SymGetSourceFile(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSTR
, DWORD
);
809 BOOL IMAGEAPI
SymGetSourceFileW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
810 BOOL IMAGEAPI
SymGetSourceFileToken(HANDLE
, ULONG64
, PCSTR
, PVOID
*, DWORD
*);
811 BOOL IMAGEAPI
SymGetSourceFileTokenW(HANDLE
, ULONG64
, PCWSTR
, PVOID
*, DWORD
*);
812 BOOL IMAGEAPI
SymGetSourceFileFromToken(HANDLE
, PVOID
, PCSTR
, PSTR
, DWORD
);
813 BOOL IMAGEAPI
SymGetSourceFileFromTokenW(HANDLE
, PVOID
, PCWSTR
, PWSTR
, DWORD
);
814 BOOL IMAGEAPI
SymGetSourceVarFromToken(HANDLE
, PVOID
, PCSTR
, PCSTR
, PSTR
, DWORD
);
815 BOOL IMAGEAPI
SymGetSourceVarFromTokenW(HANDLE
, PVOID
, PCWSTR
, PCWSTR
, PWSTR
, DWORD
);
817 typedef struct _SRCCODEINFO
822 CHAR Obj
[MAX_PATH
+1];
823 CHAR FileName
[MAX_PATH
+1];
826 } SRCCODEINFO
, *PSRCCODEINFO
;
828 typedef struct _SRCCODEINFOW
833 WCHAR Obj
[MAX_PATH
+1];
834 WCHAR FileName
[MAX_PATH
+1];
837 } SRCCODEINFOW
, *PSRCCODEINFOW
;
839 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACK
)(PSRCCODEINFO
, PVOID
);
840 typedef BOOL (CALLBACK
* PSYM_ENUMLINES_CALLBACKW
)(PSRCCODEINFOW
, PVOID
);
841 BOOL IMAGEAPI
SymEnumLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
842 BOOL IMAGEAPI
SymEnumLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
843 BOOL IMAGEAPI
SymEnumSourceLines(HANDLE
, ULONG64
, PCSTR
, PCSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACK
, PVOID
);
844 BOOL IMAGEAPI
SymEnumSourceLinesW(HANDLE
, ULONG64
, PCWSTR
, PCWSTR
, DWORD
, DWORD
, PSYM_ENUMLINES_CALLBACKW
, PVOID
);
846 /*************************
847 * File & image handling *
848 *************************/
849 BOOL IMAGEAPI
SymInitialize(HANDLE
, PCSTR
, BOOL
);
850 BOOL IMAGEAPI
SymInitializeW(HANDLE
, PCWSTR
, BOOL
);
851 BOOL IMAGEAPI
SymCleanup(HANDLE
);
853 HANDLE IMAGEAPI
FindDebugInfoFile(PCSTR
, PCSTR
, PSTR
);
854 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACK
)(HANDLE
, PCSTR
, PVOID
);
855 typedef BOOL (CALLBACK
*PFIND_DEBUG_FILE_CALLBACKW
)(HANDLE
, PCWSTR
, PVOID
);
856 HANDLE IMAGEAPI
FindDebugInfoFileEx(PCSTR
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
857 HANDLE IMAGEAPI
FindDebugInfoFileExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
858 HANDLE IMAGEAPI
SymFindDebugInfoFile(HANDLE
, PCSTR
, PSTR
, PFIND_DEBUG_FILE_CALLBACK
, PVOID
);
859 HANDLE IMAGEAPI
SymFindDebugInfoFileW(HANDLE
, PCWSTR
, PWSTR
, PFIND_DEBUG_FILE_CALLBACKW
, PVOID
);
860 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACK
)(PCSTR
, PVOID
);
861 typedef BOOL (CALLBACK
*PFINDFILEINPATHCALLBACKW
)(PCWSTR
, PVOID
);
862 BOOL IMAGEAPI
FindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
, PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
863 BOOL IMAGEAPI
SymFindFileInPath(HANDLE
, PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, DWORD
, PSTR
, PFINDFILEINPATHCALLBACK
, PVOID
);
864 BOOL IMAGEAPI
SymFindFileInPathW(HANDLE
, PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, DWORD
, PWSTR
, PFINDFILEINPATHCALLBACKW
, PVOID
);
865 HANDLE IMAGEAPI
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 IMAGEAPI
FindExecutableImageEx(PCSTR
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
869 HANDLE IMAGEAPI
FindExecutableImageExW(PCWSTR
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
870 HANDLE IMAGEAPI
SymFindExecutableImage(HANDLE
, PCSTR
, PSTR
, PFIND_EXE_FILE_CALLBACK
, PVOID
);
871 HANDLE IMAGEAPI
SymFindExecutableImageW(HANDLE
, PCWSTR
, PWSTR
, PFIND_EXE_FILE_CALLBACKW
, PVOID
);
872 PIMAGE_NT_HEADERS IMAGEAPI
ImageNtHeader(PVOID
);
873 PVOID IMAGEAPI
ImageDirectoryEntryToDataEx(PVOID
, BOOLEAN
, USHORT
, PULONG
, PIMAGE_SECTION_HEADER
*);
874 PVOID IMAGEAPI
ImageDirectoryEntryToData(PVOID
, BOOLEAN
, USHORT
, PULONG
);
875 PIMAGE_SECTION_HEADER IMAGEAPI
ImageRvaToSection(PIMAGE_NT_HEADERS
, PVOID
, ULONG
);
876 PVOID IMAGEAPI
ImageRvaToVa(PIMAGE_NT_HEADERS
, PVOID
, ULONG
, PIMAGE_SECTION_HEADER
*);
877 BOOL IMAGEAPI
SymGetSearchPath(HANDLE
, PSTR
, DWORD
);
878 BOOL IMAGEAPI
SymGetSearchPathW(HANDLE
, PWSTR
, DWORD
);
879 BOOL IMAGEAPI
SymSetSearchPath(HANDLE
, PCSTR
);
880 BOOL IMAGEAPI
SymSetSearchPathW(HANDLE
, PCWSTR
);
881 DWORD IMAGEAPI
GetTimestampForLoadedLibrary(HMODULE
);
882 BOOL IMAGEAPI
MakeSureDirectoryPathExists(PCSTR
);
883 BOOL IMAGEAPI
SearchTreeForFile(PCSTR
, PCSTR
, PSTR
);
884 BOOL IMAGEAPI
SearchTreeForFileW(PCWSTR
, PCWSTR
, PWSTR
);
885 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACK
)(PCSTR
, PVOID
);
886 typedef BOOL (CALLBACK
*PENUMDIRTREE_CALLBACKW
)(PCWSTR
, PVOID
);
887 BOOL IMAGEAPI
EnumDirTree(HANDLE
, PCSTR
, PCSTR
, PSTR
, PENUMDIRTREE_CALLBACK
, PVOID
);
888 BOOL IMAGEAPI
EnumDirTreeW(HANDLE
, PCWSTR
, PCWSTR
, PWSTR
, PENUMDIRTREE_CALLBACKW
, PVOID
);
889 BOOL IMAGEAPI
SymMatchFileName(PCSTR
, PCSTR
, PSTR
*, PSTR
*);
890 BOOL IMAGEAPI
SymMatchFileNameW(PCWSTR
, PCWSTR
, PWSTR
*, PWSTR
*);
891 PCHAR IMAGEAPI
SymSetHomeDirectory(HANDLE
, PCSTR
);
892 PWSTR IMAGEAPI
SymSetHomeDirectoryW(HANDLE
, PCWSTR
);
893 PCHAR IMAGEAPI
SymGetHomeDirectory(DWORD
, PSTR
, size_t);
894 PWSTR IMAGEAPI
SymGetHomeDirectoryW(DWORD
, PWSTR
, size_t);
900 /*************************
901 * Context management *
902 *************************/
903 BOOL IMAGEAPI
SymSetContext(HANDLE
, PIMAGEHLP_STACK_FRAME
, PIMAGEHLP_CONTEXT
);
904 BOOL IMAGEAPI
SymSetScopeFromIndex(HANDLE
, ULONG64
, ULONG
);
905 BOOL IMAGEAPI
SymSetScopeFromAddr(HANDLE
, ULONG64
);
906 BOOL IMAGEAPI
SymSetScopeFromInlineContext(HANDLE
, ULONG64
, ULONG
);
908 /*************************
910 *************************/
912 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
913 #define KDHELP KDHELP64
914 #define PKDHELP PKDHELP64
916 typedef struct _KDHELP
919 DWORD ThCallbackStack
;
922 DWORD KiCallUserMode
;
923 DWORD KeUserCallbackDispatcher
;
924 DWORD SystemRangeStart
;
928 typedef struct _KDHELP64
931 DWORD ThCallbackStack
;
932 DWORD ThCallbackBStore
;
935 DWORD64 KiCallUserMode
;
936 DWORD64 KeUserCallbackDispatcher
;
937 DWORD64 SystemRangeStart
;
939 } KDHELP64
, *PKDHELP64
;
941 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
942 #define STACKFRAME STACKFRAME64
943 #define LPSTACKFRAME LPSTACKFRAME64
945 typedef struct _STACKFRAME
951 PVOID FuncTableEntry
;
958 } STACKFRAME
, *LPSTACKFRAME
;
961 typedef struct _STACKFRAME64
964 ADDRESS64 AddrReturn
;
967 ADDRESS64 AddrBStore
;
968 PVOID FuncTableEntry
;
974 } STACKFRAME64
, *LPSTACKFRAME64
;
976 #define INLINE_FRAME_CONTEXT_INIT 0
977 #define INLINE_FRAME_CONTEXT_IGNORE 0xFFFFFFFF
979 typedef struct _tagSTACKFRAME_EX
982 ADDRESS64 AddrReturn
;
985 ADDRESS64 AddrBStore
;
986 PVOID FuncTableEntry
;
993 DWORD StackFrameSize
;
994 DWORD InlineFrameContext
;
995 } STACKFRAME_EX
, *LPSTACKFRAME_EX
;
998 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE64
)
999 (HANDLE
, DWORD64
, PVOID
, DWORD
, PDWORD
);
1000 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE64
)(HANDLE
, DWORD64
);
1001 typedef DWORD64 (CALLBACK
*PGET_MODULE_BASE_ROUTINE64
)(HANDLE
, DWORD64
);
1002 typedef DWORD64 (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE64
)(HANDLE
, HANDLE
, LPADDRESS64
);
1003 BOOL IMAGEAPI
StackWalk64(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME64
, PVOID
,
1004 PREAD_PROCESS_MEMORY_ROUTINE64
,
1005 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1006 PGET_MODULE_BASE_ROUTINE64
,
1007 PTRANSLATE_ADDRESS_ROUTINE64
);
1008 #define SYM_STKWALK_DEFAULT 0x00000000
1009 #define SYM_STKWALK_FORCE_FRAMEPTR 0x00000001
1010 BOOL IMAGEAPI
StackWalkEx(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME_EX
, PVOID
,
1011 PREAD_PROCESS_MEMORY_ROUTINE64
,
1012 PFUNCTION_TABLE_ACCESS_ROUTINE64
,
1013 PGET_MODULE_BASE_ROUTINE64
,
1014 PTRANSLATE_ADDRESS_ROUTINE64
,
1016 PVOID IMAGEAPI
SymFunctionTableAccess64(HANDLE
, DWORD64
);
1018 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK64
)(HANDLE
, ULONG64
, ULONG64
);
1020 BOOL IMAGEAPI
SymRegisterFunctionEntryCallback64(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK64
, ULONG64
);
1021 BOOL IMAGEAPI
SymGetUnwindInfo(HANDLE
, DWORD64
, PVOID
, PULONG
);
1023 /* Inline context related APIs */
1024 DWORD IMAGEAPI
SymAddrIncludeInlineTrace(HANDLE
, DWORD64
);
1026 #define SYM_INLINE_COMP_ERROR 0
1027 #define SYM_INLINE_COMP_IDENTICAL 1
1028 #define SYM_INLINE_COMP_STEPIN 2
1029 #define SYM_INLINE_COMP_STEPOUT 3
1030 #define SYM_INLINE_COMP_STEPOVER 4
1031 #define SYM_INLINE_COMP_DIFFERENT 5
1033 DWORD IMAGEAPI
SymCompareInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, DWORD64
);
1034 BOOL IMAGEAPI
SymQueryInlineTrace(HANDLE
, DWORD64
, DWORD
, DWORD64
, DWORD64
, LPDWORD
, LPDWORD
);
1036 /*************************
1037 * Version, global stuff *
1038 *************************/
1040 #define API_VERSION_NUMBER 9
1042 typedef struct API_VERSION
1044 USHORT MajorVersion
;
1045 USHORT MinorVersion
;
1048 } API_VERSION
, *LPAPI_VERSION
;
1050 LPAPI_VERSION IMAGEAPI
ImagehlpApiVersion(void);
1051 LPAPI_VERSION IMAGEAPI
ImagehlpApiVersionEx(LPAPI_VERSION
);
1054 typedef struct _IMAGE_DEBUG_INFORMATION
1058 PVOID ReservedMappedBase
;
1059 USHORT ReservedMachine
;
1060 USHORT ReservedCharacteristics
;
1061 DWORD ReservedCheckSum
;
1064 DWORD ReservedNumberOfSections
;
1065 PIMAGE_SECTION_HEADER ReservedSections
;
1066 DWORD ReservedExportedNamesSize
;
1067 PSTR ReservedExportedNames
;
1068 DWORD ReservedNumberOfFunctionTableEntries
;
1069 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries
;
1070 DWORD ReservedLowestFunctionStartingAddress
;
1071 DWORD ReservedHighestFunctionEndingAddress
;
1072 DWORD ReservedNumberOfFpoTableEntries
;
1073 PFPO_DATA ReservedFpoTableEntries
;
1074 DWORD SizeOfCoffSymbols
;
1075 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols
;
1076 DWORD ReservedSizeOfCodeViewSymbols
;
1077 PVOID ReservedCodeViewSymbols
;
1080 PSTR ReservedDebugFilePath
;
1081 DWORD ReservedTimeDateStamp
;
1082 BOOL ReservedRomImage
;
1083 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory
;
1084 DWORD ReservedNumberOfDebugDirectories
;
1085 DWORD ReservedOriginalFunctionTableBaseAddress
;
1086 DWORD Reserved
[ 2 ];
1087 } IMAGE_DEBUG_INFORMATION
, *PIMAGE_DEBUG_INFORMATION
;
1089 PIMAGE_DEBUG_INFORMATION IMAGEAPI
MapDebugInformation(HANDLE
, PCSTR
, PCSTR
, ULONG
);
1090 BOOL IMAGEAPI
UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION
);
1095 SYMOPT_EX_DISABLEACCESSTIMEUPDATE
,
1099 /* Include ELF/Mach-O modules in module operations */
1100 SYMOPT_EX_WINE_NATIVE_MODULES
= 1000,
1101 /* Enable Wine's extension APIs */
1102 SYMOPT_EX_WINE_EXTENSION_API
,
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 IMAGEAPI
SymGetOptions(void);
1111 DWORD IMAGEAPI
SymSetOptions(DWORD
);
1112 BOOL IMAGEAPI
SymGetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
);
1113 BOOL IMAGEAPI
SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option
, BOOL value
);
1114 BOOL IMAGEAPI
SymSetParentWindow(HWND
);
1116 /***************************
1117 * Symbol servers & stores *
1118 ***************************/
1119 BOOL IMAGEAPI
SymSrvGetFileIndexes(PCSTR
, GUID
*, PDWORD
, PDWORD
, DWORD
);
1120 BOOL IMAGEAPI
SymSrvGetFileIndexesW(PCWSTR
, GUID
*, PDWORD
, PDWORD
, DWORD
);
1121 BOOL IMAGEAPI
SymSrvGetFileIndexInfo(PCSTR
, PSYMSRV_INDEX_INFO
, DWORD
);
1122 BOOL IMAGEAPI
SymSrvGetFileIndexInfoW(PCWSTR
, PSYMSRV_INDEX_INFOW
, DWORD
);
1124 typedef BOOL (WINAPI
* PSYMBOLSERVERPROC
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1125 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCA
)(PCSTR
, PCSTR
, PVOID
, DWORD
, DWORD
, PSTR
);
1126 typedef BOOL (WINAPI
* PSYMBOLSERVERPROCW
)(PCWSTR
, PCWSTR
, PVOID
, DWORD
, DWORD
, PWSTR
);
1127 typedef BOOL (WINAPI
* PSYMBOLSERVEROPENPROC
)(void);
1128 typedef BOOL (WINAPI
* PSYMBOLSERVERCLOSEPROC
)(void);
1129 typedef BOOL (WINAPI
* PSYMBOLSERVERSETOPTIONSPROC
)(UINT_PTR
, ULONG64
);
1130 typedef BOOL (CALLBACK
* PSYMBOLSERVERCALLBACKPROC
)(UINT_PTR
, ULONG64
, ULONG64
);
1131 typedef UINT_PTR (WINAPI
* PSYMBOLSERVERGETOPTIONSPROC
)(void);
1132 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROC
)(PCSTR
);
1133 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCA
)(PCSTR
);
1134 typedef BOOL (WINAPI
* PSYMBOLSERVERPINGPROCW
)(PCWSTR
);
1136 #define SSRVOPT_CALLBACK 0x0001
1137 #define SSRVOPT_DWORD 0x0002
1138 #define SSRVOPT_DWORDPTR 0x0004
1139 #define SSRVOPT_GUIDPTR 0x0008
1140 #define SSRVOPT_OLDGUIDPTR 0x0010
1141 #define SSRVOPT_UNATTENDED 0x0020
1142 #define SSRVOPT_NOCOPY 0x0040
1143 #define SSRVOPT_PARENTWIN 0x0080
1144 #define SSRVOPT_PARAMTYPE 0x0100
1145 #define SSRVOPT_SECURE 0x0200
1146 #define SSRVOPT_TRACE 0x0400
1147 #define SSRVOPT_SETCONTEXT 0x0800
1148 #define SSRVOPT_PROXY 0x1000
1149 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1150 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1152 #define SSRVACTION_TRACE 1
1153 #define SSRVACTION_QUERYCANCEL 2
1154 #define SSRVACTION_EVENT 3
1155 #define SSRVACTION_EVENTW 4
1156 #define SSRVACTION_SIZE 5
1157 #define SSRVACTION_HTTPSTATUS 6
1159 /* 32-bit functions */
1161 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1163 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
1164 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
1165 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
1166 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
1167 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
1168 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
1169 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
1170 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
1171 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
1172 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
1174 #define EnumerateLoadedModules EnumerateLoadedModules64
1175 #define StackWalk StackWalk64
1176 #define SymEnumerateModules SymEnumerateModules64
1177 #define SymEnumerateSymbols SymEnumerateSymbols64
1178 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
1179 #define SymFunctionTableAccess SymFunctionTableAccess64
1180 #define SymGetLineFromAddr SymGetLineFromAddr64
1181 #define SymGetLineFromAddrW SymGetLineFromAddrW64
1182 #define SymGetLineFromName SymGetLineFromName64
1183 #define SymGetLineNext SymGetLineNext64
1184 #define SymGetLineNextW SymGetLineNextW64
1185 #define SymGetLinePrev SymGetLinePrev64
1186 #define SymGetLinePrevW SymGetLinePrevW64
1187 #define SymGetModuleBase SymGetModuleBase64
1188 #define SymGetModuleInfo SymGetModuleInfo64
1189 #define SymGetModuleInfoW SymGetModuleInfoW64
1190 #define SymGetSymFromAddr SymGetSymFromAddr64
1191 #define SymGetSymFromName SymGetSymFromName64
1192 #define SymGetSymNext SymGetSymNext64
1193 #define SymGetSymNextW SymGetSymNextW64
1194 #define SymGetSymPrev SymGetSymPrev64
1195 #define SymGetSymPrevW SymGetSymPrevW64
1196 #define SymLoadModule SymLoadModule64
1197 #define SymRegisterCallback SymRegisterCallback64
1198 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
1199 #define SymUnDName SymUnDName64
1200 #define SymUnloadModule SymUnloadModule64
1204 typedef BOOL (CALLBACK
*PENUMLOADED_MODULES_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1205 typedef PVOID (CALLBACK
*PFUNCTION_TABLE_ACCESS_ROUTINE
)(HANDLE
, DWORD
);
1206 typedef DWORD (CALLBACK
*PGET_MODULE_BASE_ROUTINE
)(HANDLE
, DWORD
);
1207 typedef BOOL (CALLBACK
*PREAD_PROCESS_MEMORY_ROUTINE
)(HANDLE
, DWORD
, PVOID
, DWORD
, PDWORD
);
1208 typedef BOOL (CALLBACK
*PSYM_ENUMMODULES_CALLBACK
)(PCSTR
, ULONG
, PVOID
);
1209 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACK
)(PCSTR
, ULONG
, ULONG
, PVOID
);
1210 typedef BOOL (CALLBACK
*PSYM_ENUMSYMBOLS_CALLBACKW
)(PCWSTR
, ULONG
, ULONG
, PVOID
);
1211 typedef BOOL (CALLBACK
*PSYMBOL_REGISTERED_CALLBACK
)(HANDLE
, ULONG
, PVOID
, PVOID
);
1212 typedef PVOID (CALLBACK
*PSYMBOL_FUNCENTRY_CALLBACK
)(HANDLE
, DWORD
, PVOID
);
1213 typedef DWORD (CALLBACK
*PTRANSLATE_ADDRESS_ROUTINE
)(HANDLE
, HANDLE
, LPADDRESS
);
1215 BOOL IMAGEAPI
EnumerateLoadedModules(HANDLE
, PENUMLOADED_MODULES_CALLBACK
, PVOID
);
1216 BOOL IMAGEAPI
StackWalk(DWORD
, HANDLE
, HANDLE
, LPSTACKFRAME
, PVOID
, PREAD_PROCESS_MEMORY_ROUTINE
, PFUNCTION_TABLE_ACCESS_ROUTINE
, PGET_MODULE_BASE_ROUTINE
, PTRANSLATE_ADDRESS_ROUTINE
);
1217 BOOL IMAGEAPI
SymEnumerateModules(HANDLE
, PSYM_ENUMMODULES_CALLBACK
, PVOID
);
1218 BOOL IMAGEAPI
SymEnumerateSymbols(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACK
, PVOID
);
1219 BOOL IMAGEAPI
SymEnumerateSymbolsW(HANDLE
, ULONG
, PSYM_ENUMSYMBOLS_CALLBACKW
, PVOID
);
1220 PVOID IMAGEAPI
SymFunctionTableAccess(HANDLE
, DWORD
);
1221 BOOL IMAGEAPI
SymGetLineFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINE
);
1222 BOOL IMAGEAPI
SymGetLineFromAddrW(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_LINEW
);
1223 BOOL IMAGEAPI
SymGetLineFromName(HANDLE
, PCSTR
, PCSTR
, DWORD
, PLONG
, PIMAGEHLP_LINE
);
1224 BOOL IMAGEAPI
SymGetLineNext(HANDLE
, PIMAGEHLP_LINE
);
1225 BOOL IMAGEAPI
SymGetLineNextW(HANDLE
, PIMAGEHLP_LINEW
);
1226 BOOL IMAGEAPI
SymGetLinePrev(HANDLE
, PIMAGEHLP_LINE
);
1227 BOOL IMAGEAPI
SymGetLinePrevW(HANDLE
, PIMAGEHLP_LINEW
);
1228 DWORD IMAGEAPI
SymGetModuleBase(HANDLE
, DWORD
);
1229 BOOL IMAGEAPI
SymGetModuleInfo(HANDLE
, DWORD
, PIMAGEHLP_MODULE
);
1230 BOOL IMAGEAPI
SymGetModuleInfoW(HANDLE
, DWORD
, PIMAGEHLP_MODULEW
);
1231 BOOL IMAGEAPI
SymGetSymFromAddr(HANDLE
, DWORD
, PDWORD
, PIMAGEHLP_SYMBOL
);
1232 BOOL IMAGEAPI
SymGetSymFromName(HANDLE
, PCSTR
, PIMAGEHLP_SYMBOL
);
1233 BOOL IMAGEAPI
SymGetSymNext(HANDLE
, PIMAGEHLP_SYMBOL
);
1234 BOOL IMAGEAPI
SymGetSymNextW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1235 BOOL IMAGEAPI
SymGetSymPrev(HANDLE
, PIMAGEHLP_SYMBOL
);
1236 BOOL IMAGEAPI
SymGetSymPrevW(HANDLE
, PIMAGEHLP_SYMBOLW
);
1237 DWORD IMAGEAPI
SymLoadModule(HANDLE
, HANDLE
, PCSTR
, PCSTR
, DWORD
, DWORD
);
1238 BOOL IMAGEAPI
SymRegisterCallback(HANDLE
, PSYMBOL_REGISTERED_CALLBACK
, PVOID
);
1239 BOOL IMAGEAPI
SymRegisterFunctionEntryCallback(HANDLE
, PSYMBOL_FUNCENTRY_CALLBACK
, PVOID
);
1240 BOOL IMAGEAPI
SymUnDName(PIMAGEHLP_SYMBOL
, PSTR
, DWORD
);
1241 BOOL IMAGEAPI
SymUnloadModule(HANDLE
, DWORD
);
1247 /* Wine extensions to dbghelp */
1248 enum dhext_module_type
1250 DMT_UNKNOWN
, /* for lookup, not actually used for a module */
1251 DMT_ELF
, /* a real ELF shared module */
1252 DMT_MACHO
, /* a real Mach-O shared module */
1253 DMT_PE
, /* a native or builtin PE module */
1256 /* only reporting the formats not exposed in regular IMAGHELP_MODULE_INFO */
1257 enum dhext_debug_format
1259 DHEXT_FORMAT_DWARF2
= 0x0001,
1260 DHEXT_FORMAT_DWARF3
= 0x0002,
1261 DHEXT_FORMAT_DWARF4
= 0x0004,
1262 DHEXT_FORMAT_DWARF5
= 0x0008,
1263 DHEXT_FORMAT_STABS
= 0x0010,
1266 struct dhext_module_information
1268 enum dhext_module_type type
;
1269 unsigned is_wine_builtin
: 1,
1272 unsigned debug_format_bitmask
;
1275 extern BOOL WINAPI
wine_get_module_information(HANDLE
, DWORD64 base
, struct dhext_module_information
*, unsigned len
);
1277 #endif /* __WINESRC__ */
1281 #endif /* defined(__cplusplus) */
1283 #endif /* __WINE_DBGHELP_H */