server: Avoid hang on process startup.
[wine/multimedia.git] / include / dbghelp.h
blob09ce14f5a4260c47a9218fe98aba684c1431ddd9
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 #ifndef __WINE_DBGHELP_H
22 #define __WINE_DBGHELP_H
24 #ifdef __cplusplus
25 extern "C" {
26 #endif /* defined(__cplusplus) */
28 typedef struct _LOADED_IMAGE
30 LPSTR ModuleName;
31 HANDLE hFile;
32 PUCHAR MappedAddress;
33 PIMAGE_NT_HEADERS FileHeader;
34 PIMAGE_SECTION_HEADER LastRvaSection;
35 ULONG NumberOfSections;
36 PIMAGE_SECTION_HEADER Sections;
37 ULONG Characteristics;
38 BOOLEAN fSystemImage;
39 BOOLEAN fDOSImage;
40 LIST_ENTRY Links;
41 ULONG SizeOfImage;
42 } LOADED_IMAGE, *PLOADED_IMAGE;
44 /*************************
45 * IMAGEHLP equiv *
46 *************************/
48 typedef enum
50 AddrMode1616,
51 AddrMode1632,
52 AddrModeReal,
53 AddrModeFlat
54 } ADDRESS_MODE;
56 typedef struct _tagADDRESS
58 DWORD Offset;
59 WORD Segment;
60 ADDRESS_MODE Mode;
61 } ADDRESS, *LPADDRESS;
63 typedef struct _tagADDRESS64
65 DWORD64 Offset;
66 WORD Segment;
67 ADDRESS_MODE Mode;
68 } ADDRESS64, *LPADDRESS64;
70 #define SYMF_OMAP_GENERATED 0x00000001
71 #define SYMF_OMAP_MODIFIED 0x00000002
72 #define SYMF_USER_GENERATED 0x00000004
73 #define SYMF_REGISTER 0x00000008
74 #define SYMF_REGREL 0x00000010
75 #define SYMF_FRAMEREL 0x00000020
76 #define SYMF_PARAMETER 0x00000040
77 #define SYMF_LOCAL 0x00000080
78 #define SYMF_CONSTANT 0x00000100
79 #define SYMF_EXPORT 0x00000200
80 #define SYMF_FORWARDER 0x00000400
81 #define SYMF_FUNCTION 0x00000800
82 #define SYMF_VIRTUAL 0x00001000
83 #define SYMF_THUNK 0x00002000
84 #define SYMF_TLSREL 0x00004000
86 typedef enum
88 SymNone = 0,
89 SymCoff,
90 SymCv,
91 SymPdb,
92 SymExport,
93 SymDeferred,
94 SymSym,
95 SymDia,
96 SymVirtual,
97 NumSymTypes
98 } SYM_TYPE;
100 typedef struct _IMAGEHLP_SYMBOL
102 DWORD SizeOfStruct;
103 DWORD Address;
104 DWORD Size;
105 DWORD Flags;
106 DWORD MaxNameLength;
107 CHAR Name[1];
108 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL;
110 typedef struct _IMAGEHLP_SYMBOL64
112 DWORD SizeOfStruct;
113 DWORD64 Address;
114 DWORD Size;
115 DWORD Flags;
116 DWORD MaxNameLength;
117 CHAR Name[1];
118 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64;
120 typedef struct _IMAGEHLP_MODULE
122 DWORD SizeOfStruct;
123 DWORD BaseOfImage;
124 DWORD ImageSize;
125 DWORD TimeDateStamp;
126 DWORD CheckSum;
127 DWORD NumSyms;
128 SYM_TYPE SymType;
129 CHAR ModuleName[32];
130 CHAR ImageName[256];
131 CHAR LoadedImageName[256];
132 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE;
134 typedef struct _IMAGEHLP_MODULEW
136 DWORD SizeOfStruct;
137 DWORD BaseOfImage;
138 DWORD ImageSize;
139 DWORD TimeDateStamp;
140 DWORD CheckSum;
141 DWORD NumSyms;
142 SYM_TYPE SymType;
143 WCHAR ModuleName[32];
144 WCHAR ImageName[256];
145 WCHAR LoadedImageName[256];
146 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW;
148 typedef struct _IMAGEHLP_MODULE64
150 DWORD SizeOfStruct;
151 DWORD64 BaseOfImage;
152 DWORD ImageSize;
153 DWORD TimeDateStamp;
154 DWORD CheckSum;
155 DWORD NumSyms;
156 SYM_TYPE SymType;
157 CHAR ModuleName[32];
158 CHAR ImageName[256];
159 CHAR LoadedImageName[256];
160 CHAR LoadedPdbName[256];
161 DWORD CVSig;
162 CHAR CVData[MAX_PATH*3];
163 DWORD PdbSig;
164 GUID PdbSig70;
165 DWORD PdbAge;
166 BOOL PdbUnmatched;
167 BOOL DbgUnmatched;
168 BOOL LineNumbers;
169 BOOL GlobalSymbols;
170 BOOL TypeInfo;
171 BOOL SourceIndexed;
172 BOOL Publics;
173 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64;
175 typedef struct _IMAGEHLP_MODULE64W
177 DWORD SizeOfStruct;
178 DWORD64 BaseOfImage;
179 DWORD ImageSize;
180 DWORD TimeDateStamp;
181 DWORD CheckSum;
182 DWORD NumSyms;
183 SYM_TYPE SymType;
184 WCHAR ModuleName[32];
185 WCHAR ImageName[256];
186 WCHAR LoadedImageName[256];
187 WCHAR LoadedPdbName[256];
188 DWORD CVSig;
189 WCHAR CVData[MAX_PATH*3];
190 DWORD PdbSig;
191 GUID PdbSig70;
192 DWORD PdbAge;
193 BOOL PdbUnmatched;
194 BOOL DbgUnmatched;
195 BOOL LineNumbers;
196 BOOL GlobalSymbols;
197 BOOL TypeInfo;
198 BOOL SourceIndexed;
199 BOOL Publics;
200 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64;
202 typedef struct _IMAGEHLP_LINE
204 DWORD SizeOfStruct;
205 PVOID Key;
206 DWORD LineNumber;
207 PCHAR FileName;
208 DWORD Address;
209 } IMAGEHLP_LINE, *PIMAGEHLP_LINE;
211 typedef struct _IMAGEHLP_LINE64
213 DWORD SizeOfStruct;
214 PVOID Key;
215 DWORD LineNumber;
216 PCHAR FileName;
217 DWORD64 Address;
218 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64;
220 typedef struct _SOURCEFILE
222 DWORD64 ModBase;
223 PCHAR FileName;
224 } SOURCEFILE, *PSOURCEFILE;
226 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001
227 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002
228 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003
229 #define CBA_SYMBOLS_UNLOADED 0x00000004
230 #define CBA_DUPLICATE_SYMBOL 0x00000005
231 #define CBA_READ_MEMORY 0x00000006
232 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007
233 #define CBA_SET_OPTIONS 0x00000008
234 #define CBA_EVENT 0x00000010
235 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020
236 #define CBA_DEBUG_INFO 0x10000000
238 typedef struct _IMAGEHLP_CBA_READ_MEMORY
240 DWORD64 addr;
241 PVOID buf;
242 DWORD bytes;
243 DWORD *bytesread;
244 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY;
246 enum
248 sevInfo = 0,
249 sevProblem,
250 sevAttn,
251 sevFatal,
252 sevMax
255 #define EVENT_SRCSPEW_START 100
256 #define EVENT_SRCSPEW 100
257 #define EVENT_SRCSPEW_END 199
259 typedef struct _IMAGEHLP_CBA_EVENT
261 DWORD severity;
262 DWORD code;
263 PCHAR desc;
264 PVOID object;
265 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT;
267 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD
269 DWORD SizeOfStruct;
270 DWORD BaseOfImage;
271 DWORD CheckSum;
272 DWORD TimeDateStamp;
273 CHAR FileName[MAX_PATH];
274 BOOLEAN Reparse;
275 HANDLE hFile;
276 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD;
278 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64
280 DWORD SizeOfStruct;
281 DWORD64 BaseOfImage;
282 DWORD CheckSum;
283 DWORD TimeDateStamp;
284 CHAR FileName[MAX_PATH];
285 BOOLEAN Reparse;
286 HANDLE hFile;
287 DWORD Flags;
288 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64;
290 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL
292 DWORD SizeOfStruct;
293 DWORD NumberOfDups;
294 PIMAGEHLP_SYMBOL Symbol;
295 DWORD SelectedSymbol;
296 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL;
298 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64
300 DWORD SizeOfStruct;
301 DWORD NumberOfDups;
302 PIMAGEHLP_SYMBOL64 Symbol;
303 DWORD SelectedSymbol;
304 } IMAGEHLP_DUPLICATE_SYMBOL64, *PIMAGEHLP_DUPLICATE_SYMBOL64;
306 #define SYMOPT_CASE_INSENSITIVE 0x00000001
307 #define SYMOPT_UNDNAME 0x00000002
308 #define SYMOPT_DEFERRED_LOADS 0x00000004
309 #define SYMOPT_NO_CPP 0x00000008
310 #define SYMOPT_LOAD_LINES 0x00000010
311 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020
312 #define SYMOPT_LOAD_ANYTHING 0x00000040
313 #define SYMOPT_IGNORE_CVREC 0x00000080
314 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100
315 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200
316 #define SYMOPT_EXACT_SYMBOLS 0x00000400
317 #define SYMOPT_WILD_UNDERSCORE 0x00000800
318 #define SYMOPT_USE_DEFAULTS 0x00001000
319 /* latest SDK defines:
320 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800
321 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000
323 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000
324 #define SYMOPT_PUBLICS_ONLY 0x00004000
325 #define SYMOPT_NO_PUBLICS 0x00008000
326 #define SYMOPT_AUTO_PUBLICS 0x00010000
327 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000
328 #define SYMOPT_SECURE 0x00040000
329 #define SYMOPT_NO_PROMPTS 0x00080000
330 #define SYMOPT_OVERWRITE 0x00100000
331 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000
333 #define SYMOPT_DEBUG 0x80000000
335 typedef struct _IMAGEHLP_STACK_FRAME
337 ULONG64 InstructionOffset;
338 ULONG64 ReturnOffset;
339 ULONG64 FrameOffset;
340 ULONG64 StackOffset;
341 ULONG64 BackingStoreOffset;
342 ULONG64 FuncTableEntry;
343 ULONG64 Params[4];
344 ULONG64 Reserved[5];
345 BOOL Virtual;
346 ULONG Reserved2;
347 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME;
349 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT;
351 #define DBHHEADER_DEBUGDIRS 0x1
352 typedef struct _DBGHELP_MODLOAD_DATA
354 DWORD ssize;
355 DWORD ssig;
356 PVOID data;
357 DWORD size;
358 DWORD flags;
359 } MODLOAD_DATA, *PMODLOAD_DATA;
361 /*************************
362 * MiniDUMP *
363 *************************/
365 #include <pshpack4.h>
366 /* DebugHelp */
368 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */
369 #define MINIDUMP_VERSION (42899)
371 typedef DWORD RVA;
372 typedef ULONG64 RVA64;
374 typedef enum _MINIDUMP_TYPE
376 MiniDumpNormal = 0x0000,
377 MiniDumpWithDataSegs = 0x0001,
378 MiniDumpWithFullMemory = 0x0002,
379 MiniDumpWithHandleData = 0x0004,
380 MiniDumpFilterMemory = 0x0008,
381 MiniDumpScanMemory = 0x0010,
382 MiniDumpWithUnloadedModules = 0x0020,
383 MiniDumpWithIndirectlyReferencedMemory = 0x0040,
384 MiniDumpFilterModulePaths = 0x0080,
385 MiniDumpWithProcessThreadData = 0x0100,
386 MiniDumpWithPrivateReadWriteMemory = 0x0200,
387 MiniDumpWithoutOptionalData = 0x0400,
388 MiniDumpWithFullMemoryInfo = 0x0800,
389 MiniDumpWithThreadInfo = 0x1000,
390 MiniDumpWithCodeSegs = 0x2000
391 } MINIDUMP_TYPE;
393 typedef enum _MINIDUMP_CALLBACK_TYPE
395 ModuleCallback,
396 ThreadCallback,
397 ThreadExCallback,
398 IncludeThreadCallback,
399 IncludeModuleCallback,
400 MemoryCallback,
401 } MINIDUMP_CALLBACK_TYPE;
403 typedef struct _MINIDUMP_THREAD_CALLBACK
405 ULONG ThreadId;
406 HANDLE ThreadHandle;
407 CONTEXT Context;
408 ULONG SizeOfContext;
409 ULONG64 StackBase;
410 ULONG64 StackEnd;
411 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK;
413 typedef struct _MINIDUMP_THREAD_EX_CALLBACK
415 ULONG ThreadId;
416 HANDLE ThreadHandle;
417 CONTEXT Context;
418 ULONG SizeOfContext;
419 ULONG64 StackBase;
420 ULONG64 StackEnd;
421 ULONG64 BackingStoreBase;
422 ULONG64 BackingStoreEnd;
423 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK;
425 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK
427 ULONG ThreadId;
428 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK;
430 typedef enum _THREAD_WRITE_FLAGS
432 ThreadWriteThread = 0x0001,
433 ThreadWriteStack = 0x0002,
434 ThreadWriteContext = 0x0004,
435 ThreadWriteBackingStore = 0x0008,
436 ThreadWriteInstructionWindow = 0x0010,
437 ThreadWriteThreadData = 0x0020,
438 ThreadWriteThreadInfo = 0x0040
439 } THREAD_WRITE_FLAGS;
441 typedef struct _MINIDUMP_MODULE_CALLBACK
443 PWCHAR FullPath;
444 ULONG64 BaseOfImage;
445 ULONG SizeOfImage;
446 ULONG CheckSum;
447 ULONG TimeDateStamp;
448 VS_FIXEDFILEINFO VersionInfo;
449 PVOID CvRecord;
450 ULONG SizeOfCvRecord;
451 PVOID MiscRecord;
452 ULONG SizeOfMiscRecord;
453 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK;
455 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK
457 ULONG64 BaseOfImage;
458 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK;
460 typedef enum _MODULE_WRITE_FLAGS
462 ModuleWriteModule = 0x0001,
463 ModuleWriteDataSeg = 0x0002,
464 ModuleWriteMiscRecord = 0x0004,
465 ModuleWriteCvRecord = 0x0008,
466 ModuleReferencedByMemory = 0x0010,
467 ModuleWriteTlsData = 0x0020,
468 ModuleWriteCodeSegs = 0x0040,
469 } MODULE_WRITE_FLAGS;
471 typedef struct _MINIDUMP_CALLBACK_INPUT
473 ULONG ProcessId;
474 HANDLE ProcessHandle;
475 ULONG CallbackType;
476 union
478 MINIDUMP_THREAD_CALLBACK Thread;
479 MINIDUMP_THREAD_EX_CALLBACK ThreadEx;
480 MINIDUMP_MODULE_CALLBACK Module;
481 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread;
482 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule;
483 } DUMMYUNIONNAME;
484 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT;
486 typedef struct _MINIDUMP_CALLBACK_OUTPUT
488 union
490 ULONG ModuleWriteFlags;
491 ULONG ThreadWriteFlags;
492 struct
494 ULONG64 MemoryBase;
495 ULONG MemorySize;
496 } DUMMYSTRUCTNAME;
497 } DUMMYUNIONNAME;
498 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT;
500 typedef BOOL (WINAPI* MINIDUMP_CALLBACK_ROUTINE)(PVOID, const PMINIDUMP_CALLBACK_INPUT, PMINIDUMP_CALLBACK_OUTPUT);
502 typedef struct _MINIDUMP_CALLBACK_INFORMATION
504 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine;
505 void* CallbackParam;
506 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION;
508 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR
510 ULONG DataSize;
511 RVA Rva;
512 } MINIDUMP_LOCATION_DESCRIPTOR;
514 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64
516 ULONG64 DataSize;
517 RVA64 Rva;
518 } MINIDUMP_LOCATION_DESCRIPTOR64;
520 typedef struct _MINIDUMP_DIRECTORY
522 ULONG StreamType;
523 MINIDUMP_LOCATION_DESCRIPTOR Location;
524 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY;
526 typedef struct _MINIDUMP_EXCEPTION
528 ULONG ExceptionCode;
529 ULONG ExceptionFlags;
530 ULONG64 ExceptionRecord;
531 ULONG64 ExceptionAddress;
532 ULONG NumberParameters;
533 ULONG __unusedAlignment;
534 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS];
535 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION;
537 typedef struct _MINIDUMP_EXCEPTION_INFORMATION
539 DWORD ThreadId;
540 PEXCEPTION_POINTERS ExceptionPointers;
541 BOOL ClientPointers;
542 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION;
544 typedef struct MINIDUMP_EXCEPTION_STREAM
546 ULONG ThreadId;
547 ULONG __alignment;
548 MINIDUMP_EXCEPTION ExceptionRecord;
549 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
550 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM;
552 typedef struct _MINIDUMP_HEADER
554 DWORD Signature;
555 DWORD Version;
556 DWORD NumberOfStreams;
557 RVA StreamDirectoryRva;
558 DWORD CheckSum;
559 union
561 DWORD Reserved;
562 DWORD TimeDateStamp;
563 } DUMMYUNIONNAME;
564 ULONG64 Flags;
565 } MINIDUMP_HEADER, *PMINIDUMP_HEADER;
567 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR
569 ULONG64 StartOfMemoryRange;
570 MINIDUMP_LOCATION_DESCRIPTOR Memory;
571 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR;
573 typedef struct _MINIDUMP_MEMORY_LIST
575 ULONG NumberOfMemoryRanges;
576 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[1]; /* FIXME: 0-sized array not supported */
577 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST;
579 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001
580 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002
582 typedef struct _MINIDUMP_MISC_INFO
584 ULONG SizeOfInfo;
585 ULONG Flags1;
586 ULONG ProcessId;
587 ULONG ProcessCreateTime;
588 ULONG ProcessUserTime;
589 ULONG ProcessKernelTime;
590 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO;
592 typedef struct _MINIDUMP_MODULE
594 ULONG64 BaseOfImage;
595 ULONG SizeOfImage;
596 ULONG CheckSum;
597 ULONG TimeDateStamp;
598 RVA ModuleNameRva;
599 VS_FIXEDFILEINFO VersionInfo;
600 MINIDUMP_LOCATION_DESCRIPTOR CvRecord;
601 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord;
602 ULONG64 Reserved0;
603 ULONG64 Reserved1;
604 } MINIDUMP_MODULE, *PMINIDUMP_MODULE;
606 typedef struct _MINIDUMP_MODULE_LIST
608 ULONG NumberOfModules;
609 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */
610 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST;
612 typedef struct _MINIDUMP_STRING
614 ULONG Length;
615 WCHAR Buffer[1]; /* FIXME: O-sized array not supported */
616 } MINIDUMP_STRING, *PMINIDUMP_STRING;
618 typedef struct _MINIDUMP_SYSTEM_INFO
620 USHORT ProcessorArchitecture;
621 USHORT ProcessorLevel;
622 USHORT ProcessorRevision;
623 union
625 USHORT Reserved0;
626 struct
628 UCHAR NumberOfProcessors;
629 UCHAR ProductType;
630 } DUMMYSTRUCTNAME;
631 } DUMMYUNIONNAME;
633 ULONG MajorVersion;
634 ULONG MinorVersion;
635 ULONG BuildNumber;
636 ULONG PlatformId;
638 RVA CSDVersionRva;
639 union
641 ULONG Reserved1;
642 struct
644 USHORT SuiteMask;
645 USHORT Reserved2;
646 } DUMMYSTRUCTNAME;
647 } DUMMYUNIONNAME1;
648 union _CPU_INFORMATION
650 struct
652 ULONG VendorId[3];
653 ULONG VersionInformation;
654 ULONG FeatureInformation;
655 ULONG AMDExtendedCpuFeatures;
656 } X86CpuInfo;
657 struct
659 ULONG64 ProcessorFeatures[2];
660 } OtherCpuInfo;
661 } Cpu;
663 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO;
665 typedef struct _MINIDUMP_THREAD
667 ULONG ThreadId;
668 ULONG SuspendCount;
669 ULONG PriorityClass;
670 ULONG Priority;
671 ULONG64 Teb;
672 MINIDUMP_MEMORY_DESCRIPTOR Stack;
673 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext;
674 } MINIDUMP_THREAD, *PMINIDUMP_THREAD;
676 typedef struct _MINIDUMP_THREAD_LIST
678 ULONG NumberOfThreads;
679 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */
680 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST;
682 typedef struct _MINIDUMP_USER_STREAM
684 ULONG Type;
685 ULONG BufferSize;
686 void* Buffer;
687 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM;
689 typedef struct _MINIDUMP_USER_STREAM_INFORMATION
691 ULONG UserStreamCount;
692 PMINIDUMP_USER_STREAM UserStreamArray;
693 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION;
695 typedef enum _MINIDUMP_STREAM_TYPE
697 UnusedStream = 0,
698 ReservedStream0 = 1,
699 ReservedStream1 = 2,
700 ThreadListStream = 3,
701 ModuleListStream = 4,
702 MemoryListStream = 5,
703 ExceptionStream = 6,
704 SystemInfoStream = 7,
705 ThreadExListStream = 8,
706 Memory64ListStream = 9,
707 CommentStreamA = 10,
708 CommentStreamW = 11,
709 HandleDataStream = 12,
710 FunctionTableStream = 13,
711 UnloadedModuleListStream = 14,
712 MiscInfoStream = 15,
713 MemoryInfoListStream = 16,
714 ThreadInfoListStream = 17,
716 LastReservedStream = 0xffff
717 } MINIDUMP_STREAM_TYPE;
719 BOOL WINAPI MiniDumpWriteDump(HANDLE, DWORD, HANDLE, MINIDUMP_TYPE,
720 const PMINIDUMP_EXCEPTION_INFORMATION,
721 const PMINIDUMP_USER_STREAM_INFORMATION,
722 const PMINIDUMP_CALLBACK_INFORMATION);
723 BOOL WINAPI MiniDumpReadDumpStream(PVOID, ULONG, PMINIDUMP_DIRECTORY*, PVOID*,
724 ULONG*);
726 #include <poppack.h>
728 /*************************
729 * MODULE handling *
730 *************************/
732 /* flags for SymLoadModuleEx */
733 #define SLMFLAG_VIRTUAL 0x1
734 #define SLMFLAG_NO_SYMBOLS 0x4
736 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK)(PSTR, DWORD, ULONG, PVOID);
737 BOOL WINAPI EnumerateLoadedModules(HANDLE, PENUMLOADED_MODULES_CALLBACK, PVOID);
738 typedef BOOL (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)(PSTR, DWORD, ULONG64, PVOID);
739 BOOL WINAPI EnumerateLoadedModules64(HANDLE, PENUMLOADED_MODULES_CALLBACK64, PVOID);
740 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK)(PSTR, DWORD, PVOID);
741 BOOL WINAPI SymEnumerateModules(HANDLE, PSYM_ENUMMODULES_CALLBACK, PVOID);
742 typedef BOOL (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)(PSTR, DWORD64, PVOID);
743 BOOL WINAPI SymEnumerateModules64(HANDLE, PSYM_ENUMMODULES_CALLBACK64, PVOID);
744 BOOL WINAPI SymGetModuleInfo(HANDLE, DWORD, PIMAGEHLP_MODULE);
745 BOOL WINAPI SymGetModuleInfoW(HANDLE, DWORD, PIMAGEHLP_MODULEW);
746 BOOL WINAPI SymGetModuleInfo64(HANDLE, DWORD64, PIMAGEHLP_MODULE64);
747 BOOL WINAPI SymGetModuleInfoW64(HANDLE, DWORD64, PIMAGEHLP_MODULEW64);
748 DWORD WINAPI SymGetModuleBase(HANDLE, DWORD);
749 DWORD64 WINAPI SymGetModuleBase64(HANDLE, DWORD64);
750 DWORD WINAPI SymLoadModule(HANDLE, HANDLE, PCSTR, PCSTR, DWORD, DWORD);
751 DWORD64 WINAPI SymLoadModule64(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD);
752 DWORD64 WINAPI SymLoadModuleEx(HANDLE, HANDLE, PCSTR, PCSTR, DWORD64, DWORD,
753 PMODLOAD_DATA, DWORD);
754 BOOL WINAPI SymUnloadModule(HANDLE, DWORD);
755 BOOL WINAPI SymUnloadModule64(HANDLE, DWORD64);
757 /*************************
758 * Symbol Handling *
759 *************************/
761 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1
762 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */
763 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */
764 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */
765 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */
766 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */
767 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */
768 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */
770 #define SYMFLAG_VALUEPRESENT 0x00000001
771 #define SYMFLAG_REGISTER 0x00000008
772 #define SYMFLAG_REGREL 0x00000010
773 #define SYMFLAG_FRAMEREL 0x00000020
774 #define SYMFLAG_PARAMETER 0x00000040
775 #define SYMFLAG_LOCAL 0x00000080
776 #define SYMFLAG_CONSTANT 0x00000100
777 #define SYMFLAG_EXPORT 0x00000200
778 #define SYMFLAG_FORWARDER 0x00000400
779 #define SYMFLAG_FUNCTION 0x00000800
780 #define SYMFLAG_VIRTUAL 0x00001000
781 #define SYMFLAG_THUNK 0x00002000
782 #define SYMFLAG_TLSREL 0x00004000
783 #define SYMFLAG_SLOT 0x00008000
785 #define MAX_SYM_NAME 2000
787 typedef struct _SYMBOL_INFO
789 ULONG SizeOfStruct;
790 ULONG TypeIndex;
791 ULONG64 Reserved[2];
792 ULONG info; /* sdk states info, while MSDN says it's Index... */
793 ULONG Size;
794 ULONG64 ModBase;
795 ULONG Flags;
796 ULONG64 Value;
797 ULONG64 Address;
798 ULONG Register;
799 ULONG Scope;
800 ULONG Tag;
801 ULONG NameLen;
802 ULONG MaxNameLen;
803 CHAR Name[1];
804 } SYMBOL_INFO, *PSYMBOL_INFO;
806 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO
808 TI_GET_SYMTAG,
809 TI_GET_SYMNAME,
810 TI_GET_LENGTH,
811 TI_GET_TYPE,
812 TI_GET_TYPEID,
813 TI_GET_BASETYPE,
814 TI_GET_ARRAYINDEXTYPEID,
815 TI_FINDCHILDREN,
816 TI_GET_DATAKIND,
817 TI_GET_ADDRESSOFFSET,
818 TI_GET_OFFSET,
819 TI_GET_VALUE,
820 TI_GET_COUNT,
821 TI_GET_CHILDRENCOUNT,
822 TI_GET_BITPOSITION,
823 TI_GET_VIRTUALBASECLASS,
824 TI_GET_VIRTUALTABLESHAPEID,
825 TI_GET_VIRTUALBASEPOINTEROFFSET,
826 TI_GET_CLASSPARENTID,
827 TI_GET_NESTED,
828 TI_GET_SYMINDEX,
829 TI_GET_LEXICALPARENT,
830 TI_GET_ADDRESS,
831 TI_GET_THISADJUST,
832 TI_GET_UDTKIND,
833 TI_IS_EQUIV_TO,
834 TI_GET_CALLING_CONVENTION,
835 } IMAGEHLP_SYMBOL_TYPE_INFO;
837 typedef struct _TI_FINDCHILDREN_PARAMS
839 ULONG Count;
840 ULONG Start;
841 ULONG ChildId[1];
842 } TI_FINDCHILDREN_PARAMS;
844 #define UNDNAME_COMPLETE (0x0000)
845 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001)
846 #define UNDNAME_NO_MS_KEYWORDS (0x0002)
847 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004)
848 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008)
849 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010)
850 #define UNDNAME_NO_MS_THISTYPE (0x0020)
851 #define UNDNAME_NO_CV_THISTYPE (0x0040)
852 #define UNDNAME_NO_THISTYPE (0x0060)
853 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080)
854 #define UNDNAME_NO_THROW_SIGNATURES (0x0100)
855 #define UNDNAME_NO_MEMBER_TYPE (0x0200)
856 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400)
857 #define UNDNAME_32_BIT_DECODE (0x0800)
858 #define UNDNAME_NAME_ONLY (0x1000)
859 #define UNDNAME_NO_ARGUMENTS (0x2000)
860 #define UNDNAME_NO_SPECIAL_SYMS (0x4000)
862 #define SYMSEARCH_MASKOBJS 0x01
863 #define SYMSEARCH_RECURSE 0x02
864 #define SYMSEARCH_GLOBALSONLY 0x04
866 BOOL WINAPI SymGetTypeInfo(HANDLE, DWORD64, ULONG, IMAGEHLP_SYMBOL_TYPE_INFO, PVOID);
867 typedef BOOL (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)(PSYMBOL_INFO, ULONG, PVOID);
868 BOOL WINAPI SymEnumTypes(HANDLE, ULONG64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
869 BOOL WINAPI SymFromAddr(HANDLE, DWORD64, DWORD64*, SYMBOL_INFO*);
870 BOOL WINAPI SymFromToken(HANDLE, DWORD64, DWORD, PSYMBOL_INFO);
871 BOOL WINAPI SymFromName(HANDLE, PCSTR, PSYMBOL_INFO);
872 BOOL WINAPI SymGetSymFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_SYMBOL);
873 BOOL WINAPI SymGetSymFromAddr64(HANDLE, DWORD64, PDWORD64, PIMAGEHLP_SYMBOL64);
874 BOOL WINAPI SymGetSymFromName(HANDLE, PCSTR, PIMAGEHLP_SYMBOL);
875 BOOL WINAPI SymGetSymFromName64(HANDLE, PCSTR, PIMAGEHLP_SYMBOL64);
876 BOOL WINAPI SymGetTypeFromName(HANDLE, ULONG64, PCSTR, PSYMBOL_INFO);
877 BOOL WINAPI SymGetSymNext(HANDLE, PIMAGEHLP_SYMBOL);
878 BOOL WINAPI SymGetSymNext64(HANDLE, PIMAGEHLP_SYMBOL64);
879 BOOL WINAPI SymGetSymPrev(HANDLE, PIMAGEHLP_SYMBOL);
880 BOOL WINAPI SymGetSymPrev64(HANDLE, PIMAGEHLP_SYMBOL64);
881 BOOL WINAPI SymEnumSymbols(HANDLE, ULONG64, PCSTR, PSYM_ENUMERATESYMBOLS_CALLBACK,
882 PVOID);
883 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)(PSTR, DWORD, ULONG, PVOID);
884 BOOL WINAPI SymEnumerateSymbols(HANDLE, DWORD, PSYM_ENUMSYMBOLS_CALLBACK, PVOID);
885 typedef BOOL (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)(PSTR, DWORD64, ULONG, PVOID);
886 BOOL WINAPI SymEnumerateSymbols64(HANDLE, DWORD64, PSYM_ENUMSYMBOLS_CALLBACK64, PVOID);
887 BOOL WINAPI SymEnumSymbolsForAddr(HANDLE, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID);
888 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)(HANDLE, ULONG, PVOID, PVOID);
889 BOOL WINAPI SymRegisterCallback(HANDLE, PSYMBOL_REGISTERED_CALLBACK, PVOID);
890 typedef BOOL (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)(HANDLE, ULONG, ULONG64, ULONG64);
891 BOOL WINAPI SymRegisterCallback64(HANDLE, PSYMBOL_REGISTERED_CALLBACK64, ULONG64);
892 BOOL WINAPI SymUnDName(PIMAGEHLP_SYMBOL, PSTR, DWORD);
893 BOOL WINAPI SymUnDName64(PIMAGEHLP_SYMBOL64, PSTR, DWORD);
894 DWORD WINAPI UnDecorateSymbolName(LPCSTR, LPSTR, DWORD, DWORD);
895 BOOL WINAPI SymMatchString(PCSTR, PCSTR, BOOL);
896 BOOL WINAPI SymMatchStringW(PCWSTR, PCWSTR, BOOL);
897 BOOL WINAPI SymSearch(HANDLE, ULONG64, DWORD, DWORD, PCSTR, DWORD64, PSYM_ENUMERATESYMBOLS_CALLBACK, PVOID, DWORD);
898 DWORD WINAPI UnDecorateSymbolName(PCSTR, PSTR, DWORD, DWORD);
899 BOOL WINAPI SymGetScope(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
900 BOOL WINAPI SymFromIndex(HANDLE, ULONG64, DWORD, PSYMBOL_INFO);
901 BOOL WINAPI SymAddSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD, DWORD);
902 BOOL WINAPI SymDeleteSymbol(HANDLE, ULONG64, PCSTR, DWORD64, DWORD);
904 /*************************
905 * Source Files *
906 *************************/
907 typedef BOOL (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)(PSOURCEFILE, PVOID);
909 BOOL WINAPI SymEnumSourceFiles(HANDLE, ULONG64, PCSTR, PSYM_ENUMSOURCEFILES_CALLBACK,
910 PVOID);
911 BOOL WINAPI SymGetLineFromAddr(HANDLE, DWORD, PDWORD, PIMAGEHLP_LINE);
912 BOOL WINAPI SymGetLineFromAddr64(HANDLE, DWORD64, PDWORD, PIMAGEHLP_LINE64);
913 BOOL WINAPI SymGetLinePrev(HANDLE, PIMAGEHLP_LINE);
914 BOOL WINAPI SymGetLinePrev64(HANDLE, PIMAGEHLP_LINE64);
915 BOOL WINAPI SymGetLineNext(HANDLE, PIMAGEHLP_LINE);
916 BOOL WINAPI SymGetLineNext64(HANDLE, PIMAGEHLP_LINE64);
917 BOOL WINAPI SymGetLineFromName(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE);
918 BOOL WINAPI SymGetLineFromName64(HANDLE, PCSTR, PCSTR, DWORD, PLONG, PIMAGEHLP_LINE64);
919 ULONG WINAPI SymGetFileLineOffsets64(HANDLE, LPSTR, LPSTR, PDWORD64, ULONG);
920 ULONG WINAPI SymGetFileLineOffsetsW64(HANDLE, PWCH, PWCH, PDWORD64, ULONG);
921 BOOL WINAPI SymGetSourceFile(HANDLE, ULONG64, PCSTR, PCSTR, PSTR, DWORD);
922 BOOL WINAPI SymGetSourceFileToken(HANDLE, ULONG64, PCSTR, PVOID*, DWORD*);
923 BOOL WINAPI SymGetSourceFileFromToken(HANDLE, PVOID, PCSTR, PSTR, DWORD);
924 BOOL WINAPI SymGetSourceVarFromToken(HANDLE, PVOID, PCSTR, PCSTR, PSTR, DWORD);
926 typedef struct _SRCCODEINFO
928 DWORD SizeOfStruct;
929 PVOID Key;
930 DWORD64 ModBase;
931 char Obj[MAX_PATH+1];
932 char FileName[MAX_PATH+1];
933 DWORD LineNumber;
934 DWORD64 Address;
935 } SRCCODEINFO, *PSRCCODEINFO;
937 typedef BOOL (CALLBACK* PSYM_ENUMLINES_CALLBACK)(PSRCCODEINFO, PVOID);
938 BOOL WINAPI SymEnumLines(HANDLE, ULONG64, PCSTR, PCSTR, PSYM_ENUMLINES_CALLBACK, PVOID);
940 /*************************
941 * File & image handling *
942 *************************/
943 BOOL WINAPI SymInitialize(HANDLE, PCSTR, BOOL);
944 BOOL WINAPI SymCleanup(HANDLE);
946 HANDLE WINAPI FindDebugInfoFile(PCSTR, PCSTR, PSTR);
947 typedef BOOL (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)(HANDLE, PSTR, PVOID);
948 HANDLE WINAPI FindDebugInfoFileEx(PCSTR, PCSTR, PSTR, PFIND_DEBUG_FILE_CALLBACK, PVOID);
949 typedef BOOL (CALLBACK *PFINDFILEINPATHCALLBACK)(PSTR, PVOID);
950 BOOL WINAPI SymFindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD,
951 PSTR, PFINDFILEINPATHCALLBACK, PVOID);
952 HANDLE WINAPI FindExecutableImage(PCSTR, PCSTR, PSTR);
953 typedef BOOL (CALLBACK *PFIND_EXE_FILE_CALLBACK)(HANDLE, PSTR, PVOID);
954 HANDLE WINAPI FindExecutableImageEx(PCSTR, PCSTR, PSTR, PFIND_EXE_FILE_CALLBACK, PVOID);
955 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(PVOID);
956 PVOID WINAPI ImageDirectoryEntryToDataEx(PVOID, BOOLEAN, USHORT, PULONG,
957 PIMAGE_SECTION_HEADER *);
958 PVOID WINAPI ImageDirectoryEntryToData(PVOID, BOOLEAN, USHORT, PULONG);
959 PIMAGE_SECTION_HEADER WINAPI ImageRvaToSection(PIMAGE_NT_HEADERS, PVOID, ULONG);
960 PVOID WINAPI ImageRvaToVa(PIMAGE_NT_HEADERS, PVOID, ULONG, PIMAGE_SECTION_HEADER*);
961 BOOL WINAPI SymGetSearchPath(HANDLE, PSTR, DWORD);
962 BOOL WINAPI SymSetSearchPath(HANDLE, PCSTR);
963 DWORD WINAPI GetTimestampForLoadedLibrary(HMODULE);
964 BOOL WINAPI MakeSureDirectoryPathExists(PCSTR);
965 BOOL WINAPI SearchTreeForFile(PCSTR, PCSTR, PSTR);
966 typedef BOOL (CALLBACK *PENUMDIRTREE_CALLBACK)(LPCSTR, PVOID);
967 BOOL WINAPI EnumDirTree(HANDLE, PCSTR, PCSTR, PSTR, PENUMDIRTREE_CALLBACK, void*);
968 BOOL WINAPI SymMatchFileName(PSTR, PSTR, PSTR*, PSTR*);
969 PCHAR WINAPI SymSetHomeDirectory(HANDLE, PCSTR);
970 PCHAR WINAPI SymGetHomeDirectory(DWORD, PSTR, size_t);
971 #define hdBase 0
972 #define hdSym 1
973 #define hdSrc 2
974 #define hdMax 3
976 /*************************
977 * Context management *
978 *************************/
979 BOOL WINAPI SymSetContext(HANDLE, PIMAGEHLP_STACK_FRAME, PIMAGEHLP_CONTEXT);
982 /*************************
983 * Stack management *
984 *************************/
986 typedef struct _KDHELP
988 DWORD Thread;
989 DWORD ThCallbackStack;
990 DWORD NextCallback;
991 DWORD FramePointer;
992 DWORD KiCallUserMode;
993 DWORD KeUserCallbackDispatcher;
994 DWORD SystemRangeStart;
995 } KDHELP, *PKDHELP;
997 typedef struct _KDHELP64
999 DWORD64 Thread;
1000 DWORD ThCallbackStack;
1001 DWORD ThCallbackBStore;
1002 DWORD NextCallback;
1003 DWORD FramePointer;
1004 DWORD64 KiCallUserMode;
1005 DWORD64 KeUserCallbackDispatcher;
1006 DWORD64 SystemRangeStart;
1007 DWORD64 Reserved[8];
1008 } KDHELP64, *PKDHELP64;
1010 typedef struct _STACKFRAME
1012 ADDRESS AddrPC;
1013 ADDRESS AddrReturn;
1014 ADDRESS AddrFrame;
1015 ADDRESS AddrStack;
1016 PVOID FuncTableEntry;
1017 DWORD Params[4];
1018 BOOL Far;
1019 BOOL Virtual;
1020 DWORD Reserved[3];
1021 KDHELP KdHelp;
1022 ADDRESS AddrBStore;
1023 } STACKFRAME, *LPSTACKFRAME;
1025 typedef struct _STACKFRAME64
1027 ADDRESS64 AddrPC;
1028 ADDRESS64 AddrReturn;
1029 ADDRESS64 AddrFrame;
1030 ADDRESS64 AddrStack;
1031 ADDRESS64 AddrBStore;
1032 PVOID FuncTableEntry;
1033 DWORD64 Params[4];
1034 BOOL Far;
1035 BOOL Virtual;
1036 DWORD64 Reserved[3];
1037 KDHELP64 KdHelp;
1038 } STACKFRAME64, *LPSTACKFRAME64;
1040 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)
1041 (HANDLE, DWORD, PVOID, DWORD, PDWORD);
1042 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)(HANDLE, DWORD);
1043 typedef DWORD (CALLBACK *PGET_MODULE_BASE_ROUTINE)(HANDLE, DWORD);
1044 typedef DWORD (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)(HANDLE, HANDLE, LPADDRESS);
1045 BOOL WINAPI StackWalk(DWORD, HANDLE, HANDLE, LPSTACKFRAME, PVOID,
1046 PREAD_PROCESS_MEMORY_ROUTINE,
1047 PFUNCTION_TABLE_ACCESS_ROUTINE,
1048 PGET_MODULE_BASE_ROUTINE,
1049 PTRANSLATE_ADDRESS_ROUTINE);
1051 typedef BOOL (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)
1052 (HANDLE, DWORD64, PVOID, DWORD, PDWORD);
1053 typedef PVOID (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)(HANDLE, DWORD64);
1054 typedef DWORD64 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)(HANDLE, DWORD64);
1055 typedef DWORD64 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)(HANDLE, HANDLE, LPADDRESS64);
1056 BOOL WINAPI StackWalk64(DWORD, HANDLE, HANDLE, LPSTACKFRAME64, PVOID,
1057 PREAD_PROCESS_MEMORY_ROUTINE64,
1058 PFUNCTION_TABLE_ACCESS_ROUTINE64,
1059 PGET_MODULE_BASE_ROUTINE64,
1060 PTRANSLATE_ADDRESS_ROUTINE64);
1062 PVOID WINAPI SymFunctionTableAccess(HANDLE, DWORD);
1063 PVOID WINAPI SymFunctionTableAccess64(HANDLE, DWORD64);
1065 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)(HANDLE, DWORD, PVOID);
1066 typedef PVOID (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)(HANDLE, ULONG64, ULONG64);
1068 BOOL WINAPI SymRegisterFunctionEntryCallback(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK, PVOID);
1069 BOOL WINAPI SymRegisterFunctionEntryCallback64(HANDLE, PSYMBOL_FUNCENTRY_CALLBACK64, ULONG64);
1071 /*************************
1072 * Version, global stuff *
1073 *************************/
1075 #define API_VERSION_NUMBER 9
1077 typedef struct API_VERSION
1079 USHORT MajorVersion;
1080 USHORT MinorVersion;
1081 USHORT Revision;
1082 USHORT Reserved;
1083 } API_VERSION, *LPAPI_VERSION;
1085 LPAPI_VERSION WINAPI ImagehlpApiVersion(void);
1086 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(LPAPI_VERSION);
1088 typedef struct _IMAGE_DEBUG_INFORMATION
1090 LIST_ENTRY List;
1091 DWORD ReservedSize;
1092 PVOID ReservedMappedBase;
1093 USHORT ReservedMachine;
1094 USHORT ReservedCharacteristics;
1095 DWORD ReservedCheckSum;
1096 DWORD ImageBase;
1097 DWORD SizeOfImage;
1098 DWORD ReservedNumberOfSections;
1099 PIMAGE_SECTION_HEADER ReservedSections;
1100 DWORD ReservedExportedNamesSize;
1101 PSTR ReservedExportedNames;
1102 DWORD ReservedNumberOfFunctionTableEntries;
1103 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries;
1104 DWORD ReservedLowestFunctionStartingAddress;
1105 DWORD ReservedHighestFunctionEndingAddress;
1106 DWORD ReservedNumberOfFpoTableEntries;
1107 PFPO_DATA ReservedFpoTableEntries;
1108 DWORD SizeOfCoffSymbols;
1109 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols;
1110 DWORD ReservedSizeOfCodeViewSymbols;
1111 PVOID ReservedCodeViewSymbols;
1112 PSTR ImageFilePath;
1113 PSTR ImageFileName;
1114 PSTR ReservedDebugFilePath;
1115 DWORD ReservedTimeDateStamp;
1116 BOOL ReservedRomImage;
1117 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory;
1118 DWORD ReservedNumberOfDebugDirectories;
1119 DWORD ReservedOriginalFunctionTableBaseAddress;
1120 DWORD Reserved[ 2 ];
1121 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION;
1124 PIMAGE_DEBUG_INFORMATION WINAPI MapDebugInformation(HANDLE, PSTR, PSTR, DWORD);
1126 BOOL WINAPI UnmapDebugInformation(PIMAGE_DEBUG_INFORMATION);
1128 DWORD WINAPI SymGetOptions(void);
1129 DWORD WINAPI SymSetOptions(DWORD);
1131 BOOL WINAPI SymSetParentWindow(HWND);
1133 /*************************
1134 * Version, global stuff *
1135 *************************/
1137 typedef BOOL (WINAPI* PSYMBOLSERVERPROC)(LPCSTR, LPCSTR, PVOID, DWORD, DWORD, LPSTR);
1138 typedef BOOL (WINAPI* PSYMBOLSERVEROPENPROC)(void);
1139 typedef BOOL (WINAPI* PSYMBOLSERVERCLOSEPROC)(void);
1140 typedef BOOL (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64);
1141 typedef BOOL (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64);
1142 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void);
1143 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROC)(LPCSTR);
1145 #define SSRVOPT_CALLBACK 0x0001
1146 #define SSRVOPT_DWORD 0x0002
1147 #define SSRVOPT_DWORDPTR 0x0004
1148 #define SSRVOPT_GUIDPTR 0x0008
1149 #define SSRVOPT_OLDGUIDPTR 0x0010
1150 #define SSRVOPT_UNATTENDED 0x0020
1151 #define SSRVOPT_NOCOPY 0x0040
1152 #define SSRVOPT_PARENTWIN 0x0080
1153 #define SSRVOPT_PARAMTYPE 0x0100
1154 #define SSRVOPT_SECURE 0x0200
1155 #define SSRVOPT_TRACE 0x0400
1156 #define SSRVOPT_SETCONTEXT 0x0800
1157 #define SSRVOPT_PROXY 0x1000
1158 #define SSRVOPT_DOWNSTREAM_STORE 0x2000
1159 #define SSRVOPT_RESET ((ULONG_PTR)-1)
1161 #define SSRVACTION_TRACE 1
1162 #define SSRVACTION_QUERYCANCEL 2
1163 #define SSRVACTION_EVENT 3
1165 #ifdef __cplusplus
1166 } /* extern "C" */
1167 #endif /* defined(__cplusplus) */
1169 #endif /* __WINE_DBGHELP_H */