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