1 /* 2 * Declarations for DBGHELP 3 * 4 * Copyright (C) 2003 Eric Pouech 5 * 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. 10 * 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. 15 * 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 19 */ 20 21 #ifndef __WINE_DBGHELP_H 22 #define __WINE_DBGHELP_H 23 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 82 83 84 #ifdef __cplusplus 85 extern "C" { 86 #endif /* defined(__cplusplus) */ 87 88 #ifdef _WIN64 89 #ifndef _IMAGEHLP64 90 #define _IMAGEHLP64 91 #endif 92 #endif 93 94 #define IMAGEAPI WINAPI 95 #define DBHLPAPI IMAGEAPI 96 97 typedef struct _LOADED_IMAGE 98 { 99 PSTR ModuleName; 100 HANDLE hFile; 101 PUCHAR MappedAddress; 102 #ifdef _IMAGEHLP64 103 PIMAGE_NT_HEADERS64 FileHeader; 104 #else 105 PIMAGE_NT_HEADERS32 FileHeader; 106 #endif 107 PIMAGE_SECTION_HEADER LastRvaSection; 108 ULONG NumberOfSections; 109 PIMAGE_SECTION_HEADER Sections; 110 ULONG Characteristics; 111 BOOLEAN fSystemImage; 112 BOOLEAN fDOSImage; 113 BOOLEAN fReadOnly; 114 UCHAR Version; 115 LIST_ENTRY Links; 116 ULONG SizeOfImage; 117 } LOADED_IMAGE, *PLOADED_IMAGE; 118 119 /************************* 120 * IMAGEHLP equiv * 121 *************************/ 122 123 typedef enum 124 { 125 AddrMode1616, 126 AddrMode1632, 127 AddrModeReal, 128 AddrModeFlat 129 } ADDRESS_MODE; 130 131 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 132 #define ADDRESS ADDRESS64 133 #define LPADDRESS LPADDRESS64 134 #else 135 typedef struct _tagADDRESS 136 { 137 DWORD Offset; 138 WORD Segment; 139 ADDRESS_MODE Mode; 140 } ADDRESS, *LPADDRESS; 141 #endif 142 143 typedef struct _tagADDRESS64 144 { 145 DWORD64 Offset; 146 WORD Segment; 147 ADDRESS_MODE Mode; 148 } ADDRESS64, *LPADDRESS64; 149 150 #define SYMF_OMAP_GENERATED 0x00000001 151 #define SYMF_OMAP_MODIFIED 0x00000002 152 #define SYMF_USER_GENERATED 0x00000004 153 #define SYMF_REGISTER 0x00000008 154 #define SYMF_REGREL 0x00000010 155 #define SYMF_FRAMEREL 0x00000020 156 #define SYMF_PARAMETER 0x00000040 157 #define SYMF_LOCAL 0x00000080 158 #define SYMF_CONSTANT 0x00000100 159 #define SYMF_EXPORT 0x00000200 160 #define SYMF_FORWARDER 0x00000400 161 #define SYMF_FUNCTION 0x00000800 162 #define SYMF_VIRTUAL 0x00001000 163 #define SYMF_THUNK 0x00002000 164 #define SYMF_TLSREL 0x00004000 165 166 typedef enum 167 { 168 SymNone = 0, 169 SymCoff, 170 SymCv, 171 SymPdb, 172 SymExport, 173 SymDeferred, 174 SymSym, 175 SymDia, 176 SymVirtual, 177 NumSymTypes 178 } SYM_TYPE; 179 180 #ifdef _NO_CVCONST_H 181 enum SymTagEnum 182 { 183 SymTagNull, 184 SymTagExe, 185 SymTagCompiland, 186 SymTagCompilandDetails, 187 SymTagCompilandEnv, 188 SymTagFunction, 189 SymTagBlock, 190 SymTagData, 191 SymTagAnnotation, 192 SymTagLabel, 193 SymTagPublicSymbol, 194 SymTagUDT, 195 SymTagEnum, 196 SymTagFunctionType, 197 SymTagPointerType, 198 SymTagArrayType, 199 SymTagBaseType, 200 SymTagTypedef, 201 SymTagBaseClass, 202 SymTagFriend, 203 SymTagFunctionArgType, 204 SymTagFuncDebugStart, 205 SymTagFuncDebugEnd, 206 SymTagUsingNamespace, 207 SymTagVTableShape, 208 SymTagVTable, 209 SymTagCustom, 210 SymTagThunk, 211 SymTagCustomType, 212 SymTagManagedType, 213 SymTagDimension, 214 SymTagCallSite, 215 SymTagInlineSite, 216 SymTagBaseInterface, 217 SymTagVectorType, 218 SymTagMatrixType, 219 SymTagHLSLType, 220 SymTagCaller, 221 SymTagCallee, 222 SymTagExport, 223 SymTagHeapAllocationSite, 224 SymTagCoffGroup, 225 SymTagMax 226 }; 227 #endif // _NO_CVCONST_H 228 229 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 230 #define IMAGEHLP_SYMBOL IMAGEHLP_SYMBOL64 231 #define IMAGEHLP_SYMBOLW IMAGEHLP_SYMBOLW64 232 #define PIMAGEHLP_SYMBOL PIMAGEHLP_SYMBOL64 233 #define PIMAGEHLP_SYMBOLW PIMAGEHLP_SYMBOLW64 234 #else 235 typedef struct _IMAGEHLP_SYMBOL 236 { 237 DWORD SizeOfStruct; 238 DWORD Address; 239 DWORD Size; 240 DWORD Flags; 241 DWORD MaxNameLength; 242 CHAR Name[1]; 243 } IMAGEHLP_SYMBOL, *PIMAGEHLP_SYMBOL; 244 245 typedef struct _IMAGEHLP_SYMBOLW 246 { 247 DWORD SizeOfStruct; 248 DWORD Address; 249 DWORD Size; 250 DWORD Flags; 251 DWORD MaxNameLength; 252 WCHAR Name[1]; 253 } IMAGEHLP_SYMBOLW, *PIMAGEHLP_SYMBOLW; 254 #endif 255 256 typedef struct _IMAGEHLP_SYMBOL64 257 { 258 DWORD SizeOfStruct; 259 DWORD64 Address; 260 DWORD Size; 261 DWORD Flags; 262 DWORD MaxNameLength; 263 CHAR Name[1]; 264 } IMAGEHLP_SYMBOL64, *PIMAGEHLP_SYMBOL64; 265 266 typedef struct _IMAGEHLP_SYMBOLW64 267 { 268 DWORD SizeOfStruct; 269 DWORD64 Address; 270 DWORD Size; 271 DWORD Flags; 272 DWORD MaxNameLength; 273 WCHAR Name[1]; 274 } IMAGEHLP_SYMBOLW64, *PIMAGEHLP_SYMBOLW64; 275 276 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 277 #define IMAGEHLP_MODULE IMAGEHLP_MODULE64 278 #define PIMAGEHLP_MODULE PIMAGEHLP_MODULE64 279 #define IMAGEHLP_MODULEW IMAGEHLP_MODULEW64 280 #define PIMAGEHLP_MODULEW PIMAGEHLP_MODULEW64 281 #else 282 typedef struct _IMAGEHLP_MODULE 283 { 284 DWORD SizeOfStruct; 285 DWORD BaseOfImage; 286 DWORD ImageSize; 287 DWORD TimeDateStamp; 288 DWORD CheckSum; 289 DWORD NumSyms; 290 SYM_TYPE SymType; 291 CHAR ModuleName[32]; 292 CHAR ImageName[256]; 293 CHAR LoadedImageName[256]; 294 } IMAGEHLP_MODULE, *PIMAGEHLP_MODULE; 295 296 typedef struct _IMAGEHLP_MODULEW 297 { 298 DWORD SizeOfStruct; 299 DWORD BaseOfImage; 300 DWORD ImageSize; 301 DWORD TimeDateStamp; 302 DWORD CheckSum; 303 DWORD NumSyms; 304 SYM_TYPE SymType; 305 WCHAR ModuleName[32]; 306 WCHAR ImageName[256]; 307 WCHAR LoadedImageName[256]; 308 } IMAGEHLP_MODULEW, *PIMAGEHLP_MODULEW; 309 #endif 310 311 typedef struct _IMAGEHLP_MODULE64 312 { 313 DWORD SizeOfStruct; 314 DWORD64 BaseOfImage; 315 DWORD ImageSize; 316 DWORD TimeDateStamp; 317 DWORD CheckSum; 318 DWORD NumSyms; 319 SYM_TYPE SymType; 320 CHAR ModuleName[32]; 321 CHAR ImageName[256]; 322 CHAR LoadedImageName[256]; 323 CHAR LoadedPdbName[256]; 324 DWORD CVSig; 325 CHAR CVData[MAX_PATH*3]; 326 DWORD PdbSig; 327 GUID PdbSig70; 328 DWORD PdbAge; 329 BOOL PdbUnmatched; 330 BOOL DbgUnmatched; 331 BOOL LineNumbers; 332 BOOL GlobalSymbols; 333 BOOL TypeInfo; 334 BOOL SourceIndexed; 335 BOOL Publics; 336 } IMAGEHLP_MODULE64, *PIMAGEHLP_MODULE64; 337 338 typedef struct _IMAGEHLP_MODULEW64 339 { 340 DWORD SizeOfStruct; 341 DWORD64 BaseOfImage; 342 DWORD ImageSize; 343 DWORD TimeDateStamp; 344 DWORD CheckSum; 345 DWORD NumSyms; 346 SYM_TYPE SymType; 347 WCHAR ModuleName[32]; 348 WCHAR ImageName[256]; 349 WCHAR LoadedImageName[256]; 350 WCHAR LoadedPdbName[256]; 351 DWORD CVSig; 352 WCHAR CVData[MAX_PATH*3]; 353 DWORD PdbSig; 354 GUID PdbSig70; 355 DWORD PdbAge; 356 BOOL PdbUnmatched; 357 BOOL DbgUnmatched; 358 BOOL LineNumbers; 359 BOOL GlobalSymbols; 360 BOOL TypeInfo; 361 BOOL SourceIndexed; 362 BOOL Publics; 363 } IMAGEHLP_MODULEW64, *PIMAGEHLP_MODULEW64; 364 365 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 366 #define IMAGEHLP_LINE IMAGEHLP_LINE64 367 #define PIMAGEHLP_LINE PIMAGEHLP_LINE64 368 #define IMAGEHLP_LINEW IMAGEHLP_LINEW64 369 #define PIMAGEHLP_LINEW PIMAGEHLP_LINEW64 370 #else 371 typedef struct _IMAGEHLP_LINE 372 { 373 DWORD SizeOfStruct; 374 PVOID Key; 375 DWORD LineNumber; 376 PCHAR FileName; 377 DWORD Address; 378 } IMAGEHLP_LINE, *PIMAGEHLP_LINE; 379 380 typedef struct _IMAGEHLP_LINEW 381 { 382 DWORD SizeOfStruct; 383 PVOID Key; 384 DWORD LineNumber; 385 PWSTR FileName; 386 DWORD Address; 387 } IMAGEHLP_LINEW, *PIMAGEHLP_LINEW; 388 #endif 389 390 typedef struct _IMAGEHLP_LINE64 391 { 392 DWORD SizeOfStruct; 393 PVOID Key; 394 DWORD LineNumber; 395 PCHAR FileName; 396 DWORD64 Address; 397 } IMAGEHLP_LINE64, *PIMAGEHLP_LINE64; 398 399 typedef struct _IMAGEHLP_LINEW64 400 { 401 DWORD SizeOfStruct; 402 PVOID Key; 403 DWORD LineNumber; 404 PWSTR FileName; 405 DWORD64 Address; 406 } IMAGEHLP_LINEW64, *PIMAGEHLP_LINEW64; 407 408 typedef struct _SOURCEFILE 409 { 410 DWORD64 ModBase; 411 PCHAR FileName; 412 } SOURCEFILE, *PSOURCEFILE; 413 414 typedef struct _SOURCEFILEW 415 { 416 DWORD64 ModBase; 417 PWSTR FileName; 418 } SOURCEFILEW, *PSOURCEFILEW; 419 420 #define CBA_DEFERRED_SYMBOL_LOAD_START 0x00000001 421 #define CBA_DEFERRED_SYMBOL_LOAD_COMPLETE 0x00000002 422 #define CBA_DEFERRED_SYMBOL_LOAD_FAILURE 0x00000003 423 #define CBA_SYMBOLS_UNLOADED 0x00000004 424 #define CBA_DUPLICATE_SYMBOL 0x00000005 425 #define CBA_READ_MEMORY 0x00000006 426 #define CBA_DEFERRED_SYMBOL_LOAD_CANCEL 0x00000007 427 #define CBA_SET_OPTIONS 0x00000008 428 #define CBA_EVENT 0x00000010 429 #define CBA_DEFERRED_SYMBOL_LOAD_PARTIAL 0x00000020 430 #define CBA_DEBUG_INFO 0x10000000 431 432 typedef struct _IMAGEHLP_CBA_READ_MEMORY 433 { 434 DWORD64 addr; 435 PVOID buf; 436 DWORD bytes; 437 DWORD *bytesread; 438 } IMAGEHLP_CBA_READ_MEMORY, *PIMAGEHLP_CBA_READ_MEMORY; 439 440 enum 441 { 442 sevInfo = 0, 443 sevProblem, 444 sevAttn, 445 sevFatal, 446 sevMax 447 }; 448 449 #define EVENT_SRCSPEW_START 100 450 #define EVENT_SRCSPEW 100 451 #define EVENT_SRCSPEW_END 199 452 453 typedef struct _IMAGEHLP_CBA_EVENT 454 { 455 DWORD severity; 456 DWORD code; 457 PCHAR desc; 458 PVOID object; 459 } IMAGEHLP_CBA_EVENT, *PIMAGEHLP_CBA_EVENT; 460 461 typedef struct _IMAGEHLP_CBA_EVENTW 462 { 463 DWORD severity; 464 DWORD code; 465 PCWSTR desc; 466 PVOID object; 467 } IMAGEHLP_CBA_EVENTW, *PIMAGEHLP_CBA_EVENTW; 468 469 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 470 #define IMAGEHLP_DEFERRED_SYMBOL_LOAD IMAGEHLP_DEFERRED_SYMBOL_LOAD64 471 #define PIMAGEHLP_DEFERRED_SYMBOL_LOAD PIMAGEHLP_DEFERRED_SYMBOL_LOAD64 472 #else 473 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD 474 { 475 DWORD SizeOfStruct; 476 DWORD BaseOfImage; 477 DWORD CheckSum; 478 DWORD TimeDateStamp; 479 CHAR FileName[MAX_PATH]; 480 BOOLEAN Reparse; 481 HANDLE hFile; 482 } IMAGEHLP_DEFERRED_SYMBOL_LOAD, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD; 483 #endif 484 485 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOAD64 486 { 487 DWORD SizeOfStruct; 488 DWORD64 BaseOfImage; 489 DWORD CheckSum; 490 DWORD TimeDateStamp; 491 CHAR FileName[MAX_PATH]; 492 BOOLEAN Reparse; 493 HANDLE hFile; 494 DWORD Flags; 495 } IMAGEHLP_DEFERRED_SYMBOL_LOAD64, *PIMAGEHLP_DEFERRED_SYMBOL_LOAD64; 496 497 typedef struct _IMAGEHLP_DEFERRED_SYMBOL_LOADW64 498 { 499 DWORD SizeOfStruct; 500 DWORD64 BaseOfImage; 501 DWORD CheckSum; 502 DWORD TimeDateStamp; 503 WCHAR FileName[MAX_PATH + 1]; 504 BOOLEAN Reparse; 505 HANDLE hFile; 506 DWORD Flags; 507 } IMAGEHLP_DEFERRED_SYMBOL_LOADW64, *PIMAGEHLP_DEFERRED_SYMBOL_LOADW64; 508 509 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 510 #define IMAGEHLP_DUPLICATE_SYMBOL IMAGEHLP_DUPLICATE_SYMBOL64 511 #define PIMAGEHLP_DUPLICATE_SYMBOL PIMAGEHLP_DUPLICATE_SYMBOL64 512 #else 513 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL 514 { 515 DWORD SizeOfStruct; 516 DWORD NumberOfDups; 517 PIMAGEHLP_SYMBOL Symbol; 518 DWORD SelectedSymbol; 519 } IMAGEHLP_DUPLICATE_SYMBOL, *PIMAGEHLP_DUPLICATE_SYMBOL; 520 #endif 521 522 typedef struct _IMAGEHLP_DUPLICATE_SYMBOL64 523 { 524 DWORD SizeOfStruct; 525 DWORD NumberOfDups; 526 PIMAGEHLP_SYMBOL64 Symbol; 527 DWORD SelectedSymbol; 528 } IMAGEHLP_DUPLICATE_SYMBOL64, *PIMAGEHLP_DUPLICATE_SYMBOL64; 529 530 #define SYMOPT_CASE_INSENSITIVE 0x00000001 531 #define SYMOPT_UNDNAME 0x00000002 532 #define SYMOPT_DEFERRED_LOADS 0x00000004 533 #define SYMOPT_NO_CPP 0x00000008 534 #define SYMOPT_LOAD_LINES 0x00000010 535 #define SYMOPT_OMAP_FIND_NEAREST 0x00000020 536 #define SYMOPT_LOAD_ANYTHING 0x00000040 537 #define SYMOPT_IGNORE_CVREC 0x00000080 538 #define SYMOPT_NO_UNQUALIFIED_LOADS 0x00000100 539 #define SYMOPT_FAIL_CRITICAL_ERRORS 0x00000200 540 #define SYMOPT_EXACT_SYMBOLS 0x00000400 541 #define SYMOPT_WILD_UNDERSCORE 0x00000800 542 #define SYMOPT_USE_DEFAULTS 0x00001000 543 #define SYMOPT_ALLOW_ABSOLUTE_SYMBOLS 0x00000800 544 #define SYMOPT_IGNORE_NT_SYMPATH 0x00001000 545 #define SYMOPT_INCLUDE_32BIT_MODULES 0x00002000 546 #define SYMOPT_PUBLICS_ONLY 0x00004000 547 #define SYMOPT_NO_PUBLICS 0x00008000 548 #define SYMOPT_AUTO_PUBLICS 0x00010000 549 #define SYMOPT_NO_IMAGE_SEARCH 0x00020000 550 #define SYMOPT_SECURE 0x00040000 551 #define SYMOPT_NO_PROMPTS 0x00080000 552 #define SYMOPT_OVERWRITE 0x00100000 553 #define SYMOPT_IGNORE_IMAGEDIR 0x00200000 554 #define SYMOPT_FLAT_DIRECTORY 0x00400000 555 #define SYMOPT_FAVOR_COMPRESSED 0x00800000 556 #define SYMOPT_ALLOW_ZERO_ADDRESS 0x01000000 557 #define SYMOPT_DISABLE_SYMSRV_AUTODETECT 0x02000000 558 #define SYMOPT_READONLY_CACHE 0x04000000 559 #define SYMOPT_SYMPATH_LAST 0x08000000 560 #define SYMOPT_DEBUG 0x80000000 561 562 typedef struct _IMAGEHLP_STACK_FRAME 563 { 564 ULONG64 InstructionOffset; 565 ULONG64 ReturnOffset; 566 ULONG64 FrameOffset; 567 ULONG64 StackOffset; 568 ULONG64 BackingStoreOffset; 569 ULONG64 FuncTableEntry; 570 ULONG64 Params[4]; 571 ULONG64 Reserved[5]; 572 BOOL Virtual; 573 ULONG Reserved2; 574 } IMAGEHLP_STACK_FRAME, *PIMAGEHLP_STACK_FRAME; 575 576 typedef VOID IMAGEHLP_CONTEXT, *PIMAGEHLP_CONTEXT; 577 578 #define DBHHEADER_DEBUGDIRS 0x1 579 typedef struct _DBGHELP_MODLOAD_DATA 580 { 581 DWORD ssize; 582 DWORD ssig; 583 PVOID data; 584 DWORD size; 585 DWORD flags; 586 } MODLOAD_DATA, *PMODLOAD_DATA; 587 588 /************************* 589 * MiniDUMP * 590 *************************/ 591 592 #include <pshpack4.h> 593 /* DebugHelp */ 594 595 #define MINIDUMP_SIGNATURE 0x504D444D /* 'MDMP' */ 596 #define MINIDUMP_VERSION (42899) 597 598 typedef DWORD RVA; 599 typedef ULONG64 RVA64; 600 601 typedef enum _MINIDUMP_TYPE 602 { 603 MiniDumpNormal = 0x0000, 604 MiniDumpWithDataSegs = 0x0001, 605 MiniDumpWithFullMemory = 0x0002, 606 MiniDumpWithHandleData = 0x0004, 607 MiniDumpFilterMemory = 0x0008, 608 MiniDumpScanMemory = 0x0010, 609 MiniDumpWithUnloadedModules = 0x0020, 610 MiniDumpWithIndirectlyReferencedMemory = 0x0040, 611 MiniDumpFilterModulePaths = 0x0080, 612 MiniDumpWithProcessThreadData = 0x0100, 613 MiniDumpWithPrivateReadWriteMemory = 0x0200, 614 MiniDumpWithoutOptionalData = 0x0400, 615 MiniDumpWithFullMemoryInfo = 0x0800, 616 MiniDumpWithThreadInfo = 0x1000, 617 MiniDumpWithCodeSegs = 0x2000 618 } MINIDUMP_TYPE; 619 620 typedef enum _MINIDUMP_CALLBACK_TYPE 621 { 622 ModuleCallback, 623 ThreadCallback, 624 ThreadExCallback, 625 IncludeThreadCallback, 626 IncludeModuleCallback, 627 MemoryCallback, 628 } MINIDUMP_CALLBACK_TYPE; 629 630 typedef struct _MINIDUMP_THREAD_CALLBACK 631 { 632 ULONG ThreadId; 633 HANDLE ThreadHandle; 634 CONTEXT Context; 635 ULONG SizeOfContext; 636 ULONG64 StackBase; 637 ULONG64 StackEnd; 638 } MINIDUMP_THREAD_CALLBACK, *PMINIDUMP_THREAD_CALLBACK; 639 640 typedef struct _MINIDUMP_THREAD_EX_CALLBACK 641 { 642 ULONG ThreadId; 643 HANDLE ThreadHandle; 644 CONTEXT Context; 645 ULONG SizeOfContext; 646 ULONG64 StackBase; 647 ULONG64 StackEnd; 648 ULONG64 BackingStoreBase; 649 ULONG64 BackingStoreEnd; 650 } MINIDUMP_THREAD_EX_CALLBACK, *PMINIDUMP_THREAD_EX_CALLBACK; 651 652 typedef struct _MINIDUMP_INCLUDE_THREAD_CALLBACK 653 { 654 ULONG ThreadId; 655 } MINIDUMP_INCLUDE_THREAD_CALLBACK, *PMINIDUMP_INCLUDE_THREAD_CALLBACK; 656 657 typedef enum _THREAD_WRITE_FLAGS 658 { 659 ThreadWriteThread = 0x0001, 660 ThreadWriteStack = 0x0002, 661 ThreadWriteContext = 0x0004, 662 ThreadWriteBackingStore = 0x0008, 663 ThreadWriteInstructionWindow = 0x0010, 664 ThreadWriteThreadData = 0x0020, 665 ThreadWriteThreadInfo = 0x0040 666 } THREAD_WRITE_FLAGS; 667 668 typedef struct _MINIDUMP_MODULE_CALLBACK 669 { 670 PWCHAR FullPath; 671 ULONG64 BaseOfImage; 672 ULONG SizeOfImage; 673 ULONG CheckSum; 674 ULONG TimeDateStamp; 675 VS_FIXEDFILEINFO VersionInfo; 676 PVOID CvRecord; 677 ULONG SizeOfCvRecord; 678 PVOID MiscRecord; 679 ULONG SizeOfMiscRecord; 680 } MINIDUMP_MODULE_CALLBACK, *PMINIDUMP_MODULE_CALLBACK; 681 682 typedef struct _MINIDUMP_INCLUDE_MODULE_CALLBACK 683 { 684 ULONG64 BaseOfImage; 685 } MINIDUMP_INCLUDE_MODULE_CALLBACK, *PMINIDUMP_INCLUDE_MODULE_CALLBACK; 686 687 typedef enum _MODULE_WRITE_FLAGS 688 { 689 ModuleWriteModule = 0x0001, 690 ModuleWriteDataSeg = 0x0002, 691 ModuleWriteMiscRecord = 0x0004, 692 ModuleWriteCvRecord = 0x0008, 693 ModuleReferencedByMemory = 0x0010, 694 ModuleWriteTlsData = 0x0020, 695 ModuleWriteCodeSegs = 0x0040, 696 } MODULE_WRITE_FLAGS; 697 698 typedef struct _MINIDUMP_CALLBACK_INPUT 699 { 700 ULONG ProcessId; 701 HANDLE ProcessHandle; 702 ULONG CallbackType; 703 union 704 { 705 MINIDUMP_THREAD_CALLBACK Thread; 706 MINIDUMP_THREAD_EX_CALLBACK ThreadEx; 707 MINIDUMP_MODULE_CALLBACK Module; 708 MINIDUMP_INCLUDE_THREAD_CALLBACK IncludeThread; 709 MINIDUMP_INCLUDE_MODULE_CALLBACK IncludeModule; 710 } DUMMYUNIONNAME; 711 } MINIDUMP_CALLBACK_INPUT, *PMINIDUMP_CALLBACK_INPUT; 712 713 typedef struct _MINIDUMP_CALLBACK_OUTPUT 714 { 715 union 716 { 717 ULONG ModuleWriteFlags; 718 ULONG ThreadWriteFlags; 719 struct 720 { 721 ULONG64 MemoryBase; 722 ULONG MemorySize; 723 } DUMMYSTRUCTNAME; 724 } DUMMYUNIONNAME; 725 } MINIDUMP_CALLBACK_OUTPUT, *PMINIDUMP_CALLBACK_OUTPUT; 726 727 typedef BOOL 728 (WINAPI* MINIDUMP_CALLBACK_ROUTINE)( 729 _Inout_ PVOID, 730 _In_ const PMINIDUMP_CALLBACK_INPUT, 731 _Inout_ PMINIDUMP_CALLBACK_OUTPUT); 732 733 typedef struct _MINIDUMP_CALLBACK_INFORMATION 734 { 735 MINIDUMP_CALLBACK_ROUTINE CallbackRoutine; 736 void* CallbackParam; 737 } MINIDUMP_CALLBACK_INFORMATION, *PMINIDUMP_CALLBACK_INFORMATION; 738 739 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR 740 { 741 ULONG DataSize; 742 RVA Rva; 743 } MINIDUMP_LOCATION_DESCRIPTOR; 744 745 typedef struct _MINIDUMP_LOCATION_DESCRIPTOR64 746 { 747 ULONG64 DataSize; 748 RVA64 Rva; 749 } MINIDUMP_LOCATION_DESCRIPTOR64; 750 751 typedef struct _MINIDUMP_DIRECTORY 752 { 753 ULONG StreamType; 754 MINIDUMP_LOCATION_DESCRIPTOR Location; 755 } MINIDUMP_DIRECTORY, *PMINIDUMP_DIRECTORY; 756 757 typedef struct _MINIDUMP_EXCEPTION 758 { 759 ULONG ExceptionCode; 760 ULONG ExceptionFlags; 761 ULONG64 ExceptionRecord; 762 ULONG64 ExceptionAddress; 763 ULONG NumberParameters; 764 ULONG __unusedAlignment; 765 ULONG64 ExceptionInformation[EXCEPTION_MAXIMUM_PARAMETERS]; 766 } MINIDUMP_EXCEPTION, *PMINIDUMP_EXCEPTION; 767 768 typedef struct _MINIDUMP_EXCEPTION_INFORMATION 769 { 770 DWORD ThreadId; 771 PEXCEPTION_POINTERS ExceptionPointers; 772 BOOL ClientPointers; 773 } MINIDUMP_EXCEPTION_INFORMATION, *PMINIDUMP_EXCEPTION_INFORMATION; 774 775 typedef struct MINIDUMP_EXCEPTION_STREAM 776 { 777 ULONG ThreadId; 778 ULONG __alignment; 779 MINIDUMP_EXCEPTION ExceptionRecord; 780 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext; 781 } MINIDUMP_EXCEPTION_STREAM, *PMINIDUMP_EXCEPTION_STREAM; 782 783 typedef struct _MINIDUMP_HEADER 784 { 785 DWORD Signature; 786 DWORD Version; 787 DWORD NumberOfStreams; 788 RVA StreamDirectoryRva; 789 DWORD CheckSum; 790 union 791 { 792 DWORD Reserved; 793 DWORD TimeDateStamp; 794 } DUMMYUNIONNAME; 795 ULONG64 Flags; 796 } MINIDUMP_HEADER, *PMINIDUMP_HEADER; 797 798 typedef struct _MINIDUMP_MEMORY_DESCRIPTOR 799 { 800 ULONG64 StartOfMemoryRange; 801 MINIDUMP_LOCATION_DESCRIPTOR Memory; 802 } MINIDUMP_MEMORY_DESCRIPTOR, *PMINIDUMP_MEMORY_DESCRIPTOR; 803 804 typedef struct _MINIDUMP_MEMORY_LIST 805 { 806 ULONG NumberOfMemoryRanges; 807 MINIDUMP_MEMORY_DESCRIPTOR MemoryRanges[1]; /* FIXME: 0-sized array not supported */ 808 } MINIDUMP_MEMORY_LIST, *PMINIDUMP_MEMORY_LIST; 809 810 #define MINIDUMP_MISC1_PROCESS_ID 0x00000001 811 #define MINIDUMP_MISC1_PROCESS_TIMES 0x00000002 812 813 typedef struct _MINIDUMP_MISC_INFO 814 { 815 ULONG SizeOfInfo; 816 ULONG Flags1; 817 ULONG ProcessId; 818 ULONG ProcessCreateTime; 819 ULONG ProcessUserTime; 820 ULONG ProcessKernelTime; 821 } MINIDUMP_MISC_INFO, *PMINIDUMP_MISC_INFO; 822 823 typedef struct _MINIDUMP_MODULE 824 { 825 ULONG64 BaseOfImage; 826 ULONG SizeOfImage; 827 ULONG CheckSum; 828 ULONG TimeDateStamp; 829 RVA ModuleNameRva; 830 VS_FIXEDFILEINFO VersionInfo; 831 MINIDUMP_LOCATION_DESCRIPTOR CvRecord; 832 MINIDUMP_LOCATION_DESCRIPTOR MiscRecord; 833 ULONG64 Reserved0; 834 ULONG64 Reserved1; 835 } MINIDUMP_MODULE, *PMINIDUMP_MODULE; 836 837 typedef struct _MINIDUMP_MODULE_LIST 838 { 839 ULONG NumberOfModules; 840 MINIDUMP_MODULE Modules[1]; /* FIXME: 0-sized array not supported */ 841 } MINIDUMP_MODULE_LIST, *PMINIDUMP_MODULE_LIST; 842 843 typedef struct _MINIDUMP_STRING 844 { 845 ULONG Length; 846 WCHAR Buffer[1]; /* FIXME: O-sized array not supported */ 847 } MINIDUMP_STRING, *PMINIDUMP_STRING; 848 849 typedef struct _MINIDUMP_SYSTEM_INFO 850 { 851 USHORT ProcessorArchitecture; 852 USHORT ProcessorLevel; 853 USHORT ProcessorRevision; 854 union 855 { 856 USHORT Reserved0; 857 struct 858 { 859 UCHAR NumberOfProcessors; 860 UCHAR ProductType; 861 } DUMMYSTRUCTNAME; 862 } DUMMYUNIONNAME; 863 864 ULONG MajorVersion; 865 ULONG MinorVersion; 866 ULONG BuildNumber; 867 ULONG PlatformId; 868 869 RVA CSDVersionRva; 870 union 871 { 872 ULONG Reserved1; 873 struct 874 { 875 USHORT SuiteMask; 876 USHORT Reserved2; 877 } DUMMYSTRUCTNAME; 878 } DUMMYUNIONNAME1; 879 union _CPU_INFORMATION 880 { 881 struct 882 { 883 ULONG VendorId[3]; 884 ULONG VersionInformation; 885 ULONG FeatureInformation; 886 ULONG AMDExtendedCpuFeatures; 887 } X86CpuInfo; 888 struct 889 { 890 ULONG64 ProcessorFeatures[2]; 891 } OtherCpuInfo; 892 } Cpu; 893 894 } MINIDUMP_SYSTEM_INFO, *PMINIDUMP_SYSTEM_INFO; 895 896 typedef struct _MINIDUMP_THREAD 897 { 898 ULONG ThreadId; 899 ULONG SuspendCount; 900 ULONG PriorityClass; 901 ULONG Priority; 902 ULONG64 Teb; 903 MINIDUMP_MEMORY_DESCRIPTOR Stack; 904 MINIDUMP_LOCATION_DESCRIPTOR ThreadContext; 905 } MINIDUMP_THREAD, *PMINIDUMP_THREAD; 906 907 typedef struct _MINIDUMP_THREAD_LIST 908 { 909 ULONG NumberOfThreads; 910 MINIDUMP_THREAD Threads[1]; /* FIXME: no support of 0 sized array */ 911 } MINIDUMP_THREAD_LIST, *PMINIDUMP_THREAD_LIST; 912 913 typedef struct _MINIDUMP_USER_STREAM 914 { 915 ULONG Type; 916 ULONG BufferSize; 917 void* Buffer; 918 } MINIDUMP_USER_STREAM, *PMINIDUMP_USER_STREAM; 919 920 typedef struct _MINIDUMP_USER_STREAM_INFORMATION 921 { 922 ULONG UserStreamCount; 923 PMINIDUMP_USER_STREAM UserStreamArray; 924 } MINIDUMP_USER_STREAM_INFORMATION, *PMINIDUMP_USER_STREAM_INFORMATION; 925 926 typedef enum _MINIDUMP_STREAM_TYPE 927 { 928 UnusedStream = 0, 929 ReservedStream0 = 1, 930 ReservedStream1 = 2, 931 ThreadListStream = 3, 932 ModuleListStream = 4, 933 MemoryListStream = 5, 934 ExceptionStream = 6, 935 SystemInfoStream = 7, 936 ThreadExListStream = 8, 937 Memory64ListStream = 9, 938 CommentStreamA = 10, 939 CommentStreamW = 11, 940 HandleDataStream = 12, 941 FunctionTableStream = 13, 942 UnloadedModuleListStream = 14, 943 MiscInfoStream = 15, 944 MemoryInfoListStream = 16, 945 ThreadInfoListStream = 17, 946 947 LastReservedStream = 0xffff 948 } MINIDUMP_STREAM_TYPE; 949 950 BOOL 951 WINAPI 952 MiniDumpWriteDump( 953 _In_ HANDLE, 954 _In_ DWORD, 955 _In_ HANDLE, 956 _In_ MINIDUMP_TYPE, 957 _In_opt_ PMINIDUMP_EXCEPTION_INFORMATION, 958 _In_opt_ PMINIDUMP_USER_STREAM_INFORMATION, 959 _In_opt_ PMINIDUMP_CALLBACK_INFORMATION); 960 961 BOOL 962 WINAPI 963 MiniDumpReadDumpStream( 964 _In_ PVOID, 965 _In_ ULONG, 966 _Outptr_result_maybenull_ PMINIDUMP_DIRECTORY*, 967 _Outptr_result_maybenull_ PVOID*, 968 _Out_opt_ ULONG*); 969 970 #include <poppack.h> 971 972 /************************* 973 * MODULE handling * 974 *************************/ 975 976 /* flags for SymLoadModuleEx */ 977 #define SLMFLAG_VIRTUAL 0x1 978 #define SLMFLAG_NO_SYMBOLS 0x4 979 980 typedef BOOL 981 (CALLBACK *PENUMLOADED_MODULES_CALLBACK64)( 982 _In_ PCSTR, 983 _In_ DWORD64, 984 _In_ ULONG, 985 _In_opt_ PVOID); 986 987 BOOL 988 WINAPI 989 EnumerateLoadedModules64( 990 _In_ HANDLE, 991 _In_ PENUMLOADED_MODULES_CALLBACK64, 992 _In_opt_ PVOID); 993 994 typedef BOOL 995 (CALLBACK *PENUMLOADED_MODULES_CALLBACKW64)( 996 _In_ PCWSTR, 997 _In_ DWORD64, 998 _In_ ULONG, 999 _In_opt_ PVOID); 1000 1001 BOOL 1002 WINAPI 1003 EnumerateLoadedModulesW64( 1004 _In_ HANDLE, 1005 _In_ PENUMLOADED_MODULES_CALLBACKW64, 1006 _In_opt_ PVOID); 1007 1008 typedef BOOL 1009 (CALLBACK *PSYM_ENUMMODULES_CALLBACK64)( 1010 _In_ PCSTR, 1011 _In_ DWORD64, 1012 _In_opt_ PVOID); 1013 1014 BOOL 1015 WINAPI 1016 SymEnumerateModules64( 1017 _In_ HANDLE, 1018 _In_ PSYM_ENUMMODULES_CALLBACK64, 1019 _In_opt_ PVOID); 1020 1021 typedef BOOL 1022 (CALLBACK *PSYM_ENUMMODULES_CALLBACKW64)( 1023 _In_ PCWSTR, 1024 _In_ DWORD64, 1025 _In_opt_ PVOID); 1026 1027 BOOL 1028 WINAPI 1029 SymEnumerateModulesW64( 1030 _In_ HANDLE, 1031 _In_ PSYM_ENUMMODULES_CALLBACKW64, 1032 _In_opt_ PVOID); 1033 1034 BOOL 1035 WINAPI 1036 SymGetModuleInfo64( 1037 _In_ HANDLE, 1038 _In_ DWORD64, 1039 _Out_ PIMAGEHLP_MODULE64); 1040 1041 BOOL 1042 WINAPI 1043 SymGetModuleInfoW64( 1044 _In_ HANDLE, 1045 _In_ DWORD64, 1046 _Out_ PIMAGEHLP_MODULEW64); 1047 1048 DWORD64 WINAPI SymGetModuleBase64(_In_ HANDLE, _In_ DWORD64); 1049 1050 DWORD64 1051 WINAPI 1052 SymLoadModule64( 1053 _In_ HANDLE, 1054 _In_opt_ HANDLE, 1055 _In_opt_ PCSTR, 1056 _In_opt_ PCSTR, 1057 _In_ DWORD64, 1058 _In_ DWORD); 1059 1060 DWORD64 1061 WINAPI 1062 SymLoadModuleEx( 1063 _In_ HANDLE, 1064 _In_opt_ HANDLE, 1065 _In_opt_ PCSTR, 1066 _In_opt_ PCSTR, 1067 _In_ DWORD64, 1068 _In_ DWORD, 1069 _In_opt_ PMODLOAD_DATA, 1070 _In_opt_ DWORD); 1071 1072 DWORD64 1073 WINAPI 1074 SymLoadModuleExW( 1075 _In_ HANDLE, 1076 _In_opt_ HANDLE, 1077 _In_opt_ PCWSTR, 1078 _In_opt_ PCWSTR, 1079 _In_ DWORD64, 1080 _In_ DWORD, 1081 _In_opt_ PMODLOAD_DATA, 1082 _In_opt_ DWORD); 1083 1084 BOOL WINAPI SymUnloadModule64(_In_ HANDLE, _In_ DWORD64); 1085 1086 /************************* 1087 * Symbol Handling * 1088 *************************/ 1089 1090 #define IMAGEHLP_SYMBOL_INFO_VALUEPRESENT 1 1091 #define IMAGEHLP_SYMBOL_INFO_REGISTER SYMF_REGISTER /* 0x08 */ 1092 #define IMAGEHLP_SYMBOL_INFO_REGRELATIVE SYMF_REGREL /* 0x10 */ 1093 #define IMAGEHLP_SYMBOL_INFO_FRAMERELATIVE SYMF_FRAMEREL /* 0x20 */ 1094 #define IMAGEHLP_SYMBOL_INFO_PARAMETER SYMF_PARAMETER /* 0x40 */ 1095 #define IMAGEHLP_SYMBOL_INFO_LOCAL SYMF_LOCAL /* 0x80 */ 1096 #define IMAGEHLP_SYMBOL_INFO_CONSTANT SYMF_CONSTANT /* 0x100 */ 1097 #define IMAGEHLP_SYMBOL_FUNCTION SYMF_FUNCTION /* 0x800 */ 1098 1099 #define SYMFLAG_VALUEPRESENT 0x00000001 1100 #define SYMFLAG_REGISTER 0x00000008 1101 #define SYMFLAG_REGREL 0x00000010 1102 #define SYMFLAG_FRAMEREL 0x00000020 1103 #define SYMFLAG_PARAMETER 0x00000040 1104 #define SYMFLAG_LOCAL 0x00000080 1105 #define SYMFLAG_CONSTANT 0x00000100 1106 #define SYMFLAG_EXPORT 0x00000200 1107 #define SYMFLAG_FORWARDER 0x00000400 1108 #define SYMFLAG_FUNCTION 0x00000800 1109 #define SYMFLAG_VIRTUAL 0x00001000 1110 #define SYMFLAG_THUNK 0x00002000 1111 #define SYMFLAG_TLSREL 0x00004000 1112 #define SYMFLAG_SLOT 0x00008000 1113 #define SYMFLAG_ILREL 0x00010000 1114 #define SYMFLAG_METADATA 0x00020000 1115 #define SYMFLAG_CLR_TOKEN 0x00040000 1116 #define SYMFLAG_NULL 0x00080000 1117 #define SYMFLAG_FUNC_NO_RETURN 0x00100000 1118 #define SYMFLAG_SYNTHETIC_ZEROBASE 0x00200000 1119 #define SYMFLAG_PUBLIC_CODE 0x00400000 1120 1121 #define MAX_SYM_NAME 2000 1122 1123 typedef struct _SYMBOL_INFO 1124 { 1125 ULONG SizeOfStruct; 1126 ULONG TypeIndex; 1127 ULONG64 Reserved[2]; 1128 ULONG Index; 1129 ULONG Size; 1130 ULONG64 ModBase; 1131 ULONG Flags; 1132 ULONG64 Value; 1133 ULONG64 Address; 1134 ULONG Register; 1135 ULONG Scope; 1136 ULONG Tag; 1137 ULONG NameLen; 1138 ULONG MaxNameLen; 1139 CHAR Name[1]; 1140 } SYMBOL_INFO, *PSYMBOL_INFO; 1141 1142 typedef struct _SYMBOL_INFOW 1143 { 1144 ULONG SizeOfStruct; 1145 ULONG TypeIndex; 1146 ULONG64 Reserved[2]; 1147 ULONG Index; 1148 ULONG Size; 1149 ULONG64 ModBase; 1150 ULONG Flags; 1151 ULONG64 Value; 1152 ULONG64 Address; 1153 ULONG Register; 1154 ULONG Scope; 1155 ULONG Tag; 1156 ULONG NameLen; 1157 ULONG MaxNameLen; 1158 WCHAR Name[1]; 1159 } SYMBOL_INFOW, *PSYMBOL_INFOW; 1160 1161 typedef struct _SYMBOL_INFO_PACKAGE 1162 { 1163 SYMBOL_INFO si; 1164 CHAR name[MAX_SYM_NAME+1]; 1165 } SYMBOL_INFO_PACKAGE, *PSYMBOL_INFO_PACKAGE; 1166 1167 typedef struct _SYMBOL_INFO_PACKAGEW 1168 { 1169 SYMBOL_INFOW si; 1170 WCHAR name[MAX_SYM_NAME+1]; 1171 } SYMBOL_INFO_PACKAGEW, *PSYMBOL_INFO_PACKAGEW; 1172 1173 typedef enum _IMAGEHLP_SYMBOL_TYPE_INFO 1174 { 1175 TI_GET_SYMTAG, 1176 TI_GET_SYMNAME, 1177 TI_GET_LENGTH, 1178 TI_GET_TYPE, 1179 TI_GET_TYPEID, 1180 TI_GET_BASETYPE, 1181 TI_GET_ARRAYINDEXTYPEID, 1182 TI_FINDCHILDREN, 1183 TI_GET_DATAKIND, 1184 TI_GET_ADDRESSOFFSET, 1185 TI_GET_OFFSET, 1186 TI_GET_VALUE, 1187 TI_GET_COUNT, 1188 TI_GET_CHILDRENCOUNT, 1189 TI_GET_BITPOSITION, 1190 TI_GET_VIRTUALBASECLASS, 1191 TI_GET_VIRTUALTABLESHAPEID, 1192 TI_GET_VIRTUALBASEPOINTEROFFSET, 1193 TI_GET_CLASSPARENTID, 1194 TI_GET_NESTED, 1195 TI_GET_SYMINDEX, 1196 TI_GET_LEXICALPARENT, 1197 TI_GET_ADDRESS, 1198 TI_GET_THISADJUST, 1199 TI_GET_UDTKIND, 1200 TI_IS_EQUIV_TO, 1201 TI_GET_CALLING_CONVENTION, 1202 } IMAGEHLP_SYMBOL_TYPE_INFO; 1203 1204 #define IMAGEHLP_GET_TYPE_INFO_UNCACHED 0x00000001 1205 #define IMAGEHLP_GET_TYPE_INFO_CHILDREN 0x00000002 1206 typedef struct _IMAGEHLP_GET_TYPE_INFO_PARAMS 1207 { 1208 ULONG SizeOfStruct; 1209 ULONG Flags; 1210 ULONG NumIds; 1211 PULONG TypeIds; 1212 ULONG64 TagFilter; 1213 ULONG NumReqs; 1214 IMAGEHLP_SYMBOL_TYPE_INFO* ReqKinds; 1215 PULONG_PTR ReqOffsets; 1216 PULONG ReqSizes; 1217 ULONG_PTR ReqStride; 1218 ULONG_PTR BufferSize; 1219 PVOID Buffer; 1220 ULONG EntriesMatched; 1221 ULONG EntriesFilled; 1222 ULONG64 TagsFound; 1223 ULONG64 AllReqsValid; 1224 ULONG NumReqsValid; 1225 PULONG64 ReqsValid; 1226 } IMAGEHLP_GET_TYPE_INFO_PARAMS, *PIMAGEHLP_GET_TYPE_INFO_PARAMS; 1227 1228 typedef struct _TI_FINDCHILDREN_PARAMS 1229 { 1230 ULONG Count; 1231 ULONG Start; 1232 ULONG ChildId[1]; 1233 } TI_FINDCHILDREN_PARAMS; 1234 1235 #define UNDNAME_COMPLETE (0x0000) 1236 #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) 1237 #define UNDNAME_NO_MS_KEYWORDS (0x0002) 1238 #define UNDNAME_NO_FUNCTION_RETURNS (0x0004) 1239 #define UNDNAME_NO_ALLOCATION_MODEL (0x0008) 1240 #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) 1241 #define UNDNAME_NO_MS_THISTYPE (0x0020) 1242 #define UNDNAME_NO_CV_THISTYPE (0x0040) 1243 #define UNDNAME_NO_THISTYPE (0x0060) 1244 #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) 1245 #define UNDNAME_NO_THROW_SIGNATURES (0x0100) 1246 #define UNDNAME_NO_MEMBER_TYPE (0x0200) 1247 #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) 1248 #define UNDNAME_32_BIT_DECODE (0x0800) 1249 #define UNDNAME_NAME_ONLY (0x1000) 1250 #define UNDNAME_NO_ARGUMENTS (0x2000) 1251 #define UNDNAME_NO_SPECIAL_SYMS (0x4000) 1252 1253 #define SYMSEARCH_MASKOBJS 0x01 1254 #define SYMSEARCH_RECURSE 0x02 1255 #define SYMSEARCH_GLOBALSONLY 0x04 1256 1257 BOOL 1258 WINAPI 1259 SymGetTypeInfo( 1260 _In_ HANDLE, 1261 _In_ DWORD64, 1262 _In_ ULONG, 1263 _In_ IMAGEHLP_SYMBOL_TYPE_INFO, 1264 _Out_ PVOID); 1265 1266 BOOL 1267 WINAPI 1268 SymGetTypeInfoEx( 1269 _In_ HANDLE, 1270 _In_ DWORD64, 1271 _Inout_ PIMAGEHLP_GET_TYPE_INFO_PARAMS); 1272 1273 typedef BOOL 1274 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACK)( 1275 _In_ PSYMBOL_INFO, 1276 _In_ ULONG, 1277 _In_opt_ PVOID); 1278 1279 typedef BOOL 1280 (CALLBACK *PSYM_ENUMERATESYMBOLS_CALLBACKW)( 1281 _In_ PSYMBOL_INFOW, 1282 _In_ ULONG, 1283 _In_opt_ PVOID); 1284 1285 BOOL 1286 WINAPI 1287 SymEnumTypes( 1288 _In_ HANDLE, 1289 _In_ ULONG64, 1290 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, 1291 _In_opt_ PVOID); 1292 1293 BOOL 1294 WINAPI 1295 SymEnumTypesW( 1296 _In_ HANDLE, 1297 _In_ ULONG64, 1298 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, 1299 _In_opt_ PVOID); 1300 1301 BOOL 1302 WINAPI 1303 SymFromAddr( 1304 _In_ HANDLE, 1305 _In_ DWORD64, 1306 _Out_opt_ DWORD64*, 1307 _Inout_ SYMBOL_INFO*); 1308 1309 BOOL 1310 WINAPI 1311 SymFromAddrW( 1312 _In_ HANDLE, 1313 _In_ DWORD64, 1314 _Out_opt_ DWORD64*, 1315 _Inout_ SYMBOL_INFOW*); 1316 1317 BOOL 1318 WINAPI 1319 SymFromToken( 1320 _In_ HANDLE, 1321 _In_ DWORD64, 1322 _In_ DWORD, 1323 _Inout_ PSYMBOL_INFO); 1324 1325 BOOL 1326 WINAPI 1327 SymFromTokenW( 1328 _In_ HANDLE, 1329 _In_ DWORD64, 1330 _In_ DWORD, 1331 _Inout_ PSYMBOL_INFOW); 1332 1333 BOOL WINAPI SymFromName(_In_ HANDLE, _In_ PCSTR, _Inout_ PSYMBOL_INFO); 1334 BOOL WINAPI SymFromNameW(_In_ HANDLE, _In_ PCWSTR, _Inout_ PSYMBOL_INFOW); 1335 1336 BOOL 1337 WINAPI 1338 SymGetSymFromAddr64( 1339 _In_ HANDLE, 1340 _In_ DWORD64, 1341 _Out_opt_ PDWORD64, 1342 _Inout_ PIMAGEHLP_SYMBOL64); 1343 1344 BOOL 1345 WINAPI 1346 SymGetSymFromName64( 1347 _In_ HANDLE, 1348 _In_ PCSTR, 1349 _Inout_ PIMAGEHLP_SYMBOL64); 1350 1351 BOOL 1352 WINAPI 1353 SymGetTypeFromName( 1354 _In_ HANDLE, 1355 _In_ ULONG64, 1356 _In_ PCSTR, 1357 _Inout_ PSYMBOL_INFO); 1358 1359 BOOL 1360 WINAPI 1361 SymGetTypeFromNameW( 1362 _In_ HANDLE, 1363 _In_ ULONG64, 1364 _In_ PCWSTR, 1365 _Inout_ PSYMBOL_INFOW); 1366 1367 BOOL WINAPI SymGetSymNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64); 1368 BOOL WINAPI SymGetSymNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64); 1369 BOOL WINAPI SymGetSymPrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL64); 1370 BOOL WINAPI SymGetSymPrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW64); 1371 1372 BOOL 1373 WINAPI 1374 SymEnumSym( 1375 _In_ HANDLE, 1376 _In_ ULONG64, 1377 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, 1378 _In_opt_ PVOID); 1379 1380 BOOL 1381 WINAPI 1382 SymEnumSymbols( 1383 _In_ HANDLE, 1384 _In_ ULONG64, 1385 _In_opt_ PCSTR, 1386 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, 1387 _In_opt_ PVOID); 1388 1389 BOOL 1390 WINAPI 1391 SymEnumSymbolsW( 1392 _In_ HANDLE, 1393 _In_ ULONG64, 1394 _In_opt_ PCWSTR, 1395 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, 1396 _In_opt_ PVOID); 1397 1398 typedef BOOL 1399 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64)( 1400 _In_ PCSTR, 1401 _In_ DWORD64, 1402 _In_ ULONG, 1403 _In_opt_ PVOID); 1404 1405 typedef BOOL 1406 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK64W)( 1407 _In_ PCWSTR, 1408 _In_ DWORD64, 1409 _In_ ULONG, 1410 _In_opt_ PVOID); 1411 1412 BOOL 1413 WINAPI 1414 SymEnumerateSymbols64( 1415 _In_ HANDLE, 1416 _In_ ULONG64, 1417 _In_ PSYM_ENUMSYMBOLS_CALLBACK64, 1418 _In_opt_ PVOID); 1419 1420 BOOL 1421 WINAPI 1422 SymEnumerateSymbolsW64( 1423 _In_ HANDLE, 1424 _In_ ULONG64, 1425 _In_ PSYM_ENUMSYMBOLS_CALLBACK64W, 1426 _In_opt_ PVOID); 1427 1428 BOOL 1429 WINAPI 1430 SymEnumSymbolsForAddr( 1431 _In_ HANDLE, 1432 _In_ DWORD64, 1433 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, 1434 _In_opt_ PVOID); 1435 1436 BOOL 1437 WINAPI 1438 SymEnumSymbolsForAddrW( 1439 _In_ HANDLE, 1440 _In_ DWORD64, 1441 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, 1442 _In_opt_ PVOID); 1443 1444 typedef BOOL 1445 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK64)( 1446 _In_ HANDLE, 1447 _In_ ULONG, 1448 _In_opt_ ULONG64, 1449 _In_opt_ ULONG64); 1450 1451 BOOL 1452 WINAPI 1453 SymRegisterCallback64( 1454 _In_ HANDLE, 1455 _In_ PSYMBOL_REGISTERED_CALLBACK64, 1456 _In_ ULONG64); 1457 1458 BOOL 1459 WINAPI 1460 SymRegisterCallbackW64( 1461 _In_ HANDLE, 1462 _In_ PSYMBOL_REGISTERED_CALLBACK64, 1463 _In_ ULONG64); 1464 1465 BOOL 1466 WINAPI 1467 SymUnDName64( 1468 _In_ PIMAGEHLP_SYMBOL64, 1469 _Out_writes_(UnDecNameLength) PSTR, 1470 _In_ DWORD UnDecNameLength); 1471 1472 BOOL WINAPI SymMatchString(_In_ PCSTR, _In_ PCSTR, _In_ BOOL); 1473 BOOL WINAPI SymMatchStringA(_In_ PCSTR, _In_ PCSTR, _In_ BOOL); 1474 BOOL WINAPI SymMatchStringW(_In_ PCWSTR, _In_ PCWSTR, _In_ BOOL); 1475 1476 BOOL 1477 WINAPI 1478 SymSearch( 1479 _In_ HANDLE, 1480 _In_ ULONG64, 1481 _In_opt_ DWORD, 1482 _In_opt_ DWORD, 1483 _In_opt_ PCSTR, 1484 _In_opt_ DWORD64, 1485 _In_ PSYM_ENUMERATESYMBOLS_CALLBACK, 1486 _In_opt_ PVOID, 1487 _In_ DWORD); 1488 1489 BOOL 1490 WINAPI 1491 SymSearchW( 1492 _In_ HANDLE, 1493 _In_ ULONG64, 1494 _In_opt_ DWORD, 1495 _In_opt_ DWORD, 1496 _In_opt_ PCWSTR, 1497 _In_opt_ DWORD64, 1498 _In_ PSYM_ENUMERATESYMBOLS_CALLBACKW, 1499 _In_opt_ PVOID, 1500 _In_ DWORD); 1501 1502 DWORD 1503 WINAPI 1504 UnDecorateSymbolName( 1505 _In_ PCSTR, 1506 _Out_writes_(maxStringLength) PSTR, 1507 _In_ DWORD maxStringLength, 1508 _In_ DWORD); 1509 1510 DWORD 1511 WINAPI 1512 UnDecorateSymbolNameW( 1513 _In_ PCWSTR, 1514 _Out_writes_(maxStringLength) PWSTR, 1515 _In_ DWORD maxStringLength, 1516 _In_ DWORD); 1517 1518 BOOL 1519 WINAPI 1520 SymGetScope( 1521 _In_ HANDLE, 1522 _In_ ULONG64, 1523 _In_ DWORD, 1524 _Inout_ PSYMBOL_INFO); 1525 1526 BOOL 1527 WINAPI 1528 SymGetScopeW( 1529 _In_ HANDLE, 1530 _In_ ULONG64, 1531 _In_ DWORD, 1532 _Inout_ PSYMBOL_INFOW); 1533 1534 BOOL 1535 WINAPI 1536 SymFromIndex( 1537 _In_ HANDLE, 1538 _In_ ULONG64, 1539 _In_ DWORD, 1540 _Inout_ PSYMBOL_INFO); 1541 1542 BOOL 1543 WINAPI 1544 SymFromIndexW( 1545 _In_ HANDLE, 1546 _In_ ULONG64, 1547 _In_ DWORD, 1548 _Inout_ PSYMBOL_INFOW); 1549 1550 BOOL 1551 WINAPI 1552 SymAddSymbol( 1553 _In_ HANDLE, 1554 _In_ ULONG64, 1555 _In_ PCSTR, 1556 _In_ DWORD64, 1557 _In_ DWORD, 1558 _In_ DWORD); 1559 1560 BOOL 1561 WINAPI 1562 SymAddSymbolW( 1563 _In_ HANDLE, 1564 _In_ ULONG64, 1565 _In_ PCWSTR, 1566 _In_ DWORD64, 1567 _In_ DWORD, 1568 _In_ DWORD); 1569 1570 BOOL 1571 WINAPI 1572 SymDeleteSymbol( 1573 _In_ HANDLE, 1574 _In_ ULONG64, 1575 _In_opt_ PCSTR, 1576 _In_ DWORD64, 1577 _In_ DWORD); 1578 1579 BOOL 1580 WINAPI 1581 SymDeleteSymbolW( 1582 _In_ HANDLE, 1583 _In_ ULONG64, 1584 _In_opt_ PCWSTR, 1585 _In_ DWORD64, 1586 _In_ DWORD); 1587 1588 /************************* 1589 * Source Files * 1590 *************************/ 1591 1592 typedef BOOL 1593 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACK)( 1594 _In_ PSOURCEFILE, 1595 _In_opt_ PVOID); 1596 1597 typedef BOOL 1598 (CALLBACK *PSYM_ENUMSOURCEFILES_CALLBACKW)( 1599 _In_ PSOURCEFILEW, 1600 _In_opt_ PVOID); 1601 1602 BOOL 1603 WINAPI 1604 SymEnumSourceFiles( 1605 _In_ HANDLE, 1606 _In_ ULONG64, 1607 _In_opt_ PCSTR, 1608 _In_ PSYM_ENUMSOURCEFILES_CALLBACK, 1609 _In_opt_ PVOID); 1610 1611 BOOL 1612 WINAPI 1613 SymEnumSourceFilesW( 1614 _In_ HANDLE, 1615 _In_ ULONG64, 1616 _In_opt_ PCWSTR, 1617 _In_ PSYM_ENUMSOURCEFILES_CALLBACKW, 1618 _In_opt_ PVOID); 1619 1620 BOOL 1621 WINAPI 1622 SymGetLineFromAddr64( 1623 _In_ HANDLE, 1624 _In_ DWORD64, 1625 _Out_ PDWORD, 1626 _Out_ PIMAGEHLP_LINE64); 1627 1628 BOOL 1629 WINAPI 1630 SymGetLineFromAddrW64( 1631 _In_ HANDLE, 1632 _In_ DWORD64, 1633 _Out_ PDWORD, 1634 _Out_ PIMAGEHLP_LINEW64); 1635 1636 BOOL WINAPI SymGetLinePrev64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64); 1637 BOOL WINAPI SymGetLinePrevW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64); 1638 BOOL WINAPI SymGetLineNext64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE64); 1639 BOOL WINAPI SymGetLineNextW64(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW64); 1640 1641 BOOL 1642 WINAPI 1643 SymGetLineFromName64( 1644 _In_ HANDLE, 1645 _In_opt_ PCSTR, 1646 _In_opt_ PCSTR, 1647 _In_ DWORD, 1648 _Out_ PLONG, 1649 _Inout_ PIMAGEHLP_LINE64); 1650 1651 BOOL 1652 WINAPI 1653 SymGetLineFromNameW64( 1654 _In_ HANDLE, 1655 _In_opt_ PCWSTR, 1656 _In_opt_ PCWSTR, 1657 _In_ DWORD, 1658 _Out_ PLONG, 1659 _Inout_ PIMAGEHLP_LINEW64); 1660 1661 ULONG 1662 WINAPI 1663 SymGetFileLineOffsets64( 1664 _In_ HANDLE, 1665 _In_opt_ PCSTR, 1666 _In_ PCSTR, 1667 _Out_writes_(BufferLines) PDWORD64, 1668 _In_ ULONG BufferLines); 1669 1670 BOOL 1671 WINAPI 1672 SymGetSourceFile( 1673 _In_ HANDLE, 1674 _In_ ULONG64, 1675 _In_opt_ PCSTR, 1676 _In_ PCSTR, 1677 _Out_writes_(Size) PSTR, 1678 _In_ DWORD Size); 1679 1680 BOOL 1681 WINAPI 1682 SymGetSourceFileW( 1683 _In_ HANDLE, 1684 _In_ ULONG64, 1685 _In_opt_ PCWSTR, 1686 _In_ PCWSTR, 1687 _Out_writes_(Size) PWSTR, 1688 _In_ DWORD Size); 1689 1690 BOOL 1691 WINAPI 1692 SymGetSourceFileToken( 1693 _In_ HANDLE, 1694 _In_ ULONG64, 1695 _In_ PCSTR, 1696 _Outptr_ PVOID*, 1697 _Out_ DWORD*); 1698 1699 BOOL 1700 WINAPI 1701 SymGetSourceFileTokenW( 1702 _In_ HANDLE, 1703 _In_ ULONG64, 1704 _In_ PCWSTR, 1705 _Outptr_ PVOID*, 1706 _Out_ DWORD*); 1707 1708 BOOL 1709 WINAPI 1710 SymGetSourceFileFromToken( 1711 _In_ HANDLE, 1712 _In_ PVOID, 1713 _In_opt_ PCSTR, 1714 _Out_writes_(Size) PSTR, 1715 _In_ DWORD Size); 1716 1717 BOOL 1718 WINAPI 1719 SymGetSourceFileFromTokenW( 1720 _In_ HANDLE, 1721 _In_ PVOID, 1722 _In_opt_ PCWSTR, 1723 _Out_writes_(Size) PWSTR, 1724 _In_ DWORD Size); 1725 1726 BOOL 1727 WINAPI 1728 SymGetSourceVarFromToken( 1729 _In_ HANDLE, 1730 _In_ PVOID, 1731 _In_opt_ PCSTR, 1732 _In_ PCSTR, 1733 _Out_writes_(Size) PSTR, 1734 _In_ DWORD Size); 1735 1736 BOOL 1737 WINAPI 1738 SymGetSourceVarFromTokenW( 1739 _In_ HANDLE, 1740 _In_ PVOID, 1741 _In_opt_ PCWSTR, 1742 _In_ PCWSTR, 1743 _Out_writes_(Size) PWSTR, 1744 _In_ DWORD Size); 1745 1746 typedef struct _SRCCODEINFO 1747 { 1748 DWORD SizeOfStruct; 1749 PVOID Key; 1750 DWORD64 ModBase; 1751 CHAR Obj[MAX_PATH+1]; 1752 CHAR FileName[MAX_PATH+1]; 1753 DWORD LineNumber; 1754 DWORD64 Address; 1755 } SRCCODEINFO, *PSRCCODEINFO; 1756 1757 typedef struct _SRCCODEINFOW 1758 { 1759 DWORD SizeOfStruct; 1760 PVOID Key; 1761 DWORD64 ModBase; 1762 WCHAR Obj[MAX_PATH+1]; 1763 WCHAR FileName[MAX_PATH+1]; 1764 DWORD LineNumber; 1765 DWORD64 Address; 1766 } SRCCODEINFOW, *PSRCCODEINFOW; 1767 1768 typedef BOOL 1769 (CALLBACK* PSYM_ENUMLINES_CALLBACK)( 1770 _In_ PSRCCODEINFO, 1771 _In_opt_ PVOID); 1772 1773 typedef BOOL 1774 (CALLBACK* PSYM_ENUMLINES_CALLBACKW)( 1775 _In_ PSRCCODEINFOW, 1776 _In_opt_ PVOID); 1777 1778 BOOL 1779 WINAPI 1780 SymEnumLines( 1781 _In_ HANDLE, 1782 _In_ ULONG64, 1783 _In_opt_ PCSTR, 1784 _In_opt_ PCSTR, 1785 _In_ PSYM_ENUMLINES_CALLBACK, 1786 _In_opt_ PVOID); 1787 1788 BOOL 1789 WINAPI 1790 SymEnumLinesW( 1791 _In_ HANDLE, 1792 _In_ ULONG64, 1793 _In_opt_ PCWSTR, 1794 _In_opt_ PCWSTR, 1795 _In_ PSYM_ENUMLINES_CALLBACKW, 1796 _In_opt_ PVOID); 1797 1798 BOOL 1799 WINAPI 1800 SymEnumSourceLines( 1801 _In_ HANDLE, 1802 _In_ ULONG64, 1803 _In_opt_ PCSTR, 1804 _In_opt_ PCSTR, 1805 _In_opt_ DWORD, 1806 _In_ DWORD, 1807 _In_ PSYM_ENUMLINES_CALLBACK, 1808 _In_opt_ PVOID); 1809 1810 BOOL 1811 WINAPI 1812 SymEnumSourceLinesW( 1813 _In_ HANDLE, 1814 _In_ ULONG64, 1815 _In_opt_ PCWSTR, 1816 _In_opt_ PCWSTR, 1817 _In_opt_ DWORD, 1818 _In_ DWORD, 1819 _In_ PSYM_ENUMLINES_CALLBACKW, 1820 _In_opt_ PVOID); 1821 1822 /************************* 1823 * File & image handling * 1824 *************************/ 1825 1826 BOOL WINAPI SymInitialize(_In_ HANDLE, _In_opt_ PCSTR, _In_ BOOL); 1827 BOOL WINAPI SymInitializeW(_In_ HANDLE, _In_opt_ PCWSTR, _In_ BOOL); 1828 BOOL WINAPI SymCleanup(_In_ HANDLE); 1829 1830 HANDLE 1831 WINAPI 1832 FindDebugInfoFile( 1833 _In_ PCSTR, 1834 _In_ PCSTR, 1835 _Out_writes_(MAX_PATH + 1) PSTR); 1836 1837 typedef BOOL 1838 (CALLBACK *PFIND_DEBUG_FILE_CALLBACK)( 1839 _In_ HANDLE, 1840 _In_ PCSTR, 1841 _In_ PVOID); 1842 1843 typedef BOOL 1844 (CALLBACK *PFIND_DEBUG_FILE_CALLBACKW)( 1845 _In_ HANDLE, 1846 _In_ PCWSTR, 1847 _In_ PVOID); 1848 1849 HANDLE 1850 WINAPI 1851 FindDebugInfoFileEx( 1852 _In_ PCSTR, 1853 _In_ PCSTR, 1854 _Out_writes_(MAX_PATH + 1) PSTR, 1855 _In_opt_ PFIND_DEBUG_FILE_CALLBACK, 1856 _In_opt_ PVOID); 1857 1858 HANDLE 1859 WINAPI 1860 FindDebugInfoFileExW( 1861 _In_ PCWSTR, 1862 _In_ PCWSTR, 1863 _Out_writes_(MAX_PATH + 1) PWSTR, 1864 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW, 1865 _In_opt_ PVOID); 1866 1867 HANDLE 1868 WINAPI 1869 SymFindDebugInfoFile( 1870 _In_ HANDLE, 1871 _In_ PCSTR, 1872 _Out_writes_(MAX_PATH + 1) PSTR, 1873 _In_opt_ PFIND_DEBUG_FILE_CALLBACK, 1874 _In_opt_ PVOID); 1875 1876 HANDLE 1877 WINAPI 1878 SymFindDebugInfoFileW( 1879 _In_ HANDLE, 1880 _In_ PCWSTR, 1881 _Out_writes_(MAX_PATH + 1) PWSTR, 1882 _In_opt_ PFIND_DEBUG_FILE_CALLBACKW, 1883 _In_opt_ PVOID); 1884 1885 typedef BOOL 1886 (CALLBACK *PFINDFILEINPATHCALLBACK)( 1887 _In_ PCSTR, 1888 _In_ PVOID); 1889 1890 typedef BOOL 1891 (CALLBACK *PFINDFILEINPATHCALLBACKW)( 1892 _In_ PCWSTR, 1893 _In_ PVOID); 1894 1895 BOOL WINAPI FindFileInPath(HANDLE, PCSTR, PCSTR, PVOID, DWORD, DWORD, DWORD, 1896 PSTR, PFINDFILEINPATHCALLBACK, PVOID); 1897 1898 BOOL 1899 WINAPI 1900 SymFindFileInPath( 1901 _In_ HANDLE, 1902 _In_opt_ PCSTR, 1903 _In_ PCSTR, 1904 _In_opt_ PVOID, 1905 _In_ DWORD, 1906 _In_ DWORD, 1907 _In_ DWORD, 1908 _Out_writes_(MAX_PATH + 1) PSTR, 1909 _In_opt_ PFINDFILEINPATHCALLBACK, 1910 _In_opt_ PVOID); 1911 1912 BOOL 1913 WINAPI 1914 SymFindFileInPathW( 1915 _In_ HANDLE, 1916 _In_opt_ PCWSTR, 1917 _In_ PCWSTR, 1918 _In_opt_ PVOID, 1919 _In_ DWORD, 1920 _In_ DWORD, 1921 _In_ DWORD, 1922 _Out_writes_(MAX_PATH + 1) PWSTR, 1923 _In_opt_ PFINDFILEINPATHCALLBACKW, 1924 _In_opt_ PVOID); 1925 1926 HANDLE 1927 WINAPI 1928 FindExecutableImage( 1929 _In_ PCSTR, 1930 _In_ PCSTR, 1931 _Out_writes_(MAX_PATH + 1) PSTR); 1932 1933 typedef BOOL 1934 (CALLBACK *PFIND_EXE_FILE_CALLBACK)( 1935 _In_ HANDLE, 1936 _In_ PCSTR, 1937 _In_opt_ PVOID); 1938 1939 typedef BOOL 1940 (CALLBACK *PFIND_EXE_FILE_CALLBACKW)( 1941 _In_ HANDLE, 1942 _In_ PCWSTR, 1943 _In_opt_ PVOID); 1944 1945 HANDLE 1946 WINAPI 1947 FindExecutableImageEx( 1948 _In_ PCSTR, 1949 _In_ PCSTR, 1950 _Out_writes_(MAX_PATH + 1) PSTR, 1951 _In_opt_ PFIND_EXE_FILE_CALLBACK, 1952 _In_opt_ PVOID); 1953 1954 HANDLE 1955 WINAPI 1956 FindExecutableImageExW( 1957 _In_ PCWSTR, 1958 _In_ PCWSTR, 1959 _Out_writes_(MAX_PATH + 1) PWSTR, 1960 _In_opt_ PFIND_EXE_FILE_CALLBACKW, 1961 _In_opt_ PVOID); 1962 1963 HANDLE 1964 WINAPI 1965 SymFindExecutableImage( 1966 _In_ HANDLE, 1967 _In_ PCSTR, 1968 _Out_writes_(MAX_PATH + 1) PSTR, 1969 _In_ PFIND_EXE_FILE_CALLBACK, 1970 _In_ PVOID); 1971 1972 HANDLE 1973 WINAPI 1974 SymFindExecutableImageW( 1975 _In_ HANDLE, 1976 _In_ PCWSTR, 1977 _Out_writes_(MAX_PATH + 1) PWSTR, 1978 _In_ PFIND_EXE_FILE_CALLBACKW, 1979 _In_ PVOID); 1980 1981 PIMAGE_NT_HEADERS WINAPI ImageNtHeader(_In_ PVOID); 1982 1983 PVOID 1984 WINAPI 1985 ImageDirectoryEntryToDataEx( 1986 _In_ PVOID, 1987 _In_ BOOLEAN, 1988 _In_ USHORT, 1989 _Out_ PULONG, 1990 _Out_opt_ PIMAGE_SECTION_HEADER *); 1991 1992 PVOID 1993 WINAPI 1994 ImageDirectoryEntryToData( 1995 _In_ PVOID, 1996 _In_ BOOLEAN, 1997 _In_ USHORT, 1998 _Out_ PULONG); 1999 2000 PIMAGE_SECTION_HEADER 2001 WINAPI 2002 ImageRvaToSection( 2003 _In_ PIMAGE_NT_HEADERS, 2004 _In_ PVOID, 2005 _In_ ULONG); 2006 2007 PVOID 2008 WINAPI 2009 ImageRvaToVa( 2010 _In_ PIMAGE_NT_HEADERS, 2011 _In_ PVOID, 2012 _In_ ULONG, 2013 _In_opt_ PIMAGE_SECTION_HEADER*); 2014 2015 BOOL 2016 WINAPI 2017 SymGetSearchPath( 2018 _In_ HANDLE, 2019 _Out_writes_(SearchPathLength) PSTR, 2020 _In_ DWORD SearchPathLength); 2021 2022 BOOL 2023 WINAPI 2024 SymGetSearchPathW( 2025 _In_ HANDLE, 2026 _Out_writes_(SearchPathLength) PWSTR, 2027 _In_ DWORD SearchPathLength); 2028 2029 BOOL WINAPI SymSetSearchPath(_In_ HANDLE, _In_opt_ PCSTR); 2030 BOOL WINAPI SymSetSearchPathW(_In_ HANDLE, _In_opt_ PCWSTR); 2031 DWORD WINAPI GetTimestampForLoadedLibrary(_In_ HMODULE); 2032 BOOL WINAPI MakeSureDirectoryPathExists(_In_ PCSTR); 2033 2034 BOOL 2035 WINAPI 2036 SearchTreeForFile( 2037 _In_ PCSTR, 2038 _In_ PCSTR, 2039 _Out_writes_(MAX_PATH + 1) PSTR); 2040 2041 BOOL 2042 WINAPI 2043 SearchTreeForFileW( 2044 _In_ PCWSTR, 2045 _In_ PCWSTR, 2046 _Out_writes_(MAX_PATH + 1) PWSTR); 2047 2048 typedef BOOL 2049 (CALLBACK *PENUMDIRTREE_CALLBACK)( 2050 _In_ PCSTR, 2051 _In_opt_ PVOID); 2052 2053 typedef BOOL 2054 (CALLBACK *PENUMDIRTREE_CALLBACKW)( 2055 _In_ PCWSTR, 2056 _In_opt_ PVOID); 2057 2058 BOOL 2059 WINAPI 2060 EnumDirTree( 2061 _In_opt_ HANDLE, 2062 _In_ PCSTR, 2063 _In_ PCSTR, 2064 _Out_writes_opt_(MAX_PATH + 1) PSTR, 2065 _In_opt_ PENUMDIRTREE_CALLBACK, 2066 _In_opt_ PVOID); 2067 2068 BOOL 2069 WINAPI 2070 EnumDirTreeW( 2071 _In_opt_ HANDLE, 2072 _In_ PCWSTR, 2073 _In_ PCWSTR, 2074 _Out_writes_opt_(MAX_PATH + 1) PWSTR, 2075 _In_opt_ PENUMDIRTREE_CALLBACKW, 2076 _In_opt_ PVOID); 2077 2078 BOOL 2079 WINAPI 2080 SymMatchFileName( 2081 _In_ PCSTR, 2082 _In_ PCSTR, 2083 _Outptr_opt_ PSTR*, 2084 _Outptr_opt_ PSTR*); 2085 2086 BOOL 2087 WINAPI 2088 SymMatchFileNameW( 2089 _In_ PCWSTR, 2090 _In_ PCWSTR, 2091 _Outptr_opt_ PWSTR*, 2092 _Outptr_opt_ PWSTR*); 2093 2094 PCHAR WINAPI SymSetHomeDirectory(_In_opt_ HANDLE, _In_opt_ PCSTR); 2095 PWSTR WINAPI SymSetHomeDirectoryW(_In_opt_ HANDLE, _In_opt_ PCWSTR); 2096 2097 PCHAR 2098 WINAPI 2099 SymGetHomeDirectory( 2100 _In_ DWORD, 2101 _Out_writes_(size) PSTR, 2102 _In_ size_t size); 2103 2104 PWSTR 2105 WINAPI 2106 SymGetHomeDirectoryW( 2107 _In_ DWORD, 2108 _Out_writes_(size) PWSTR, 2109 _In_ size_t size); 2110 2111 #define hdBase 0 2112 #define hdSym 1 2113 #define hdSrc 2 2114 #define hdMax 3 2115 2116 /************************* 2117 * Context management * 2118 *************************/ 2119 2120 BOOL 2121 WINAPI 2122 SymSetContext( 2123 _In_ HANDLE, 2124 _In_ PIMAGEHLP_STACK_FRAME, 2125 _In_opt_ PIMAGEHLP_CONTEXT); 2126 2127 2128 /************************* 2129 * Stack management * 2130 *************************/ 2131 2132 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 2133 #define KDHELP KDHELP64 2134 #define PKDHELP PKDHELP64 2135 #else 2136 typedef struct _KDHELP 2137 { 2138 DWORD Thread; 2139 DWORD ThCallbackStack; 2140 DWORD NextCallback; 2141 DWORD FramePointer; 2142 DWORD KiCallUserMode; 2143 DWORD KeUserCallbackDispatcher; 2144 DWORD SystemRangeStart; 2145 } KDHELP, *PKDHELP; 2146 #endif 2147 2148 typedef struct _KDHELP64 2149 { 2150 DWORD64 Thread; 2151 DWORD ThCallbackStack; 2152 DWORD ThCallbackBStore; 2153 DWORD NextCallback; 2154 DWORD FramePointer; 2155 DWORD64 KiCallUserMode; 2156 DWORD64 KeUserCallbackDispatcher; 2157 DWORD64 SystemRangeStart; 2158 DWORD64 Reserved[8]; 2159 } KDHELP64, *PKDHELP64; 2160 2161 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 2162 #define STACKFRAME STACKFRAME64 2163 #define LPSTACKFRAME LPSTACKFRAME64 2164 #else 2165 typedef struct _STACKFRAME 2166 { 2167 ADDRESS AddrPC; 2168 ADDRESS AddrReturn; 2169 ADDRESS AddrFrame; 2170 ADDRESS AddrStack; 2171 PVOID FuncTableEntry; 2172 DWORD Params[4]; 2173 BOOL Far; 2174 BOOL Virtual; 2175 DWORD Reserved[3]; 2176 KDHELP KdHelp; 2177 ADDRESS AddrBStore; 2178 } STACKFRAME, *LPSTACKFRAME; 2179 #endif 2180 2181 typedef struct _STACKFRAME64 2182 { 2183 ADDRESS64 AddrPC; 2184 ADDRESS64 AddrReturn; 2185 ADDRESS64 AddrFrame; 2186 ADDRESS64 AddrStack; 2187 ADDRESS64 AddrBStore; 2188 PVOID FuncTableEntry; 2189 DWORD64 Params[4]; 2190 BOOL Far; 2191 BOOL Virtual; 2192 DWORD64 Reserved[3]; 2193 KDHELP64 KdHelp; 2194 } STACKFRAME64, *LPSTACKFRAME64; 2195 2196 typedef BOOL 2197 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE64)( 2198 _In_ HANDLE, 2199 _In_ DWORD64, 2200 _Out_writes_bytes_(nSize) PVOID, 2201 _In_ DWORD nSize, 2202 _Out_ PDWORD); 2203 2204 typedef PVOID 2205 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE64)( 2206 _In_ HANDLE, 2207 _In_ DWORD64); 2208 2209 typedef DWORD64 2210 (CALLBACK *PGET_MODULE_BASE_ROUTINE64)( 2211 _In_ HANDLE, 2212 _In_ DWORD64); 2213 2214 typedef DWORD64 2215 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE64)( 2216 _In_ HANDLE, 2217 _In_ HANDLE, 2218 _In_ LPADDRESS64); 2219 2220 BOOL 2221 WINAPI 2222 StackWalk64( 2223 _In_ DWORD, 2224 _In_ HANDLE, 2225 _In_ HANDLE, 2226 _Inout_ LPSTACKFRAME64, 2227 _Inout_ PVOID, 2228 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE64, 2229 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE64, 2230 _In_opt_ PGET_MODULE_BASE_ROUTINE64, 2231 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE64); 2232 2233 PVOID WINAPI SymFunctionTableAccess64(_In_ HANDLE, _In_ DWORD64); 2234 2235 typedef PVOID 2236 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK64)( 2237 _In_ HANDLE, 2238 _In_ ULONG64, 2239 _In_ ULONG64); 2240 2241 BOOL 2242 WINAPI 2243 SymRegisterFunctionEntryCallback64( 2244 _In_ HANDLE, 2245 _In_ PSYMBOL_FUNCENTRY_CALLBACK64, 2246 _In_ ULONG64); 2247 2248 /************************* 2249 * Version, global stuff * 2250 *************************/ 2251 2252 #define API_VERSION_NUMBER 9 2253 2254 typedef struct API_VERSION 2255 { 2256 USHORT MajorVersion; 2257 USHORT MinorVersion; 2258 USHORT Revision; 2259 USHORT Reserved; 2260 } API_VERSION, *LPAPI_VERSION; 2261 2262 LPAPI_VERSION WINAPI ImagehlpApiVersion(void); 2263 LPAPI_VERSION WINAPI ImagehlpApiVersionEx(_In_ LPAPI_VERSION); 2264 2265 typedef struct _IMAGE_DEBUG_INFORMATION 2266 { 2267 LIST_ENTRY List; 2268 DWORD ReservedSize; 2269 PVOID ReservedMappedBase; 2270 USHORT ReservedMachine; 2271 USHORT ReservedCharacteristics; 2272 DWORD ReservedCheckSum; 2273 DWORD ImageBase; 2274 DWORD SizeOfImage; 2275 DWORD ReservedNumberOfSections; 2276 PIMAGE_SECTION_HEADER ReservedSections; 2277 DWORD ReservedExportedNamesSize; 2278 PSTR ReservedExportedNames; 2279 DWORD ReservedNumberOfFunctionTableEntries; 2280 PIMAGE_FUNCTION_ENTRY ReservedFunctionTableEntries; 2281 DWORD ReservedLowestFunctionStartingAddress; 2282 DWORD ReservedHighestFunctionEndingAddress; 2283 DWORD ReservedNumberOfFpoTableEntries; 2284 PFPO_DATA ReservedFpoTableEntries; 2285 DWORD SizeOfCoffSymbols; 2286 PIMAGE_COFF_SYMBOLS_HEADER CoffSymbols; 2287 DWORD ReservedSizeOfCodeViewSymbols; 2288 PVOID ReservedCodeViewSymbols; 2289 PSTR ImageFilePath; 2290 PSTR ImageFileName; 2291 PSTR ReservedDebugFilePath; 2292 DWORD ReservedTimeDateStamp; 2293 BOOL ReservedRomImage; 2294 PIMAGE_DEBUG_DIRECTORY ReservedDebugDirectory; 2295 DWORD ReservedNumberOfDebugDirectories; 2296 DWORD ReservedOriginalFunctionTableBaseAddress; 2297 DWORD Reserved[ 2 ]; 2298 } IMAGE_DEBUG_INFORMATION, *PIMAGE_DEBUG_INFORMATION; 2299 2300 2301 PIMAGE_DEBUG_INFORMATION 2302 WINAPI 2303 MapDebugInformation( 2304 _In_opt_ HANDLE, 2305 _In_ PCSTR, 2306 _In_opt_ PCSTR, 2307 _In_ ULONG); 2308 2309 BOOL WINAPI UnmapDebugInformation(_Out_ PIMAGE_DEBUG_INFORMATION); 2310 2311 DWORD WINAPI SymGetOptions(void); 2312 DWORD WINAPI SymSetOptions(_In_ DWORD); 2313 2314 BOOL WINAPI SymSetParentWindow(_In_ HWND); 2315 2316 BOOL 2317 IMAGEAPI 2318 SymSrvIsStore( 2319 _In_opt_ HANDLE hProcess, 2320 _In_ PCSTR path); 2321 2322 BOOL 2323 IMAGEAPI 2324 SymSrvIsStoreW( 2325 _In_opt_ HANDLE hProcess, 2326 _In_ PCWSTR path); 2327 2328 /************************* 2329 * Version, global stuff * 2330 *************************/ 2331 2332 typedef BOOL (WINAPI* PSYMBOLSERVERPROC)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR); 2333 typedef BOOL (WINAPI* PSYMBOLSERVERPROCA)(PCSTR, PCSTR, PVOID, DWORD, DWORD, PSTR); 2334 typedef BOOL (WINAPI* PSYMBOLSERVERPROCW)(PCWSTR, PCWSTR, PVOID, DWORD, DWORD, PWSTR); 2335 typedef BOOL (WINAPI* PSYMBOLSERVEROPENPROC)(void); 2336 typedef BOOL (WINAPI* PSYMBOLSERVERCLOSEPROC)(void); 2337 typedef BOOL (WINAPI* PSYMBOLSERVERSETOPTIONSPROC)(UINT_PTR, ULONG64); 2338 typedef BOOL (CALLBACK* PSYMBOLSERVERCALLBACKPROC)(UINT_PTR, ULONG64, ULONG64); 2339 typedef UINT_PTR (WINAPI* PSYMBOLSERVERGETOPTIONSPROC)(void); 2340 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROC)(PCSTR); 2341 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCA)(PCSTR); 2342 typedef BOOL (WINAPI* PSYMBOLSERVERPINGPROCW)(PCWSTR); 2343 2344 #define SSRVOPT_CALLBACK 0x0001 2345 #define SSRVOPT_DWORD 0x0002 2346 #define SSRVOPT_DWORDPTR 0x0004 2347 #define SSRVOPT_GUIDPTR 0x0008 2348 #define SSRVOPT_OLDGUIDPTR 0x0010 2349 #define SSRVOPT_UNATTENDED 0x0020 2350 #define SSRVOPT_NOCOPY 0x0040 2351 #define SSRVOPT_PARENTWIN 0x0080 2352 #define SSRVOPT_PARAMTYPE 0x0100 2353 #define SSRVOPT_SECURE 0x0200 2354 #define SSRVOPT_TRACE 0x0400 2355 #define SSRVOPT_SETCONTEXT 0x0800 2356 #define SSRVOPT_PROXY 0x1000 2357 #define SSRVOPT_DOWNSTREAM_STORE 0x2000 2358 #define SSRVOPT_RESET ((ULONG_PTR)-1) 2359 2360 #define SSRVACTION_TRACE 1 2361 #define SSRVACTION_QUERYCANCEL 2 2362 #define SSRVACTION_EVENT 3 2363 2364 /* 32-bit functions */ 2365 2366 #if !defined(_IMAGEHLP_SOURCE_) && defined(_IMAGEHLP64) 2367 2368 #define PENUMLOADED_MODULES_CALLBACK PENUMLOADED_MODULES_CALLBACK64 2369 #define PFUNCTION_TABLE_ACCESS_ROUTINE PFUNCTION_TABLE_ACCESS_ROUTINE64 2370 #define PGET_MODULE_BASE_ROUTINE PGET_MODULE_BASE_ROUTINE64 2371 #define PREAD_PROCESS_MEMORY_ROUTINE PREAD_PROCESS_MEMORY_ROUTINE64 2372 #define PSYMBOL_FUNCENTRY_CALLBACK PSYMBOL_FUNCENTRY_CALLBACK64 2373 #define PSYMBOL_REGISTERED_CALLBACK PSYMBOL_REGISTERED_CALLBACK64 2374 #define PSYM_ENUMMODULES_CALLBACK PSYM_ENUMMODULES_CALLBACK64 2375 #define PSYM_ENUMSYMBOLS_CALLBACK PSYM_ENUMSYMBOLS_CALLBACK64 2376 #define PSYM_ENUMSYMBOLS_CALLBACKW PSYM_ENUMSYMBOLS_CALLBACKW64 2377 #define PTRANSLATE_ADDRESS_ROUTINE PTRANSLATE_ADDRESS_ROUTINE64 2378 2379 #define EnumerateLoadedModules EnumerateLoadedModules64 2380 #define StackWalk StackWalk64 2381 #define SymEnumerateModules SymEnumerateModules64 2382 #define SymEnumerateSymbols SymEnumerateSymbols64 2383 #define SymEnumerateSymbolsW SymEnumerateSymbolsW64 2384 #define SymFunctionTableAccess SymFunctionTableAccess64 2385 #define SymGetLineFromAddr SymGetLineFromAddr64 2386 #define SymGetLineFromAddrW SymGetLineFromAddrW64 2387 #define SymGetLineFromName SymGetLineFromName64 2388 #define SymGetLineNext SymGetLineNext64 2389 #define SymGetLineNextW SymGetLineNextW64 2390 #define SymGetLinePrev SymGetLinePrev64 2391 #define SymGetLinePrevW SymGetLinePrevW64 2392 #define SymGetModuleBase SymGetModuleBase64 2393 #define SymGetModuleInfo SymGetModuleInfo64 2394 #define SymGetModuleInfoW SymGetModuleInfoW64 2395 #define SymGetSymFromAddr SymGetSymFromAddr64 2396 #define SymGetSymFromName SymGetSymFromName64 2397 #define SymGetSymNext SymGetSymNext64 2398 #define SymGetSymNextW SymGetSymNextW64 2399 #define SymGetSymPrev SymGetSymPrev64 2400 #define SymGetSymPrevW SymGetSymPrevW64 2401 #define SymLoadModule SymLoadModule64 2402 #define SymRegisterCallback SymRegisterCallback64 2403 #define SymRegisterFunctionEntryCallback SymRegisterFunctionEntryCallback64 2404 #define SymUnDName SymUnDName64 2405 #define SymUnloadModule SymUnloadModule64 2406 2407 #else 2408 2409 typedef BOOL 2410 (CALLBACK *PENUMLOADED_MODULES_CALLBACK)( 2411 _In_ PCSTR, 2412 _In_ ULONG, 2413 _In_ ULONG, 2414 _In_opt_ PVOID); 2415 2416 typedef PVOID 2417 (CALLBACK *PFUNCTION_TABLE_ACCESS_ROUTINE)( 2418 _In_ HANDLE, 2419 _In_ DWORD); 2420 2421 typedef DWORD 2422 (CALLBACK *PGET_MODULE_BASE_ROUTINE)( 2423 _In_ HANDLE, 2424 _In_ DWORD); 2425 2426 typedef BOOL 2427 (CALLBACK *PREAD_PROCESS_MEMORY_ROUTINE)( 2428 _In_ HANDLE, 2429 _In_ DWORD, 2430 _Out_writes_bytes_(nSize) PVOID, 2431 _In_ DWORD nSize, 2432 _Out_ PDWORD); 2433 2434 typedef BOOL 2435 (CALLBACK *PSYM_ENUMMODULES_CALLBACK)( 2436 _In_ PCSTR, 2437 _In_ ULONG, 2438 _In_opt_ PVOID); 2439 2440 typedef BOOL 2441 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACK)( 2442 _In_ PCSTR, 2443 _In_ ULONG, 2444 _In_ ULONG, 2445 _In_opt_ PVOID); 2446 2447 typedef BOOL 2448 (CALLBACK *PSYM_ENUMSYMBOLS_CALLBACKW)( 2449 _In_ PCWSTR, 2450 _In_ ULONG, 2451 _In_ ULONG, 2452 _In_opt_ PVOID); 2453 2454 typedef BOOL 2455 (CALLBACK *PSYMBOL_REGISTERED_CALLBACK)( 2456 _In_ HANDLE, 2457 _In_ ULONG, 2458 _In_opt_ PVOID, 2459 _In_opt_ PVOID); 2460 2461 typedef PVOID 2462 (CALLBACK *PSYMBOL_FUNCENTRY_CALLBACK)( 2463 _In_ HANDLE, 2464 _In_ DWORD, 2465 _In_opt_ PVOID); 2466 2467 typedef DWORD 2468 (CALLBACK *PTRANSLATE_ADDRESS_ROUTINE)( 2469 _In_ HANDLE, 2470 _In_ HANDLE, 2471 _Out_ LPADDRESS); 2472 2473 BOOL 2474 WINAPI 2475 EnumerateLoadedModules( 2476 _In_ HANDLE, 2477 _In_ PENUMLOADED_MODULES_CALLBACK, 2478 _In_opt_ PVOID); 2479 2480 BOOL 2481 WINAPI 2482 StackWalk( 2483 _In_ DWORD, 2484 _In_ HANDLE, 2485 _In_ HANDLE, 2486 _Inout_ LPSTACKFRAME, 2487 _Inout_ PVOID, 2488 _In_opt_ PREAD_PROCESS_MEMORY_ROUTINE, 2489 _In_opt_ PFUNCTION_TABLE_ACCESS_ROUTINE, 2490 _In_opt_ PGET_MODULE_BASE_ROUTINE, 2491 _In_opt_ PTRANSLATE_ADDRESS_ROUTINE); 2492 2493 BOOL 2494 WINAPI 2495 SymEnumerateModules( 2496 _In_ HANDLE, 2497 _In_ PSYM_ENUMMODULES_CALLBACK, 2498 _In_opt_ PVOID); 2499 2500 BOOL 2501 WINAPI 2502 SymEnumerateSymbols( 2503 _In_ HANDLE, 2504 _In_ ULONG, 2505 _In_ PSYM_ENUMSYMBOLS_CALLBACK, 2506 _In_opt_ PVOID); 2507 2508 BOOL 2509 WINAPI 2510 SymEnumerateSymbolsW( 2511 _In_ HANDLE, 2512 _In_ ULONG, 2513 _In_ PSYM_ENUMSYMBOLS_CALLBACKW, 2514 _In_opt_ PVOID); 2515 2516 PVOID WINAPI SymFunctionTableAccess(_In_ HANDLE, _In_ DWORD); 2517 2518 BOOL 2519 WINAPI 2520 SymGetLineFromAddr( 2521 _In_ HANDLE, 2522 _In_ DWORD, 2523 _Out_ PDWORD, 2524 _Out_ PIMAGEHLP_LINE); 2525 2526 BOOL 2527 WINAPI 2528 SymGetLineFromAddrW( 2529 _In_ HANDLE, 2530 _In_ DWORD, 2531 _Out_ PDWORD, 2532 _Out_ PIMAGEHLP_LINEW); 2533 2534 BOOL 2535 WINAPI 2536 SymGetLineFromName( 2537 _In_ HANDLE, 2538 _In_opt_ PCSTR, 2539 _In_opt_ PCSTR, 2540 _In_ DWORD, 2541 _Out_ PLONG, 2542 _Inout_ PIMAGEHLP_LINE); 2543 2544 BOOL WINAPI SymGetLineNext(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE); 2545 BOOL WINAPI SymGetLineNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW); 2546 BOOL WINAPI SymGetLinePrev(_In_ HANDLE, _Inout_ PIMAGEHLP_LINE); 2547 BOOL WINAPI SymGetLinePrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_LINEW); 2548 DWORD WINAPI SymGetModuleBase(_In_ HANDLE, _In_ DWORD); 2549 2550 BOOL 2551 WINAPI 2552 SymGetModuleInfo( 2553 _In_ HANDLE, 2554 _In_ DWORD, 2555 _Out_ PIMAGEHLP_MODULE); 2556 2557 BOOL 2558 WINAPI 2559 SymGetModuleInfoW( 2560 _In_ HANDLE, 2561 _In_ DWORD, 2562 _Out_ PIMAGEHLP_MODULEW); 2563 2564 BOOL 2565 WINAPI 2566 SymGetSymFromAddr( 2567 _In_ HANDLE, 2568 _In_ DWORD, 2569 _Out_opt_ PDWORD, 2570 _Inout_ PIMAGEHLP_SYMBOL); 2571 2572 BOOL 2573 WINAPI 2574 SymGetSymFromName( 2575 _In_ HANDLE, 2576 _In_ PCSTR, 2577 _Inout_ PIMAGEHLP_SYMBOL); 2578 2579 BOOL WINAPI SymGetSymNext(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL); 2580 BOOL WINAPI SymGetSymNextW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW); 2581 BOOL WINAPI SymGetSymPrev(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOL); 2582 BOOL WINAPI SymGetSymPrevW(_In_ HANDLE, _Inout_ PIMAGEHLP_SYMBOLW); 2583 2584 DWORD 2585 WINAPI 2586 SymLoadModule( 2587 _In_ HANDLE, 2588 _In_opt_ HANDLE, 2589 _In_opt_ PCSTR, 2590 _In_opt_ PCSTR, 2591 _In_ DWORD, 2592 _In_ DWORD); 2593 2594 BOOL 2595 WINAPI 2596 SymRegisterCallback( 2597 _In_ HANDLE, 2598 _In_ PSYMBOL_REGISTERED_CALLBACK, 2599 _In_opt_ PVOID); 2600 2601 BOOL 2602 WINAPI 2603 SymRegisterFunctionEntryCallback( 2604 _In_ HANDLE, 2605 _In_ PSYMBOL_FUNCENTRY_CALLBACK, 2606 _In_opt_ PVOID); 2607 2608 BOOL WINAPI SymRefreshModuleList(_In_ HANDLE); 2609 2610 BOOL 2611 WINAPI 2612 SymUnDName( 2613 _In_ PIMAGEHLP_SYMBOL, 2614 _Out_writes_(UnDecNameLength) PSTR, 2615 _In_ DWORD UnDecNameLength); 2616 2617 BOOL WINAPI SymUnloadModule(_In_ HANDLE, _In_ DWORD); 2618 2619 #endif 2620 2621 #ifdef __cplusplus 2622 } /* extern "C" */ 2623 #endif /* defined(__cplusplus) */ 2624 2625 #endif /* __WINE_DBGHELP_H */ 2626