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