1 //===- NativeRawSymbol.cpp - Native implementation of IPDBRawSymbol -------===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h" 11 #include "llvm/DebugInfo/PDB/IPDBLineNumber.h" 12 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h" 13 #include "llvm/Support/FormatVariadic.h" 14 15 using namespace llvm; 16 using namespace llvm::pdb; 17 18 NativeRawSymbol::NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag, 19 SymIndexId SymbolId) 20 : Session(PDBSession), Tag(Tag), SymbolId(SymbolId) {} 21 22 void NativeRawSymbol::dump(raw_ostream &OS, int Indent) const { 23 dumpSymbolField(OS, "symIndexId", SymbolId, Indent); 24 dumpSymbolField(OS, "symTag", static_cast<uint32_t>(Tag), Indent); 25 } 26 27 std::unique_ptr<IPDBEnumSymbols> 28 NativeRawSymbol::findChildren(PDB_SymType Type) const { 29 return nullptr; 30 } 31 32 std::unique_ptr<IPDBEnumSymbols> 33 NativeRawSymbol::findChildren(PDB_SymType Type, StringRef Name, 34 PDB_NameSearchFlags Flags) const { 35 return nullptr; 36 } 37 38 std::unique_ptr<IPDBEnumSymbols> 39 NativeRawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name, 40 PDB_NameSearchFlags Flags, uint32_t Section, uint32_t Offset) const { 41 return nullptr; 42 } 43 44 std::unique_ptr<IPDBEnumSymbols> 45 NativeRawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name, 46 PDB_NameSearchFlags Flags, uint64_t VA) const { 47 return nullptr; 48 } 49 50 std::unique_ptr<IPDBEnumSymbols> 51 NativeRawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name, 52 PDB_NameSearchFlags Flags, uint32_t RVA) const { 53 return nullptr; 54 } 55 56 std::unique_ptr<IPDBEnumSymbols> 57 NativeRawSymbol::findInlineFramesByAddr(uint32_t Section, 58 uint32_t Offset) const { 59 return nullptr; 60 } 61 62 std::unique_ptr<IPDBEnumSymbols> 63 NativeRawSymbol::findInlineFramesByRVA(uint32_t RVA) const { 64 return nullptr; 65 } 66 67 std::unique_ptr<IPDBEnumSymbols> 68 NativeRawSymbol::findInlineFramesByVA(uint64_t VA) const { 69 return nullptr; 70 } 71 72 std::unique_ptr<IPDBEnumLineNumbers> 73 NativeRawSymbol::findInlineeLines() const { 74 return nullptr; 75 } 76 77 std::unique_ptr<IPDBEnumLineNumbers> 78 NativeRawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset, 79 uint32_t Length) const { 80 return nullptr; 81 } 82 83 std::unique_ptr<IPDBEnumLineNumbers> 84 NativeRawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const { 85 return nullptr; 86 } 87 88 std::unique_ptr<IPDBEnumLineNumbers> 89 NativeRawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const { 90 return nullptr; 91 } 92 93 void NativeRawSymbol::getDataBytes(SmallVector<uint8_t, 32> &bytes) const { 94 bytes.clear(); 95 } 96 97 PDB_MemberAccess NativeRawSymbol::getAccess() const { 98 return PDB_MemberAccess::Private; 99 } 100 101 uint32_t NativeRawSymbol::getAddressOffset() const { 102 return 0; 103 } 104 105 uint32_t NativeRawSymbol::getAddressSection() const { 106 return 0; 107 } 108 109 uint32_t NativeRawSymbol::getAge() const { 110 return 0; 111 } 112 113 uint32_t NativeRawSymbol::getArrayIndexTypeId() const { 114 return 0; 115 } 116 117 void NativeRawSymbol::getBackEndVersion(VersionInfo &Version) const { 118 Version.Major = 0; 119 Version.Minor = 0; 120 Version.Build = 0; 121 Version.QFE = 0; 122 } 123 124 uint32_t NativeRawSymbol::getBaseDataOffset() const { 125 return 0; 126 } 127 128 uint32_t NativeRawSymbol::getBaseDataSlot() const { 129 return 0; 130 } 131 132 uint32_t NativeRawSymbol::getBaseSymbolId() const { 133 return 0; 134 } 135 136 PDB_BuiltinType NativeRawSymbol::getBuiltinType() const { 137 return PDB_BuiltinType::None; 138 } 139 140 uint32_t NativeRawSymbol::getBitPosition() const { 141 return 0; 142 } 143 144 PDB_CallingConv NativeRawSymbol::getCallingConvention() const { 145 return PDB_CallingConv::FarStdCall; 146 } 147 148 uint32_t NativeRawSymbol::getClassParentId() const { 149 return 0; 150 } 151 152 std::string NativeRawSymbol::getCompilerName() const { 153 return {}; 154 } 155 156 uint32_t NativeRawSymbol::getCount() const { 157 return 0; 158 } 159 160 uint32_t NativeRawSymbol::getCountLiveRanges() const { 161 return 0; 162 } 163 164 void NativeRawSymbol::getFrontEndVersion(VersionInfo &Version) const { 165 Version.Major = 0; 166 Version.Minor = 0; 167 Version.Build = 0; 168 Version.QFE = 0; 169 } 170 171 PDB_Lang NativeRawSymbol::getLanguage() const { 172 return PDB_Lang::Cobol; 173 } 174 175 uint32_t NativeRawSymbol::getLexicalParentId() const { 176 return 0; 177 } 178 179 std::string NativeRawSymbol::getLibraryName() const { 180 return {}; 181 } 182 183 uint32_t NativeRawSymbol::getLiveRangeStartAddressOffset() const { 184 return 0; 185 } 186 187 uint32_t NativeRawSymbol::getLiveRangeStartAddressSection() const { 188 return 0; 189 } 190 191 uint32_t NativeRawSymbol::getLiveRangeStartRelativeVirtualAddress() const { 192 return 0; 193 } 194 195 codeview::RegisterId NativeRawSymbol::getLocalBasePointerRegisterId() const { 196 return codeview::RegisterId::EAX; 197 } 198 199 uint32_t NativeRawSymbol::getLowerBoundId() const { 200 return 0; 201 } 202 203 uint32_t NativeRawSymbol::getMemorySpaceKind() const { 204 return 0; 205 } 206 207 std::string NativeRawSymbol::getName() const { 208 return {}; 209 } 210 211 uint32_t NativeRawSymbol::getNumberOfAcceleratorPointerTags() const { 212 return 0; 213 } 214 215 uint32_t NativeRawSymbol::getNumberOfColumns() const { 216 return 0; 217 } 218 219 uint32_t NativeRawSymbol::getNumberOfModifiers() const { 220 return 0; 221 } 222 223 uint32_t NativeRawSymbol::getNumberOfRegisterIndices() const { 224 return 0; 225 } 226 227 uint32_t NativeRawSymbol::getNumberOfRows() const { 228 return 0; 229 } 230 231 std::string NativeRawSymbol::getObjectFileName() const { 232 return {}; 233 } 234 235 uint32_t NativeRawSymbol::getOemId() const { 236 return 0; 237 } 238 239 uint32_t NativeRawSymbol::getOemSymbolId() const { 240 return 0; 241 } 242 243 uint32_t NativeRawSymbol::getOffsetInUdt() const { 244 return 0; 245 } 246 247 PDB_Cpu NativeRawSymbol::getPlatform() const { 248 return PDB_Cpu::Intel8080; 249 } 250 251 uint32_t NativeRawSymbol::getRank() const { 252 return 0; 253 } 254 255 codeview::RegisterId NativeRawSymbol::getRegisterId() const { 256 return codeview::RegisterId::EAX; 257 } 258 259 uint32_t NativeRawSymbol::getRegisterType() const { 260 return 0; 261 } 262 263 uint32_t NativeRawSymbol::getRelativeVirtualAddress() const { 264 return 0; 265 } 266 267 uint32_t NativeRawSymbol::getSamplerSlot() const { 268 return 0; 269 } 270 271 uint32_t NativeRawSymbol::getSignature() const { 272 return 0; 273 } 274 275 uint32_t NativeRawSymbol::getSizeInUdt() const { 276 return 0; 277 } 278 279 uint32_t NativeRawSymbol::getSlot() const { 280 return 0; 281 } 282 283 std::string NativeRawSymbol::getSourceFileName() const { 284 return {}; 285 } 286 287 std::unique_ptr<IPDBLineNumber> 288 NativeRawSymbol::getSrcLineOnTypeDefn() const { 289 return nullptr; 290 } 291 292 uint32_t NativeRawSymbol::getStride() const { 293 return 0; 294 } 295 296 uint32_t NativeRawSymbol::getSubTypeId() const { 297 return 0; 298 } 299 300 std::string NativeRawSymbol::getSymbolsFileName() const { return {}; } 301 302 uint32_t NativeRawSymbol::getSymIndexId() const { return SymbolId; } 303 304 uint32_t NativeRawSymbol::getTargetOffset() const { 305 return 0; 306 } 307 308 uint32_t NativeRawSymbol::getTargetRelativeVirtualAddress() const { 309 return 0; 310 } 311 312 uint64_t NativeRawSymbol::getTargetVirtualAddress() const { 313 return 0; 314 } 315 316 uint32_t NativeRawSymbol::getTargetSection() const { 317 return 0; 318 } 319 320 uint32_t NativeRawSymbol::getTextureSlot() const { 321 return 0; 322 } 323 324 uint32_t NativeRawSymbol::getTimeStamp() const { 325 return 0; 326 } 327 328 uint32_t NativeRawSymbol::getToken() const { 329 return 0; 330 } 331 332 uint32_t NativeRawSymbol::getTypeId() const { 333 return 0; 334 } 335 336 uint32_t NativeRawSymbol::getUavSlot() const { 337 return 0; 338 } 339 340 std::string NativeRawSymbol::getUndecoratedName() const { 341 return {}; 342 } 343 344 std::string NativeRawSymbol::getUndecoratedNameEx( 345 PDB_UndnameFlags Flags) const { 346 return {}; 347 } 348 349 uint32_t NativeRawSymbol::getUnmodifiedTypeId() const { 350 return 0; 351 } 352 353 uint32_t NativeRawSymbol::getUpperBoundId() const { 354 return 0; 355 } 356 357 Variant NativeRawSymbol::getValue() const { 358 return Variant(); 359 } 360 361 uint32_t NativeRawSymbol::getVirtualBaseDispIndex() const { 362 return 0; 363 } 364 365 uint32_t NativeRawSymbol::getVirtualBaseOffset() const { 366 return 0; 367 } 368 369 uint32_t NativeRawSymbol::getVirtualTableShapeId() const { 370 return 0; 371 } 372 373 std::unique_ptr<PDBSymbolTypeBuiltin> 374 NativeRawSymbol::getVirtualBaseTableType() const { 375 return nullptr; 376 } 377 378 PDB_DataKind NativeRawSymbol::getDataKind() const { 379 return PDB_DataKind::Unknown; 380 } 381 382 PDB_SymType NativeRawSymbol::getSymTag() const { return Tag; } 383 384 codeview::GUID NativeRawSymbol::getGuid() const { return codeview::GUID{{0}}; } 385 386 int32_t NativeRawSymbol::getOffset() const { 387 return 0; 388 } 389 390 int32_t NativeRawSymbol::getThisAdjust() const { 391 return 0; 392 } 393 394 int32_t NativeRawSymbol::getVirtualBasePointerOffset() const { 395 return 0; 396 } 397 398 PDB_LocType NativeRawSymbol::getLocationType() const { 399 return PDB_LocType::Null; 400 } 401 402 PDB_Machine NativeRawSymbol::getMachineType() const { 403 return PDB_Machine::Invalid; 404 } 405 406 codeview::ThunkOrdinal NativeRawSymbol::getThunkOrdinal() const { 407 return codeview::ThunkOrdinal::Standard; 408 } 409 410 uint64_t NativeRawSymbol::getLength() const { 411 return 0; 412 } 413 414 uint64_t NativeRawSymbol::getLiveRangeLength() const { 415 return 0; 416 } 417 418 uint64_t NativeRawSymbol::getVirtualAddress() const { 419 return 0; 420 } 421 422 PDB_UdtType NativeRawSymbol::getUdtKind() const { 423 return PDB_UdtType::Struct; 424 } 425 426 bool NativeRawSymbol::hasConstructor() const { 427 return false; 428 } 429 430 bool NativeRawSymbol::hasCustomCallingConvention() const { 431 return false; 432 } 433 434 bool NativeRawSymbol::hasFarReturn() const { 435 return false; 436 } 437 438 bool NativeRawSymbol::isCode() const { 439 return false; 440 } 441 442 bool NativeRawSymbol::isCompilerGenerated() const { 443 return false; 444 } 445 446 bool NativeRawSymbol::isConstType() const { 447 return false; 448 } 449 450 bool NativeRawSymbol::isEditAndContinueEnabled() const { 451 return false; 452 } 453 454 bool NativeRawSymbol::isFunction() const { 455 return false; 456 } 457 458 bool NativeRawSymbol::getAddressTaken() const { 459 return false; 460 } 461 462 bool NativeRawSymbol::getNoStackOrdering() const { 463 return false; 464 } 465 466 bool NativeRawSymbol::hasAlloca() const { 467 return false; 468 } 469 470 bool NativeRawSymbol::hasAssignmentOperator() const { 471 return false; 472 } 473 474 bool NativeRawSymbol::hasCTypes() const { 475 return false; 476 } 477 478 bool NativeRawSymbol::hasCastOperator() const { 479 return false; 480 } 481 482 bool NativeRawSymbol::hasDebugInfo() const { 483 return false; 484 } 485 486 bool NativeRawSymbol::hasEH() const { 487 return false; 488 } 489 490 bool NativeRawSymbol::hasEHa() const { 491 return false; 492 } 493 494 bool NativeRawSymbol::hasInlAsm() const { 495 return false; 496 } 497 498 bool NativeRawSymbol::hasInlineAttribute() const { 499 return false; 500 } 501 502 bool NativeRawSymbol::hasInterruptReturn() const { 503 return false; 504 } 505 506 bool NativeRawSymbol::hasFramePointer() const { 507 return false; 508 } 509 510 bool NativeRawSymbol::hasLongJump() const { 511 return false; 512 } 513 514 bool NativeRawSymbol::hasManagedCode() const { 515 return false; 516 } 517 518 bool NativeRawSymbol::hasNestedTypes() const { 519 return false; 520 } 521 522 bool NativeRawSymbol::hasNoInlineAttribute() const { 523 return false; 524 } 525 526 bool NativeRawSymbol::hasNoReturnAttribute() const { 527 return false; 528 } 529 530 bool NativeRawSymbol::hasOptimizedCodeDebugInfo() const { 531 return false; 532 } 533 534 bool NativeRawSymbol::hasOverloadedOperator() const { 535 return false; 536 } 537 538 bool NativeRawSymbol::hasSEH() const { 539 return false; 540 } 541 542 bool NativeRawSymbol::hasSecurityChecks() const { 543 return false; 544 } 545 546 bool NativeRawSymbol::hasSetJump() const { 547 return false; 548 } 549 550 bool NativeRawSymbol::hasStrictGSCheck() const { 551 return false; 552 } 553 554 bool NativeRawSymbol::isAcceleratorGroupSharedLocal() const { 555 return false; 556 } 557 558 bool NativeRawSymbol::isAcceleratorPointerTagLiveRange() const { 559 return false; 560 } 561 562 bool NativeRawSymbol::isAcceleratorStubFunction() const { 563 return false; 564 } 565 566 bool NativeRawSymbol::isAggregated() const { 567 return false; 568 } 569 570 bool NativeRawSymbol::isIntroVirtualFunction() const { 571 return false; 572 } 573 574 bool NativeRawSymbol::isCVTCIL() const { 575 return false; 576 } 577 578 bool NativeRawSymbol::isConstructorVirtualBase() const { 579 return false; 580 } 581 582 bool NativeRawSymbol::isCxxReturnUdt() const { 583 return false; 584 } 585 586 bool NativeRawSymbol::isDataAligned() const { 587 return false; 588 } 589 590 bool NativeRawSymbol::isHLSLData() const { 591 return false; 592 } 593 594 bool NativeRawSymbol::isHotpatchable() const { 595 return false; 596 } 597 598 bool NativeRawSymbol::isIndirectVirtualBaseClass() const { 599 return false; 600 } 601 602 bool NativeRawSymbol::isInterfaceUdt() const { 603 return false; 604 } 605 606 bool NativeRawSymbol::isIntrinsic() const { 607 return false; 608 } 609 610 bool NativeRawSymbol::isLTCG() const { 611 return false; 612 } 613 614 bool NativeRawSymbol::isLocationControlFlowDependent() const { 615 return false; 616 } 617 618 bool NativeRawSymbol::isMSILNetmodule() const { 619 return false; 620 } 621 622 bool NativeRawSymbol::isMatrixRowMajor() const { 623 return false; 624 } 625 626 bool NativeRawSymbol::isManagedCode() const { 627 return false; 628 } 629 630 bool NativeRawSymbol::isMSILCode() const { 631 return false; 632 } 633 634 bool NativeRawSymbol::isMultipleInheritance() const { 635 return false; 636 } 637 638 bool NativeRawSymbol::isNaked() const { 639 return false; 640 } 641 642 bool NativeRawSymbol::isNested() const { 643 return false; 644 } 645 646 bool NativeRawSymbol::isOptimizedAway() const { 647 return false; 648 } 649 650 bool NativeRawSymbol::isPacked() const { 651 return false; 652 } 653 654 bool NativeRawSymbol::isPointerBasedOnSymbolValue() const { 655 return false; 656 } 657 658 bool NativeRawSymbol::isPointerToDataMember() const { 659 return false; 660 } 661 662 bool NativeRawSymbol::isPointerToMemberFunction() const { 663 return false; 664 } 665 666 bool NativeRawSymbol::isPureVirtual() const { 667 return false; 668 } 669 670 bool NativeRawSymbol::isRValueReference() const { 671 return false; 672 } 673 674 bool NativeRawSymbol::isRefUdt() const { 675 return false; 676 } 677 678 bool NativeRawSymbol::isReference() const { 679 return false; 680 } 681 682 bool NativeRawSymbol::isRestrictedType() const { 683 return false; 684 } 685 686 bool NativeRawSymbol::isReturnValue() const { 687 return false; 688 } 689 690 bool NativeRawSymbol::isSafeBuffers() const { 691 return false; 692 } 693 694 bool NativeRawSymbol::isScoped() const { 695 return false; 696 } 697 698 bool NativeRawSymbol::isSdl() const { 699 return false; 700 } 701 702 bool NativeRawSymbol::isSingleInheritance() const { 703 return false; 704 } 705 706 bool NativeRawSymbol::isSplitted() const { 707 return false; 708 } 709 710 bool NativeRawSymbol::isStatic() const { 711 return false; 712 } 713 714 bool NativeRawSymbol::hasPrivateSymbols() const { 715 return false; 716 } 717 718 bool NativeRawSymbol::isUnalignedType() const { 719 return false; 720 } 721 722 bool NativeRawSymbol::isUnreached() const { 723 return false; 724 } 725 726 bool NativeRawSymbol::isValueUdt() const { 727 return false; 728 } 729 730 bool NativeRawSymbol::isVirtual() const { 731 return false; 732 } 733 734 bool NativeRawSymbol::isVirtualBaseClass() const { 735 return false; 736 } 737 738 bool NativeRawSymbol::isVirtualInheritance() const { 739 return false; 740 } 741 742 bool NativeRawSymbol::isVolatileType() const { 743 return false; 744 } 745 746 bool NativeRawSymbol::wasInlined() const { 747 return false; 748 } 749 750 std::string NativeRawSymbol::getUnused() const { 751 return {}; 752 } 753