server: Remove the socket from the polling loop if it was aborted.
[wine.git] / include / dbghelp.h
blobbf235c7f97a7a0dd56eec35f42736c3062252881
1 /*
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 /* A set of documentation macros (see also imagehlp.h) */
25 #ifndef __deref_out
26 # define __deref_out
27 #endif
28 #ifndef __deref_out_opt
29 # define __deref_out_opt
30 #endif
31 #ifndef __deref_opt_out
32 # define __deref_opt_out
33 #endif
34 #ifndef __in
35 # define __in
36 #endif
37 #ifndef __in_opt
38 # define __in_opt
39 #endif
40 #ifndef __in_bcount
41 # define __in_bcount(x)
42 #endif
43 #ifndef __in_bcount_opt
44 # define __in_bcount_opt(x)
45 #endif
46 #ifndef __in_ecount
47 # define __in_ecount(x)
48 #endif
49 #ifndef __inout
50 # define __inout
51 #endif
52 #ifndef __inout_opt
53 # define __inout_opt
54 #endif
55 #ifndef __inout_bcount
56 # define __inout_bcount(x)
57 #endif
58 #ifndef __inout_ecount
59 # define __inout_ecount(x)
60 #endif
61 #ifndef __out
62 # define __out
63 #endif
64 #ifndef __out_opt
65 # define __out_opt
66 #endif
67 #ifndef __out_bcount
68 # define __out_bcount(x)
69 #endif
70 #ifndef __out_bcount_opt
71 # define __out_bcount_opt(x)
72 #endif
73 #ifndef __out_ecount
74 # define __out_ecount(x)
75 #endif
76 #ifndef __out_ecount_opt
77 # define __out_ecount_opt(x)
78 #endif
79 #ifndef __out_xcount
80 # define __out_xcount(x)
81 #endif
84 #ifdef __cplusplus
85 extern "C" {
86 #endif /* defined(__cplusplus) */
88 #ifdef _WIN64
89 #ifndef _IMAGEHLP64
90 #define _IMAGEHLP64
91 #endif
92 #endif
94 #define IMAGEAPI WINAPI
95 #define DBHLPAPI IMAGEAPI
97 typedef struct _LOADED_IMAGE
99 PSTR ModuleName;
100 HANDLE hFile;
101 PUCHAR MappedAddress;
102 PIMAGE_NT_HEADERS FileHeader;
103 PIMAGE_SECTION_HEADER LastRvaSection;
104 ULONG NumberOfSections;
105 PIMAGE_SECTION_HEADER Sections;
106 ULONG Characteristics;
107 BOOLEAN fSystemImage;
108 BOOLEAN fDOSImage;
109 BOOLEAN fReadOnly;
110 UCHAR Version;
111 LIST_ENTRY Links;
112 ULONG SizeOfImage;
113 } LOADED_IMAGE, *PLOADED_IMAGE;
115 /*************************
116 * IMAGEHLP equiv *
117 *************************/
119 typedef enum
121 AddrMode1616,
122 AddrMode1632,
123 AddrModeReal,
124 AddrModeFlat
125 } ADDRESS_MODE;
127 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
128 #define ADDRESS ADDRESS64
129 #define LPADDRESS LPADDRESS64
130 #else
131 typedef struct _tagADDRESS
133 DWORD Offset;
134 WORD Segment;
135 ADDRESS_MODE Mode;
136 } ADDRESS, *LPADDRESS;
137 #endif
139 typedef struct _tagADDRESS64
141 DWORD64 Offset;
142 WORD Segment;
143 ADDRESS_MODE Mode;
144 } ADDRESS64, *LPADDRESS64;
146 #define SYMF_OMAP_GENERATED 0x00000001
147 #define SYMF_OMAP_MODIFIED 0x00000002
148 #define SYMF_USER_GENERATED 0x00000004
149 #define SYMF_REGISTER 0x00000008
150 #define SYMF_REGREL 0x00000010
151 #define SYMF_FRAMEREL 0x00000020
152 #define SYMF_PARAMETER 0x00000040
153 #define SYMF_LOCAL 0x00000080
154 #define SYMF_CONSTANT 0x00000100
155 #define SYMF_EXPORT 0x00000200
156 #define SYMF_FORWARDER 0x00000400
157 #define SYMF_FUNCTION 0x00000800
158 #define SYMF_VIRTUAL 0x00001000
159 #define SYMF_THUNK 0x00002000
160 #define SYMF_TLSREL 0x00004000
162 typedef enum
164 SymNone = 0,
165 SymCoff,
166 SymCv,
167 SymPdb,
168 SymExport,
169 SymDeferred,
170 SymSym,
171 SymDia,
172 SymVirtual,
173 NumSymTypes
174 } SYM_TYPE;
176 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
177 #define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64
178 #define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64
179 #define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64
180 #define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64
181 #else
182 typedef struct _IMAGEHLP_SYMBOL
184 DWORD SizeOfStruct;
185 DWORD Address;
186 DWORD Size;
187 DWORD Flags;
188 DWORD MaxNameLength;
189 CHAR Name[1];
190 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
192 typedef struct _IMAGEHLP_SYMBOLW
194 DWORD SizeOfStruct;
195 DWORD Address;
196 DWORD Size;
197 DWORD Flags;
198 DWORD MaxNameLength;
199 WCHAR Name[1];
200 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW;
201 #endif
203 typedef struct _IMAGEHLP_SYMBOL64
205 DWORD SizeOfStruct;
206 DWORD64 Address;
207 DWORD Size;
208 DWORD Flags;
209 DWORD MaxNameLength;
210 CHAR Name[1];
211 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
213 typedef struct _IMAGEHLP_SYMBOLW64
215 DWORD SizeOfStruct;
216 DWORD64 Address;
217 DWORD Size;
218 DWORD Flags;
219 DWORD MaxNameLength;
220 WCHAR Name[1];
221 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64;
223 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
224 #define IMAGEHLP_MODULE IMAGEHLP_MODULE64
225 #define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64
226 #define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64
227 #define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64
228 #else
229 typedef struct _IMAGEHLP_MODULE
231 DWORD SizeOfStruct;
232 DWORD BaseOfImage;
233 DWORD ImageSize;
234 DWORD TimeDateStamp;
235 DWORD CheckSum;
236 DWORD NumSyms;
237 SYM_TYPE SymType;
238 CHAR ModuleName[32];
239 CHAR ImageName[256];
240 CHAR LoadedImageName[256];
241 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
243 typedef struct _IMAGEHLP_MODULEW
245 DWORD SizeOfStruct;
246 DWORD BaseOfImage;
247 DWORD ImageSize;
248 DWORD TimeDateStamp;
249 DWORD CheckSum;
250 DWORD NumSyms;
251 SYM_TYPE SymType;
252 WCHAR ModuleName[32];
253 WCHAR ImageName[256];
254 WCHAR LoadedImageName[256];
255 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
256 #endif
258 typedef struct _IMAGEHLP_MODULE64
260 DWORD SizeOfStruct;
261 DWORD64 BaseOfImage;
262 DWORD ImageSize;
263 DWORD TimeDateStamp;
264 DWORD CheckSum;
265 DWORD NumSyms;
266 SYM_TYPE SymType;
267 CHAR ModuleName[32];
268 CHAR ImageName[256];
269 CHAR LoadedImageName[256];
270 CHAR LoadedPdbName[256];
271 DWORD CVSig;
272 CHAR CVData[MAX_PATH*3];
273 DWORD PdbSig;
274 GUID PdbSig70;
275 DWORD PdbAge;
276 BOOL PdbUnmatched;
277 BOOL DbgUnmatched;
278 BOOL LineNumbers;
279 BOOL GlobalSymbols;
280 BOOL TypeInfo;
281 BOOL SourceIndexed;
282 BOOL Publics;
283 DWORD MachineType;
284 DWORD Reserved;
285 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
287 typedef struct _IMAGEHLP_MODULEW64
289 DWORD SizeOfStruct;
290 DWORD64 BaseOfImage;
291 DWORD ImageSize;
292 DWORD TimeDateStamp;
293 DWORD CheckSum;
294 DWORD NumSyms;
295 SYM_TYPE SymType;
296 WCHAR ModuleName[32];
297 WCHAR ImageName[256];
298 WCHAR LoadedImageName[256];
299 WCHAR LoadedPdbName[256];
300 DWORD CVSig;
301 WCHAR CVData[MAX_PATH*3];
302 DWORD PdbSig;
303 GUID PdbSig70;
304 DWORD PdbAge;
305 BOOL PdbUnmatched;
306 BOOL DbgUnmatched;
307 BOOL LineNumbers;
308 BOOL GlobalSymbols;
309 BOOL TypeInfo;
310 BOOL SourceIndexed;
311 BOOL Publics;
312 DWORD MachineType;
313 DWORD Reserved;
314 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
316 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
317 #define IMAGEHLP_LINE IMAGEHLP_LINE64
318 #define PIMAGEHLP_LINE PIMAGEHLP_LINE64
319 #define IMAGEHLP_LINEW IMAGEHLP_LINEW64
320 #define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64
321 #else
322 typedef struct _IMAGEHLP_LINE
324 DWORD SizeOfStruct;
325 PVOID Key;
326 DWORD LineNumber;
327 PCHAR FileName;
328 DWORD Address;
329 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
331 typedef struct _IMAGEHLP_LINEW
333 DWORD SizeOfStruct;
334 PVOID Key;
335 DWORD LineNumber;
336 PWSTR FileName;
337 DWORD Address;
338 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW;
339 #endif
341 typedef struct _IMAGEHLP_LINE64
343 DWORD SizeOfStruct;
344 PVOID Key;
345 DWORD LineNumber;
346 PCHAR FileName;
347 DWORD64 Address;
348 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
350 typedef struct _IMAGEHLP_LINEW64
352 DWORD SizeOfStruct;
353 PVOID Key;
354 DWORD LineNumber;
355 PWSTR FileName;
356 DWORD64 Address;
357 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64;
359 typedef struct _SOURCEFILE
361 DWORD64 ModBase;
362 PCHAR FileName;
363 } SOURCEFILE, *PSOURCEFILE;
365 typedef struct _SOURCEFILEW
367 DWORD64 ModBase;
368 PWSTR FileName;
369 } SOURCEFILEW, *PSOURCEFILEW;
371 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
372 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
373 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
374 #define CBA_SYMBOLS_UNLOADED 0x00000004
375 #define CBA_DUPLICATE_SYMBOL 0x00000005
376 #define CBA_READ_MEMORY 0x00000006
377 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
378 #define CBA_SET_OPTIONS 0x00000008
379 #define CBA_EVENT 0x00000010
380 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
381 #define CBA_DEBUG_INFO 0x10000000
383 typedef struct _IMAGEHLP_CBA_READ_MEMORY
385 DWORD64 addr;
386 PVOID buf;
387 DWORD bytes;
388 DWORD *bytesread;
389 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY;
391 enum
393 sevInfo = 0,
394 sevProblem,
395 sevAttn,
396 sevFatal,
397 sevMax
400 #define EVENT_SRCSPEW_START 100
401 #define EVENT_SRCSPEW 100
402 #define EVENT_SRCSPEW_END 199
404 typedef struct _IMAGEHLP_CBA_EVENT
406 DWORD severity;
407 DWORD code;
408 PCHAR desc;
409 PVOID object;
410 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT;
412 typedef struct _IMAGEHLP_CBA_EVENTW
414 DWORD severity;
415 DWORD code;
416 PCWSTR desc;
417 PVOID object;
418 } IMAGEHLP_CBA_EVENTW, *PIMAGEHLP_CBA_EVENTW;
420 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
421 #define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64
422 #define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64
423 #else
424 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
426 DWORD SizeOfStruct;
427 DWORD BaseOfImage;
428 DWORD CheckSum;
429 DWORD TimeDateStamp;
430 CHAR FileName[MAX_PATH];
431 BOOLEAN Reparse;
432 HANDLE hFile;
433 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
434 #endif
436 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
438 DWORD SizeOfStruct;
439 DWORD64 BaseOfImage;
440 DWORD CheckSum;
441 DWORD TimeDateStamp;
442 CHAR FileName[MAX_PATH];
443 BOOLEAN Reparse;
444 HANDLE hFile;
445 DWORD Flags;
446 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
448 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64
450 DWORD SizeOfStruct;
451 DWORD64 BaseOfImage;
452 DWORD CheckSum;
453 DWORD TimeDateStamp;
454 WCHAR FileName[MAX_PATH + 1];
455 BOOLEAN Reparse;
456 HANDLE hFile;
457 DWORD Flags;
458 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64;
460 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
461 #define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64
462 #define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64
463 #else
464 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
466 DWORD SizeOfStruct;
467 DWORD NumberOfDups;
468 PIMAGEHLP_SYMBOL Symbol;
469 DWORD SelectedSymbol;
470 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
471 #endif
473 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
475 DWORD SizeOfStruct;
476 DWORD NumberOfDups;
477 PIMAGEHLP_SYMBOL64 Symbol;
478 DWORD SelectedSymbol;
479 } IMAGEHLP_DUPLICATE_SYMBOL64, *PIMAGEHLP_DUPLICATE_SYMBOL64;
481 #define SYMOPT_CASE_INSENSITIVE 0x00000001
482 #define SYMOPT_UNDNAME 0x00000002
483 #define SYMOPT_DEFERRED_LOADS 0x00000004
484 #define SYMOPT_NO_CPP 0x00000008
485 #define SYMOPT_LOAD_LINES 0x00000010
486 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
487 #define SYMOPT_LOAD_ANYTHING 0x00000040
488 #define SYMOPT_IGNORE_CVREC 0x00000080
489 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
490 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
491 #define SYMOPT_EXACT_SYMBOLS 0x00000400
492 #define SYMOPT_WILD_UNDERSCORE 0x00000800
493 #define SYMOPT_USE_DEFAULTS 0x00001000
494 /* latest SDK defines:
495 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
496 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
498 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
499 #define SYMOPT_PUBLICS_ONLY 0x00004000
500 #define SYMOPT_NO_PUBLICS 0x00008000
501 #define SYMOPT_AUTO_PUBLICS 0x00010000
502 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
503 #define SYMOPT_SECURE 0x00040000
504 #define SYMOPT_NO_PROMPTS 0x00080000
505 #define SYMOPT_OVERWRITE 0x00100000
506 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000
507 #define SYMOPT_FLAT_DIRECTORY 0x00400000
508 #define SYMOPT_FAVOR_COMPRESSED 0x00800000
509 #define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000
510 #define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000
511 #define SYMOPT_READONLY_CACHE 0x04000000
512 #define SYMOPT_SYMPATH_LAST 0x08000000
513 #define SYMOPT_DISABLE_FAST_SYMBOLS 0x10000000
514 #define SYMOPT_DISABLE_SYMSRV_TIMEOUT 0x20000000
515 #define SYMOPT_DISABLE_SRVSTAR_ON_STARTUP 0x40000000
516 #define SYMOPT_DEBUG 0x80000000
518 typedef struct _IMAGEHLP_STACK_FRAME
520 ULONG64 InstructionOffset;
521 ULONG64 ReturnOffset;
522 ULONG64 FrameOffset;
523 ULONG64 StackOffset;
524 ULONG64 BackingStoreOffset;
525 ULONG64 FuncTableEntry;
526 ULONG64 Params[4];
527 ULONG64 Reserved[5];
528 BOOL Virtual;
529 ULONG Reserved2;
530 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
532 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
534 #define DBHHEADER_DEBUGDIRS 0x1
535 typedef struct _DBGHELP_MODLOAD_DATA
537 DWORD ssize;
538 DWORD ssig;
539 PVOID data;
540 DWORD size;
541 DWORD flags;
542 } MODLOAD_DATA, *PMODLOAD_DATA;
544 /*************************
545 * MiniDUMP *
546 *************************/
548 #include <pshpack4.h>
549 /* DebugHelp */
551 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
552 #define MINIDUMP_VERSION (42899)
554 typedef DWORD RVA;
555 typedef ULONG64 RVA64;
557 typedef enum _MINIDUMP_TYPE
559 MiniDumpNormal = 0x0000,
560 MiniDumpWithDataSegs = 0x0001,
561 MiniDumpWithFullMemory = 0x0002,
562 MiniDumpWithHandleData = 0x0004,
563 MiniDumpFilterMemory = 0x0008,
564 MiniDumpScanMemory = 0x0010,
565 MiniDumpWithUnloadedModules = 0x0020,
566 MiniDumpWithIndirectlyReferencedMemory = 0x0040,
567 MiniDumpFilterModulePaths = 0x0080,
568 MiniDumpWithProcessThreadData = 0x0100,
569 MiniDumpWithPrivateReadWriteMemory = 0x0200,
570 MiniDumpWithoutOptionalData = 0x0400,
571 MiniDumpWithFullMemoryInfo = 0x0800,
572 MiniDumpWithThreadInfo = 0x1000,
573 MiniDumpWithCodeSegs = 0x2000
574 } MINIDUMP_TYPE;
576 typedef enum _MINIDUMP_CALLBACK_TYPE
578 ModuleCallback,
579 ThreadCallback,
580 ThreadExCallback,
581 IncludeThreadCallback,
582 IncludeModuleCallback,
583 MemoryCallback,
584 } MINIDUMP_CALLBACK_TYPE;
586 typedef struct _MINIDUMP_THREAD_CALLBACK
588 ULONG ThreadId;
589 HANDLE ThreadHandle;
590 #if defined(__aarch64__)
591 ULONG Pad;
592 #endif
593 CONTEXT Context;
594 ULONG SizeOfContext;
595 ULONG64 StackBase;
596 ULONG64 StackEnd;
597 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
599 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
601 ULONG ThreadId;
602 HANDLE ThreadHandle;
603 #if defined(__aarch64__)
604 ULONG Pad;
605 #endif
606 CONTEXT Context;
607 ULONG SizeOfContext;
608 ULONG64 StackBase;
609 ULONG64 StackEnd;
610 ULONG64 BackingStoreBase;
611 ULONG64 BackingStoreEnd;
612 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
614 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
616 ULONG ThreadId;
617 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
619 typedef enum _THREAD_WRITE_FLAGS
621 ThreadWriteThread = 0x0001,
622 ThreadWriteStack = 0x0002,
623 ThreadWriteContext = 0x0004,
624 ThreadWriteBackingStore = 0x0008,
625 ThreadWriteInstructionWindow = 0x0010,
626 ThreadWriteThreadData = 0x0020,
627 ThreadWriteThreadInfo = 0x0040
628 } THREAD_WRITE_FLAGS;
630 typedef struct _MINIDUMP_MODULE_CALLBACK
632 PWCHAR FullPath;
633 ULONG64 BaseOfImage;
634 ULONG SizeOfImage;
635 ULONG CheckSum;
636 ULONG TimeDateStamp;
637 VS_FIXEDFILEINFO VersionInfo;
638 PVOID CvRecord;
639 ULONG SizeOfCvRecord;
640 PVOID MiscRecord;
641 ULONG SizeOfMiscRecord;
642 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
644 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
646 ULONG64 BaseOfImage;
647 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
649 typedef enum _MODULE_WRITE_FLAGS
651 ModuleWriteModule = 0x0001,
652 ModuleWriteDataSeg = 0x0002,
653 ModuleWriteMiscRecord = 0x0004,
654 ModuleWriteCvRecord = 0x0008,
655 ModuleReferencedByMemory = 0x0010,
656 ModuleWriteTlsData = 0x0020,
657 ModuleWriteCodeSegs = 0x0040,
658 } MODULE_WRITE_FLAGS;
660 typedef struct _MINIDUMP_CALLBACK_INPUT
662 ULONG ProcessId;
663 HANDLE ProcessHandle;
664 ULONG CallbackType;
665 union
667 MINIDUMP_THREAD_CALLBACK Thread;
668 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
669 MINIDUMP_MODULE_CALLBACK Module;
670 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
671 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
672 } DUMMYUNIONNAME;
673 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
675 typedef struct _MINIDUMP_CALLBACK_OUTPUT
677 union
679 ULONG ModuleWriteFlags;
680 ULONG ThreadWriteFlags;
681 struct
683 ULONG64 MemoryBase;
684 ULONG MemorySize;
685 } DUMMYSTRUCTNAME;
686 } DUMMYUNIONNAME;
687 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
689 typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT, PMINIDUMP_CALLBACK_OUTPUT);
691 typedef struct _MINIDUMP_CALLBACK_INFORMATION
693 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
694 void* CallbackParam;
695 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
697 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
699 ULONG DataSize;
700 RVA Rva;
701 } MINIDUMP_LOCATION_DESCRIPTOR;
703 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64
705 ULONG64 DataSize;
706 RVA64 Rva;
707 } MINIDUMP_LOCATION_DESCRIPTOR64;
709 typedef struct _MINIDUMP_DIRECTORY
711 ULONG StreamType;
712 MINIDUMP_LOCATION_DESCRIPTOR Location;
713 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
715 typedef struct _MINIDUMP_EXCEPTION
717 ULONG ExceptionCode;
718 ULONG ExceptionFlags;
719 ULONG64 ExceptionRecord;
720 ULONG64 ExceptionAddress;
721 ULONG NumberParameters;
722 ULONG __unusedAlignment;
723 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
724 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
726 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
728 DWORD ThreadId;
729 PEXCEPTION_POINTERS ExceptionPointers;
730 BOOL ClientPointers;
731 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
733 typedef struct MINIDUMP_EXCEPTION_STREAM
735 ULONG ThreadId;
736 ULONG __alignment;
737 MINIDUMP_EXCEPTION ExceptionRecord;
738 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
739 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
741 typedef struct _MINIDUMP_HEADER
743 DWORD Signature;
744 DWORD Version;
745 DWORD NumberOfStreams;
746 RVA StreamDirectoryRva;
747 DWORD CheckSum;
748 union
750 DWORD Reserved;
751 DWORD TimeDateStamp;
752 } DUMMYUNIONNAME;
753 ULONG64 Flags;
754 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
756 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
758 ULONG64 StartOfMemoryRange;
759 MINIDUMP_LOCATION_DESCRIPTOR Memory;
760 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
762 typedef struct _MINIDUMP_MEMORY_LIST
764 ULONG NumberOfMemoryRanges;
765 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[1]; /* FIXME: 0-sized array not supported */
766 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST;
768 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR64
770 ULONG64 StartOfMemoryRange;
771 ULONG64 DataSize;
772 } MINIDUMP_MEMORY_DESCRIPTOR64, *PMINIDUMP_MEMORY_DESCRIPTOR64;
774 typedef struct _MINIDUMP_MEMORY64_LIST
776 ULONG64 NumberOfMemoryRanges;
777 RVA64 BaseRva;
778 MINIDUMP_MEMORY_DESCRIPTOR64 MemoryRanges[1]; /* FIXME: 0-sized array not supported */
779 } MINIDUMP_MEMORY64_LIST, *PMINIDUMP_MEMORY64_LIST;
781 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
782 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
784 typedef struct _MINIDUMP_MISC_INFO
786 ULONG SizeOfInfo;
787 ULONG Flags1;
788 ULONG ProcessId;
789 ULONG ProcessCreateTime;
790 ULONG ProcessUserTime;
791 ULONG ProcessKernelTime;
792 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO;
794 typedef struct _MINIDUMP_MODULE
796 ULONG64 BaseOfImage;
797 ULONG SizeOfImage;
798 ULONG CheckSum;
799 ULONG TimeDateStamp;
800 RVA ModuleNameRva;
801 VS_FIXEDFILEINFO VersionInfo;
802 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
803 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
804 ULONG64 Reserved0;
805 ULONG64 Reserved1;
806 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
808 typedef struct _MINIDUMP_MODULE_LIST
810 ULONG NumberOfModules;
811 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */
812 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
814 typedef struct _MINIDUMP_STRING
816 ULONG Length;
817 WCHAR Buffer[1]; /* FIXME: O-sized array not supported */
818 } MINIDUMP_STRING, *PMINIDUMP_STRING;
820 typedef struct _MINIDUMP_SYSTEM_INFO
822 USHORT ProcessorArchitecture;
823 USHORT ProcessorLevel;
824 USHORT ProcessorRevision;
825 union
827 USHORT Reserved0;
828 struct
830 UCHAR NumberOfProcessors;
831 UCHAR ProductType;
832 } DUMMYSTRUCTNAME;
833 } DUMMYUNIONNAME;
835 ULONG MajorVersion;
836 ULONG MinorVersion;
837 ULONG BuildNumber;
838 ULONG PlatformId;
840 RVA CSDVersionRva;
841 union
843 ULONG Reserved1;
844 struct
846 USHORT SuiteMask;
847 USHORT Reserved2;
848 } DUMMYSTRUCTNAME;
849 } DUMMYUNIONNAME1;
850 union _CPU_INFORMATION
852 struct
854 ULONG VendorId[3];
855 ULONG VersionInformation;
856 ULONG FeatureInformation;
857 ULONG AMDExtendedCpuFeatures;
858 } X86CpuInfo;
859 struct
861 ULONG64 ProcessorFeatures[2];
862 } OtherCpuInfo;
863 } Cpu;
865 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
867 typedef struct _MINIDUMP_THREAD
869 ULONG ThreadId;
870 ULONG SuspendCount;
871 ULONG PriorityClass;
872 ULONG Priority;
873 ULONG64 Teb;
874 MINIDUMP_MEMORY_DESCRIPTOR Stack;
875 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
876 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
878 typedef struct _MINIDUMP_THREAD_LIST
880 ULONG NumberOfThreads;
881 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */
882 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
884 typedef struct _MINIDUMP_USER_STREAM
886 ULONG Type;
887 ULONG BufferSize;
888 void* Buffer;
889 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
891 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
893 ULONG UserStreamCount;
894 PMINIDUMP_USER_STREAM UserStreamArray;
895 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
897 typedef enum _MINIDUMP_STREAM_TYPE
899 UnusedStream = 0,
900 ReservedStream0 = 1,
901 ReservedStream1 = 2,
902 ThreadListStream = 3,
903 ModuleListStream = 4,
904 MemoryListStream = 5,
905 ExceptionStream = 6,
906 SystemInfoStream = 7,
907 ThreadExListStream = 8,
908 Memory64ListStream = 9,
909 CommentStreamA = 10,
910 CommentStreamW = 11,
911 HandleDataStream = 12,
912 FunctionTableStream = 13,
913 UnloadedModuleListStream = 14,
914 MiscInfoStream = 15,
915 MemoryInfoListStream = 16,
916 ThreadInfoListStream = 17,
918 LastReservedStream = 0xffff
919 } MINIDUMP_STREAM_TYPE;
921 BOOL WINAPI MiniDumpWriteDump(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE,
922 const PMINIDUMP_EXCEPTION_INFORMATION,
923 const PMINIDUMP_USER_STREAM_INFORMATION,
924 const PMINIDUMP_CALLBACK_INFORMATION);
925 BOOL WINAPI MiniDumpReadDumpStream(PVOID, ULONG, PMINIDUMP_DIRECTORY*, PVOID*,
926 ULONG*);
928 #include <poppack.h>
930 /*************************
931 * MODULE handling *
932 *************************/
934 /* flags for SymLoadModuleEx */
935 #define SLMFLAG_VIRTUAL 0x1
936 #define SLMFLAG_NO_SYMBOLS 0x4
938 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
939 BOOL WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
940 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)(PCWSTR, DWORD64, ULONG, PVOID);
941 BOOL WINAPI EnumerateLoadedModulesW64(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
942 BOOL WINAPI EnumerateLoadedModulesEx(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
943 BOOL WINAPI EnumerateLoadedModulesExW(HANDLE, PENUMLOADED_MODULES_CALLBACKW64, PVOID);
944 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PCSTR, DWORD64, PVOID);
945 BOOL WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
946 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)(PCWSTR, DWORD64, PVOID);
947 BOOL WINAPI SymEnumerateModulesW64(HANDLE, PSYM_ENUMMODULES_CALLBACKW64, PVOID);
948 BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
949 BOOL WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
950 DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64);
951 DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
952 DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
953 PMODLOAD_DATA, DWORD);
954 DWORD64 WINAPI SymLoadModuleExW(HANDLE, HANDLE, PCWSTR, PCWSTR, DWORD64, DWORD,
955 PMODLOAD_DATA, DWORD);
956 BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64);
958 /*************************
959 * Symbol Handling *
960 *************************/
962 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
963 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
964 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
965 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
966 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
967 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
968 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
969 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
971 #define SYMFLAG_VALUEPRESENT 0x00000001
972 #define SYMFLAG_REGISTER 0x00000008
973 #define SYMFLAG_REGREL 0x00000010
974 #define SYMFLAG_FRAMEREL 0x00000020
975 #define SYMFLAG_PARAMETER 0x00000040
976 #define SYMFLAG_LOCAL 0x00000080
977 #define SYMFLAG_CONSTANT 0x00000100
978 #define SYMFLAG_EXPORT 0x00000200
979 #define SYMFLAG_FORWARDER 0x00000400
980 #define SYMFLAG_FUNCTION 0x00000800
981 #define SYMFLAG_VIRTUAL 0x00001000
982 #define SYMFLAG_THUNK 0x00002000
983 #define SYMFLAG_TLSREL 0x00004000
984 #define SYMFLAG_SLOT 0x00008000
985 #define SYMFLAG_ILREL 0x00010000
986 #define SYMFLAG_METADATA 0x00020000
987 #define SYMFLAG_CLR_TOKEN 0x00040000
988 #define SYMFLAG_NULL 0x00080000
989 #define SYMFLAG_FUNC_NO_RETURN 0x00100000
990 #define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000
991 #define SYMFLAG_PUBLIC_CODE 0x00400000
993 #define MAX_SYM_NAME 2000
995 typedef struct _SYMBOL_INFO
997 ULONG SizeOfStruct;
998 ULONG TypeIndex;
999 ULONG64 Reserved[2];
1000 ULONG Index;
1001 ULONG Size;
1002 ULONG64 ModBase;
1003 ULONG Flags;
1004 ULONG64 Value;
1005 ULONG64 Address;
1006 ULONG Register;
1007 ULONG Scope;
1008 ULONG Tag;
1009 ULONG NameLen;
1010 ULONG MaxNameLen;
1011 CHAR Name[1];
1012 } SYMBOL_INFO, *PSYMBOL_INFO;
1014 typedef struct _SYMBOL_INFOW
1016 ULONG SizeOfStruct;
1017 ULONG TypeIndex;
1018 ULONG64 Reserved[2];
1019 ULONG Index;
1020 ULONG Size;
1021 ULONG64 ModBase;
1022 ULONG Flags;
1023 ULONG64 Value;
1024 ULONG64 Address;
1025 ULONG Register;
1026 ULONG Scope;
1027 ULONG Tag;
1028 ULONG NameLen;
1029 ULONG MaxNameLen;
1030 WCHAR Name[1];
1031 } SYMBOL_INFOW, *PSYMBOL_INFOW;
1033 typedef struct _SYMBOL_INFO_PACKAGE
1035 SYMBOL_INFO si;
1036 CHAR name[MAX_SYM_NAME+1];
1037 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE;
1039 typedef struct _SYMBOL_INFO_PACKAGEW
1041 SYMBOL_INFOW si;
1042 WCHAR name[MAX_SYM_NAME+1];
1043 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW;
1045 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
1047 TI_GET_SYMTAG,
1048 TI_GET_SYMNAME,
1049 TI_GET_LENGTH,
1050 TI_GET_TYPE,
1051 TI_GET_TYPEID,
1052 TI_GET_BASETYPE,
1053 TI_GET_ARRAYINDEXTYPEID,
1054 TI_FINDCHILDREN,
1055 TI_GET_DATAKIND,
1056 TI_GET_ADDRESSOFFSET,
1057 TI_GET_OFFSET,
1058 TI_GET_VALUE,
1059 TI_GET_COUNT,
1060 TI_GET_CHILDRENCOUNT,
1061 TI_GET_BITPOSITION,
1062 TI_GET_VIRTUALBASECLASS,
1063 TI_GET_VIRTUALTABLESHAPEID,
1064 TI_GET_VIRTUALBASEPOINTEROFFSET,
1065 TI_GET_CLASSPARENTID,
1066 TI_GET_NESTED,
1067 TI_GET_SYMINDEX,
1068 TI_GET_LEXICALPARENT,
1069 TI_GET_ADDRESS,
1070 TI_GET_THISADJUST,
1071 TI_GET_UDTKIND,
1072 TI_IS_EQUIV_TO,
1073 TI_GET_CALLING_CONVENTION,
1074 } IMAGEHLP_SYMBOL_TYPE_INFO;
1076 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001
1077 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002
1078 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS
1080 ULONG SizeOfStruct;
1081 ULONG Flags;
1082 ULONG NumIds;
1083 PULONG TypeIds;
1084 ULONG64 TagFilter;
1085 ULONG NumReqs;
1086 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds;
1087 PULONG_PTR ReqOffsets;
1088 PULONG ReqSizes;
1089 ULONG_PTR ReqStride;
1090 ULONG_PTR BufferSize;
1091 PVOID Buffer;
1092 ULONG EntriesMatched;
1093 ULONG EntriesFilled;
1094 ULONG64 TagsFound;
1095 ULONG64 AllReqsValid;
1096 ULONG NumReqsValid;
1097 PULONG64 ReqsValid;
1098 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS;
1100 typedef struct _TI_FINDCHILDREN_PARAMS
1102 ULONG Count;
1103 ULONG Start;
1104 ULONG ChildId[1];
1105 } TI_FINDCHILDREN_PARAMS;
1107 #define UNDNAME_COMPLETE (0x0000)
1108 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
1109 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
1110 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
1111 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
1112 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
1113 #define UNDNAME_NO_MS_THISTYPE (0x0020)
1114 #define UNDNAME_NO_CV_THISTYPE (0x0040)
1115 #define UNDNAME_NO_THISTYPE (0x0060)
1116 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
1117 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
1118 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
1119 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
1120 #define UNDNAME_32_BIT_DECODE (0x0800)
1121 #define UNDNAME_NAME_ONLY (0x1000)
1122 #define UNDNAME_NO_ARGUMENTS (0x2000)
1123 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
1125 #define SYMSEARCH_MASKOBJS 0x01
1126 #define SYMSEARCH_RECURSE 0x02
1127 #define SYMSEARCH_GLOBALSONLY 0x04
1129 BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
1130 BOOL WINAPI SymGetTypeInfoEx(HANDLE, DWORD64, PIMAGEHLP_GET_TYPE_INFO_PARAMS);
1131 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID);
1132 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)(PSYMBOL_INFOW, ULONG, PVOID);
1133 BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
1134 BOOL WINAPI SymEnumTypesW(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
1135 BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
1136 BOOL WINAPI SymFromAddrW(HANDLE, DWORD64, DWORD64*, SYMBOL_INFOW*);
1137 BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO);
1138 BOOL WINAPI SymFromTokenW(HANDLE, DWORD64, DWORD, PSYMBOL_INFOW);
1139 BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
1140 BOOL WINAPI SymFromNameW(HANDLE, PCWSTR, PSYMBOL_INFOW);
1141 BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
1142 BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
1143 BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
1144 BOOL WINAPI SymGetTypeFromNameW(HANDLE, ULONG64, PCWSTR, PSYMBOL_INFOW);
1145 BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
1146 BOOL WINAPI SymGetSymNextW64(HANDLE, PIMAGEHLP_SYMBOLW64);
1147 BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
1148 BOOL WINAPI SymGetSymPrevW64(HANDLE, PIMAGEHLP_SYMBOLW64);
1149 BOOL WINAPI SymEnumSym(HANDLE,ULONG64,PSYM_ENUMERATESYMBOLS_CALLBACK,PVOID);
1150 BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK,
1151 PVOID);
1152 BOOL WINAPI SymEnumSymbolsW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMERATESYMBOLS_CALLBACKW,
1153 PVOID);
1154 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PCSTR, DWORD64, ULONG, PVOID);
1155 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)(PCWSTR, DWORD64, ULONG, PVOID);
1156 BOOL WINAPI SymEnumerateSymbols64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID);
1157 BOOL WINAPI SymEnumerateSymbolsW64(HANDLE, ULONG64, PSYM_ENUMSYMBOLS_CALLBACK64W, PVOID);
1158 BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
1159 BOOL WINAPI SymEnumSymbolsForAddrW(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID);
1160 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64);
1161 BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
1162 BOOL WINAPI SymRegisterCallbackW64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
1163 BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
1164 BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
1165 BOOL WINAPI SymMatchStringA(PCSTR, PCSTR, BOOL);
1166 BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
1167 BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
1168 BOOL WINAPI SymSearchW(HANDLE, ULONG64, DWORD, DWORD, PCWSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACKW, PVOID, DWORD);
1169 DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
1170 DWORD WINAPI UnDecorateSymbolNameW(PCWSTR, PWSTR, DWORD, DWORD);
1171 BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
1172 BOOL WINAPI SymGetScopeW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
1173 BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
1174 BOOL WINAPI SymFromIndexW(HANDLE, ULONG64, DWORD, PSYMBOL_INFOW);
1175 BOOL WINAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD);
1176 BOOL WINAPI SymAddSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD, DWORD);
1177 BOOL WINAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD);
1178 BOOL WINAPI SymDeleteSymbolW(HANDLE, ULONG64, PCWSTR, DWORD64, DWORD);
1180 /*************************
1181 * Source Files *
1182 *************************/
1183 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID);
1184 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)(PSOURCEFILEW, PVOID);
1186 BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALLBACK,
1187 PVOID);
1188 BOOL WINAPI SymEnumSourceFilesW(HANDLE, ULONG64, PCWSTR, PSYM_ENUMSOURCEFILES_CALLBACKW, PVOID);
1189 BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
1190 BOOL WINAPI SymGetLineFromAddrW64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINEW64);
1191 BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
1192 BOOL WINAPI SymGetLinePrevW64(HANDLE, PIMAGEHLP_LINEW64);
1193 BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
1194 BOOL WINAPI SymGetLineNextW64(HANDLE, PIMAGEHLP_LINEW64);
1195 BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
1196 BOOL WINAPI SymGetLineFromNameW64(HANDLE, PCWSTR, PCWSTR, DWORD, PLONG, PIMAGEHLP_LINEW64);
1197 ULONG WINAPI SymGetFileLineOffsets64(HANDLE, PCSTR, PCSTR, PDWORD64, ULONG);
1198 BOOL WINAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD);
1199 BOOL WINAPI SymGetSourceFileW(HANDLE, ULONG64, PCWSTR, PCWSTR, PWSTR, DWORD);
1200 BOOL WINAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*);
1201 BOOL WINAPI SymGetSourceFileTokenW(HANDLE, ULONG64, PCWSTR, PVOID*, DWORD*);
1202 BOOL WINAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD);
1203 BOOL WINAPI SymGetSourceFileFromTokenW(HANDLE, PVOID, PCWSTR, PWSTR, DWORD);
1204 BOOL WINAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD);
1205 BOOL WINAPI SymGetSourceVarFromTokenW(HANDLE, PVOID, PCWSTR, PCWSTR, PWSTR, DWORD);
1207 typedef struct _SRCCODEINFO
1209 DWORD SizeOfStruct;
1210 PVOID Key;
1211 DWORD64 ModBase;
1212 CHAR Obj[MAX_PATH+1];
1213 CHAR FileName[MAX_PATH+1];
1214 DWORD LineNumber;
1215 DWORD64 Address;
1216 } SRCCODEINFO, *PSRCCODEINFO;
1218 typedef struct _SRCCODEINFOW
1220 DWORD SizeOfStruct;
1221 PVOID Key;
1222 DWORD64 ModBase;
1223 WCHAR Obj[MAX_PATH+1];
1224 WCHAR FileName[MAX_PATH+1];
1225 DWORD LineNumber;
1226 DWORD64 Address;
1227 } SRCCODEINFOW, *PSRCCODEINFOW;
1229 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO, PVOID);
1230 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACKW)(PSRCCODEINFOW, PVOID);
1231 BOOL WINAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID);
1232 BOOL WINAPI SymEnumLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, PSYM_ENUMLINES_CALLBACKW, PVOID);
1233 BOOL WINAPI SymEnumSourceLines(HANDLE, ULONG64, PCSTR, PCSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACK, PVOID);
1234 BOOL WINAPI SymEnumSourceLinesW(HANDLE, ULONG64, PCWSTR, PCWSTR, DWORD, DWORD, PSYM_ENUMLINES_CALLBACKW, PVOID);
1236 /*************************
1237 * File & image handling *
1238 *************************/
1239 BOOL WINAPI SymInitialize(HANDLE, PCSTR, BOOL);
1240 BOOL WINAPI SymInitializeW(HANDLE, PCWSTR, BOOL);
1241 BOOL WINAPI SymCleanup(HANDLE);
1243 HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR);
1244 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
1245 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
1246 HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
1247 HANDLE WINAPI FindDebugInfoFileExW(PCWSTR, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID);
1248 HANDLE WINAPI SymFindDebugInfoFile(HANDLE, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
1249 HANDLE WINAPI SymFindDebugInfoFileW(HANDLE, PCWSTR, PWSTR, PFIND_DEBUG_FILE_CALLBACKW, PVOID);
1250 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PCSTR, PVOID);
1251 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACKW)(PCWSTR, PVOID);
1252 BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1253 PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1254 BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
1255 PSTR, PFINDFILEINPATHCALLBACK, PVOID);
1256 BOOL WINAPI SymFindFileInPathW(HANDLE, PCWSTR, PCWSTR, PVOID, DWORD, DWORD, DWORD,
1257 PWSTR, PFINDFILEINPATHCALLBACKW, PVOID);
1258 HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
1259 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PCSTR, PVOID);
1260 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACKW)(HANDLE, PCWSTR, PVOID);
1261 HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
1262 HANDLE WINAPI FindExecutableImageExW(PCWSTR, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
1263 HANDLE WINAPI SymFindExecutableImage(HANDLE, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
1264 HANDLE WINAPI SymFindExecutableImageW(HANDLE, PCWSTR, PWSTR, PFIND_EXE_FILE_CALLBACKW, PVOID);
1265 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
1266 PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
1267 PIMAGE_SECTION_HEADER *);
1268 PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG);
1269 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG);
1270 PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*);
1271 BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD);
1272 BOOL WINAPI SymGetSearchPathW(HANDLE, PWSTR, DWORD);
1273 BOOL WINAPI SymSetSearchPath(HANDLE, PCSTR);
1274 BOOL WINAPI SymSetSearchPathW(HANDLE, PCWSTR);
1275 DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE);
1276 BOOL WINAPI MakeSureDirectoryPathExists(PCSTR);
1277 BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR);
1278 BOOL WINAPI SearchTreeForFileW(PCWSTR, PCWSTR, PWSTR);
1279 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(PCSTR, PVOID);
1280 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACKW)(PCWSTR, PVOID);
1281 BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, PVOID);
1282 BOOL WINAPI EnumDirTreeW(HANDLE, PCWSTR, PCWSTR, PWSTR, PENUMDIRTREE_CALLBACKW, PVOID);
1283 BOOL WINAPI SymMatchFileName(PCSTR, PCSTR, PSTR*, PSTR*);
1284 BOOL WINAPI SymMatchFileNameW(PCWSTR, PCWSTR, PWSTR*, PWSTR*);
1285 PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR);
1286 PWSTR WINAPI SymSetHomeDirectoryW(HANDLE, PCWSTR);
1287 PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
1288 PWSTR WINAPI SymGetHomeDirectoryW(DWORD, PWSTR, size_t);
1289 #define hdBase 0
1290 #define hdSym 1
1291 #define hdSrc 2
1292 #define hdMax 3
1294 /*************************
1295 * Context management *
1296 *************************/
1297 BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT);
1300 /*************************
1301 * Stack management *
1302 *************************/
1304 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1305 #define KDHELP KDHELP64
1306 #define PKDHELP PKDHELP64
1307 #else
1308 typedef struct _KDHELP
1310 DWORD Thread;
1311 DWORD ThCallbackStack;
1312 DWORD NextCallback;
1313 DWORD FramePointer;
1314 DWORD KiCallUserMode;
1315 DWORD KeUserCallbackDispatcher;
1316 DWORD SystemRangeStart;
1317 } KDHELP, *PKDHELP;
1318 #endif
1320 typedef struct _KDHELP64
1322 DWORD64 Thread;
1323 DWORD ThCallbackStack;
1324 DWORD ThCallbackBStore;
1325 DWORD NextCallback;
1326 DWORD FramePointer;
1327 DWORD64 KiCallUserMode;
1328 DWORD64 KeUserCallbackDispatcher;
1329 DWORD64 SystemRangeStart;
1330 DWORD64 Reserved[8];
1331 } KDHELP64, *PKDHELP64;
1333 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1334 #define STACKFRAME STACKFRAME64
1335 #define LPSTACKFRAME LPSTACKFRAME64
1336 #else
1337 typedef struct _STACKFRAME
1339 ADDRESS AddrPC;
1340 ADDRESS AddrReturn;
1341 ADDRESS AddrFrame;
1342 ADDRESS AddrStack;
1343 PVOID FuncTableEntry;
1344 DWORD Params[4];
1345 BOOL Far;
1346 BOOL Virtual;
1347 DWORD Reserved[3];
1348 KDHELP KdHelp;
1349 ADDRESS AddrBStore;
1350 } STACKFRAME, *LPSTACKFRAME;
1351 #endif
1353 typedef struct _STACKFRAME64
1355 ADDRESS64 AddrPC;
1356 ADDRESS64 AddrReturn;
1357 ADDRESS64 AddrFrame;
1358 ADDRESS64 AddrStack;
1359 ADDRESS64 AddrBStore;
1360 PVOID FuncTableEntry;
1361 DWORD64 Params[4];
1362 BOOL Far;
1363 BOOL Virtual;
1364 DWORD64 Reserved[3];
1365 KDHELP64 KdHelp;
1366 } STACKFRAME64, *LPSTACKFRAME64;
1368 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)
1369 (HANDLE, DWORD64, PVOID, DWORD, PDWORD);
1370 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE, DWORD64);
1371 typedef DWORD64 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(HANDLE, DWORD64);
1372 typedef DWORD64 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE, HANDLE, LPADDRESS64);
1373 BOOL WINAPI StackWalk64(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID,
1374 PREAD_PROCESS_MEMORY_ROUTINE64,
1375 PFUNCTION_TABLE_ACCESS_ROUTINE64,
1376 PGET_MODULE_BASE_ROUTINE64,
1377 PTRANSLATE_ADDRESS_ROUTINE64);
1379 PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64);
1381 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64);
1383 BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64);
1385 /*************************
1386 * Version, global stuff *
1387 *************************/
1389 #define API_VERSION_NUMBER 9
1391 typedef struct API_VERSION
1393 USHORT MajorVersion;
1394 USHORT MinorVersion;
1395 USHORT Revision;
1396 USHORT Reserved;
1397 } API_VERSION, *LPAPI_VERSION;
1399 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
1400 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION);
1402 typedef struct _IMAGE_DEBUG_INFORMATION
1404 LIST_ENTRY List;
1405 DWORD ReservedSize;
1406 PVOID ReservedMappedBase;
1407 USHORT ReservedMachine;
1408 USHORT ReservedCharacteristics;
1409 DWORD ReservedCheckSum;
1410 DWORD ImageBase;
1411 DWORD SizeOfImage;
1412 DWORD ReservedNumberOfSections;
1413 PIMAGE_SECTION_HEADER ReservedSections;
1414 DWORD ReservedExportedNamesSize;
1415 PSTR ReservedExportedNames;
1416 DWORD ReservedNumberOfFunctionTableEntries;
1417 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
1418 DWORD ReservedLowestFunctionStartingAddress;
1419 DWORD ReservedHighestFunctionEndingAddress;
1420 DWORD ReservedNumberOfFpoTableEntries;
1421 PFPO_DATA ReservedFpoTableEntries;
1422 DWORD SizeOfCoffSymbols;
1423 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
1424 DWORD ReservedSizeOfCodeViewSymbols;
1425 PVOID ReservedCodeViewSymbols;
1426 PSTR ImageFilePath;
1427 PSTR ImageFileName;
1428 PSTR ReservedDebugFilePath;
1429 DWORD ReservedTimeDateStamp;
1430 BOOL ReservedRomImage;
1431 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
1432 DWORD ReservedNumberOfDebugDirectories;
1433 DWORD ReservedOriginalFunctionTableBaseAddress;
1434 DWORD Reserved[ 2 ];
1435 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
1437 typedef enum
1439 SYMOPT_EX_DISABLEACCESSTIMEUPDATE,
1440 SYMOPT_EX_MAX,
1442 #ifdef __WINESRC__
1443 SYMOPT_EX_WINE_NATIVE_MODULES = 1000,
1444 #endif
1445 } IMAGEHLP_EXTENDED_OPTIONS;
1447 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PCSTR, PCSTR, ULONG);
1449 BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
1451 DWORD WINAPI SymGetOptions(void);
1452 DWORD WINAPI SymSetOptions(DWORD);
1454 BOOL WINAPI SymGetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option);
1455 BOOL WINAPI SymSetExtendedOption(IMAGEHLP_EXTENDED_OPTIONS option, BOOL value);
1457 BOOL WINAPI SymSetParentWindow(HWND);
1459 /*************************
1460 * Version, global stuff *
1461 *************************/
1463 typedef BOOL (WINAPI* PSYMBOLSERVERPROC)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
1464 typedef BOOL (WINAPI* PSYMBOLSERVERPROCA)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR);
1465 typedef BOOL (WINAPI* PSYMBOLSERVERPROCW)(PCWSTR, PCWSTR, PVOID, DWORD, DWORD, PWSTR);
1466 typedef BOOL (WINAPI* PSYMBOLSERVEROPENPROC)(void);
1467 typedef BOOL (WINAPI* PSYMBOLSERVERCLOSEPROC)(void);
1468 typedef BOOL (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64);
1469 typedef BOOL (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64);
1470 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void);
1471 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROC)(PCSTR);
1472 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCA)(PCSTR);
1473 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCW)(PCWSTR);
1475 #define SSRVOPT_CALLBACK 0x0001
1476 #define SSRVOPT_DWORD 0x0002
1477 #define SSRVOPT_DWORDPTR 0x0004
1478 #define SSRVOPT_GUIDPTR 0x0008
1479 #define SSRVOPT_OLDGUIDPTR 0x0010
1480 #define SSRVOPT_UNATTENDED 0x0020
1481 #define SSRVOPT_NOCOPY 0x0040
1482 #define SSRVOPT_PARENTWIN 0x0080
1483 #define SSRVOPT_PARAMTYPE 0x0100
1484 #define SSRVOPT_SECURE 0x0200
1485 #define SSRVOPT_TRACE 0x0400
1486 #define SSRVOPT_SETCONTEXT 0x0800
1487 #define SSRVOPT_PROXY 0x1000
1488 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1489 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1491 #define SSRVACTION_TRACE 1
1492 #define SSRVACTION_QUERYCANCEL 2
1493 #define SSRVACTION_EVENT 3
1495 /* 32-bit functions */
1497 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64)
1499 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64
1500 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64
1501 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64
1502 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64
1503 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64
1504 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64
1505 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64
1506 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64
1507 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64
1508 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64
1510 #define EnumerateLoadedModules EnumerateLoadedModules64
1511 #define StackWalk StackWalk64
1512 #define SymEnumerateModules SymEnumerateModules64
1513 #define SymEnumerateSymbols SymEnumerateSymbols64
1514 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64
1515 #define SymFunctionTableAccess SymFunctionTableAccess64
1516 #define SymGetLineFromAddr SymGetLineFromAddr64
1517 #define SymGetLineFromAddrW SymGetLineFromAddrW64
1518 #define SymGetLineFromName SymGetLineFromName64
1519 #define SymGetLineNext SymGetLineNext64
1520 #define SymGetLineNextW SymGetLineNextW64
1521 #define SymGetLinePrev SymGetLinePrev64
1522 #define SymGetLinePrevW SymGetLinePrevW64
1523 #define SymGetModuleBase SymGetModuleBase64
1524 #define SymGetModuleInfo SymGetModuleInfo64
1525 #define SymGetModuleInfoW SymGetModuleInfoW64
1526 #define SymGetSymFromAddr SymGetSymFromAddr64
1527 #define SymGetSymFromName SymGetSymFromName64
1528 #define SymGetSymNext SymGetSymNext64
1529 #define SymGetSymNextW SymGetSymNextW64
1530 #define SymGetSymPrev SymGetSymPrev64
1531 #define SymGetSymPrevW SymGetSymPrevW64
1532 #define SymLoadModule SymLoadModule64
1533 #define SymRegisterCallback SymRegisterCallback64
1534 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64
1535 #define SymUnDName SymUnDName64
1536 #define SymUnloadModule SymUnloadModule64
1538 #else
1540 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
1541 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
1542 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
1543 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)(HANDLE, DWORD, PVOID, DWORD, PDWORD);
1544 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PCSTR, ULONG, PVOID);
1545 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PCSTR, ULONG, ULONG, PVOID);
1546 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)(PCWSTR, ULONG, ULONG, PVOID);
1547 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
1548 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
1549 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
1551 BOOL WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
1552 BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID, PREAD_PROCESS_MEMORY_ROUTINE, PFUNCTION_TABLE_ACCESS_ROUTINE, PGET_MODULE_BASE_ROUTINE, PTRANSLATE_ADDRESS_ROUTINE);
1553 BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
1554 BOOL WINAPI SymEnumerateSymbols(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
1555 BOOL WINAPI SymEnumerateSymbolsW(HANDLE, ULONG, PSYM_ENUMSYMBOLS_CALLBACKW, PVOID);
1556 PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
1557 BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
1558 BOOL WINAPI SymGetLineFromAddrW(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINEW);
1559 BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
1560 BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
1561 BOOL WINAPI SymGetLineNextW(HANDLE, PIMAGEHLP_LINEW);
1562 BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
1563 BOOL WINAPI SymGetLinePrevW(HANDLE, PIMAGEHLP_LINEW);
1564 DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
1565 BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
1566 BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
1567 BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
1568 BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
1569 BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
1570 BOOL WINAPI SymGetSymNextW(HANDLE, PIMAGEHLP_SYMBOLW);
1571 BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
1572 BOOL WINAPI SymGetSymPrevW(HANDLE, PIMAGEHLP_SYMBOLW);
1573 DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
1574 BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
1575 BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
1576 BOOL WINAPI SymRefreshModuleList(HANDLE);
1577 BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
1578 BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
1580 #endif
1582 #ifdef __cplusplus
1583 } /* extern "C" */
1584 #endif /* defined(__cplusplus) */
1586 #endif /* __WINE_DBGHELP_H */