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