1 //===- NativeRawSymbol.cpp - Native implementation of IPDBRawSymbol -------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
11 #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
14 using namespace llvm::pdb;
16 NativeRawSymbol::NativeRawSymbol(NativeSession &PDBSession, uint32_t SymbolId)
17 : Session(PDBSession), SymbolId(SymbolId) {}
19 void NativeRawSymbol::dump(raw_ostream &OS, int Indent) const {}
21 std::unique_ptr<IPDBEnumSymbols>
22 NativeRawSymbol::findChildren(PDB_SymType Type) const {
26 std::unique_ptr<IPDBEnumSymbols>
27 NativeRawSymbol::findChildren(PDB_SymType Type, StringRef Name,
28 PDB_NameSearchFlags Flags) const {
32 std::unique_ptr<IPDBEnumSymbols>
33 NativeRawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
34 PDB_NameSearchFlags Flags, uint32_t RVA) const {
38 std::unique_ptr<IPDBEnumSymbols>
39 NativeRawSymbol::findInlineFramesByRVA(uint32_t RVA) const {
43 void NativeRawSymbol::getDataBytes(SmallVector<uint8_t, 32> &bytes) const {
47 PDB_MemberAccess NativeRawSymbol::getAccess() const {
48 return PDB_MemberAccess::Private;
51 uint32_t NativeRawSymbol::getAddressOffset() const {
55 uint32_t NativeRawSymbol::getAddressSection() const {
59 uint32_t NativeRawSymbol::getAge() const {
63 uint32_t NativeRawSymbol::getArrayIndexTypeId() const {
67 void NativeRawSymbol::getBackEndVersion(VersionInfo &Version) const {
74 uint32_t NativeRawSymbol::getBaseDataOffset() const {
78 uint32_t NativeRawSymbol::getBaseDataSlot() const {
82 uint32_t NativeRawSymbol::getBaseSymbolId() const {
86 PDB_BuiltinType NativeRawSymbol::getBuiltinType() const {
87 return PDB_BuiltinType::None;
90 uint32_t NativeRawSymbol::getBitPosition() const {
94 PDB_CallingConv NativeRawSymbol::getCallingConvention() const {
95 return PDB_CallingConv::FarStdCall;
98 uint32_t NativeRawSymbol::getClassParentId() const {
102 std::string NativeRawSymbol::getCompilerName() const {
106 uint32_t NativeRawSymbol::getCount() const {
110 uint32_t NativeRawSymbol::getCountLiveRanges() const {
114 void NativeRawSymbol::getFrontEndVersion(VersionInfo &Version) const {
121 PDB_Lang NativeRawSymbol::getLanguage() const {
122 return PDB_Lang::Cobol;
125 uint32_t NativeRawSymbol::getLexicalParentId() const {
129 std::string NativeRawSymbol::getLibraryName() const {
133 uint32_t NativeRawSymbol::getLiveRangeStartAddressOffset() const {
137 uint32_t NativeRawSymbol::getLiveRangeStartAddressSection() const {
141 uint32_t NativeRawSymbol::getLiveRangeStartRelativeVirtualAddress() const {
145 codeview::RegisterId NativeRawSymbol::getLocalBasePointerRegisterId() const {
146 return codeview::RegisterId::EAX;
149 uint32_t NativeRawSymbol::getLowerBoundId() const {
153 uint32_t NativeRawSymbol::getMemorySpaceKind() const {
157 std::string NativeRawSymbol::getName() const {
161 uint32_t NativeRawSymbol::getNumberOfAcceleratorPointerTags() const {
165 uint32_t NativeRawSymbol::getNumberOfColumns() const {
169 uint32_t NativeRawSymbol::getNumberOfModifiers() const {
173 uint32_t NativeRawSymbol::getNumberOfRegisterIndices() const {
177 uint32_t NativeRawSymbol::getNumberOfRows() const {
181 std::string NativeRawSymbol::getObjectFileName() const {
185 uint32_t NativeRawSymbol::getOemId() const {
189 uint32_t NativeRawSymbol::getOemSymbolId() const {
193 uint32_t NativeRawSymbol::getOffsetInUdt() const {
197 PDB_Cpu NativeRawSymbol::getPlatform() const {
198 return PDB_Cpu::Intel8080;
201 uint32_t NativeRawSymbol::getRank() const {
205 codeview::RegisterId NativeRawSymbol::getRegisterId() const {
206 return codeview::RegisterId::EAX;
209 uint32_t NativeRawSymbol::getRegisterType() const {
213 uint32_t NativeRawSymbol::getRelativeVirtualAddress() const {
217 uint32_t NativeRawSymbol::getSamplerSlot() const {
221 uint32_t NativeRawSymbol::getSignature() const {
225 uint32_t NativeRawSymbol::getSizeInUdt() const {
229 uint32_t NativeRawSymbol::getSlot() const {
233 std::string NativeRawSymbol::getSourceFileName() const {
237 uint32_t NativeRawSymbol::getStride() const {
241 uint32_t NativeRawSymbol::getSubTypeId() const {
245 std::string NativeRawSymbol::getSymbolsFileName() const { return {}; }
247 uint32_t NativeRawSymbol::getSymIndexId() const { return SymbolId; }
249 uint32_t NativeRawSymbol::getTargetOffset() const {
253 uint32_t NativeRawSymbol::getTargetRelativeVirtualAddress() const {
257 uint64_t NativeRawSymbol::getTargetVirtualAddress() const {
261 uint32_t NativeRawSymbol::getTargetSection() const {
265 uint32_t NativeRawSymbol::getTextureSlot() const {
269 uint32_t NativeRawSymbol::getTimeStamp() const {
273 uint32_t NativeRawSymbol::getToken() const {
277 uint32_t NativeRawSymbol::getTypeId() const {
281 uint32_t NativeRawSymbol::getUavSlot() const {
285 std::string NativeRawSymbol::getUndecoratedName() const {
289 uint32_t NativeRawSymbol::getUnmodifiedTypeId() const {
293 uint32_t NativeRawSymbol::getUpperBoundId() const {
297 Variant NativeRawSymbol::getValue() const {
301 uint32_t NativeRawSymbol::getVirtualBaseDispIndex() const {
305 uint32_t NativeRawSymbol::getVirtualBaseOffset() const {
309 uint32_t NativeRawSymbol::getVirtualTableShapeId() const {
313 std::unique_ptr<PDBSymbolTypeBuiltin>
314 NativeRawSymbol::getVirtualBaseTableType() const {
318 PDB_DataKind NativeRawSymbol::getDataKind() const {
319 return PDB_DataKind::Unknown;
322 PDB_SymType NativeRawSymbol::getSymTag() const {
323 return PDB_SymType::None;
326 PDB_UniqueId NativeRawSymbol::getGuid() const {
327 return PDB_UniqueId{{0}};
330 int32_t NativeRawSymbol::getOffset() const {
334 int32_t NativeRawSymbol::getThisAdjust() const {
338 int32_t NativeRawSymbol::getVirtualBasePointerOffset() const {
342 PDB_LocType NativeRawSymbol::getLocationType() const {
343 return PDB_LocType::Null;
346 PDB_Machine NativeRawSymbol::getMachineType() const {
347 return PDB_Machine::Invalid;
350 codeview::ThunkOrdinal NativeRawSymbol::getThunkOrdinal() const {
351 return codeview::ThunkOrdinal::Standard;
354 uint64_t NativeRawSymbol::getLength() const {
358 uint64_t NativeRawSymbol::getLiveRangeLength() const {
362 uint64_t NativeRawSymbol::getVirtualAddress() const {
366 PDB_UdtType NativeRawSymbol::getUdtKind() const {
367 return PDB_UdtType::Struct;
370 bool NativeRawSymbol::hasConstructor() const {
374 bool NativeRawSymbol::hasCustomCallingConvention() const {
378 bool NativeRawSymbol::hasFarReturn() const {
382 bool NativeRawSymbol::isCode() const {
386 bool NativeRawSymbol::isCompilerGenerated() const {
390 bool NativeRawSymbol::isConstType() const {
394 bool NativeRawSymbol::isEditAndContinueEnabled() const {
398 bool NativeRawSymbol::isFunction() const {
402 bool NativeRawSymbol::getAddressTaken() const {
406 bool NativeRawSymbol::getNoStackOrdering() const {
410 bool NativeRawSymbol::hasAlloca() const {
414 bool NativeRawSymbol::hasAssignmentOperator() const {
418 bool NativeRawSymbol::hasCTypes() const {
422 bool NativeRawSymbol::hasCastOperator() const {
426 bool NativeRawSymbol::hasDebugInfo() const {
430 bool NativeRawSymbol::hasEH() const {
434 bool NativeRawSymbol::hasEHa() const {
438 bool NativeRawSymbol::hasInlAsm() const {
442 bool NativeRawSymbol::hasInlineAttribute() const {
446 bool NativeRawSymbol::hasInterruptReturn() const {
450 bool NativeRawSymbol::hasFramePointer() const {
454 bool NativeRawSymbol::hasLongJump() const {
458 bool NativeRawSymbol::hasManagedCode() const {
462 bool NativeRawSymbol::hasNestedTypes() const {
466 bool NativeRawSymbol::hasNoInlineAttribute() const {
470 bool NativeRawSymbol::hasNoReturnAttribute() const {
474 bool NativeRawSymbol::hasOptimizedCodeDebugInfo() const {
478 bool NativeRawSymbol::hasOverloadedOperator() const {
482 bool NativeRawSymbol::hasSEH() const {
486 bool NativeRawSymbol::hasSecurityChecks() const {
490 bool NativeRawSymbol::hasSetJump() const {
494 bool NativeRawSymbol::hasStrictGSCheck() const {
498 bool NativeRawSymbol::isAcceleratorGroupSharedLocal() const {
502 bool NativeRawSymbol::isAcceleratorPointerTagLiveRange() const {
506 bool NativeRawSymbol::isAcceleratorStubFunction() const {
510 bool NativeRawSymbol::isAggregated() const {
514 bool NativeRawSymbol::isIntroVirtualFunction() const {
518 bool NativeRawSymbol::isCVTCIL() const {
522 bool NativeRawSymbol::isConstructorVirtualBase() const {
526 bool NativeRawSymbol::isCxxReturnUdt() const {
530 bool NativeRawSymbol::isDataAligned() const {
534 bool NativeRawSymbol::isHLSLData() const {
538 bool NativeRawSymbol::isHotpatchable() const {
542 bool NativeRawSymbol::isIndirectVirtualBaseClass() const {
546 bool NativeRawSymbol::isInterfaceUdt() const {
550 bool NativeRawSymbol::isIntrinsic() const {
554 bool NativeRawSymbol::isLTCG() const {
558 bool NativeRawSymbol::isLocationControlFlowDependent() const {
562 bool NativeRawSymbol::isMSILNetmodule() const {
566 bool NativeRawSymbol::isMatrixRowMajor() const {
570 bool NativeRawSymbol::isManagedCode() const {
574 bool NativeRawSymbol::isMSILCode() const {
578 bool NativeRawSymbol::isMultipleInheritance() const {
582 bool NativeRawSymbol::isNaked() const {
586 bool NativeRawSymbol::isNested() const {
590 bool NativeRawSymbol::isOptimizedAway() const {
594 bool NativeRawSymbol::isPacked() const {
598 bool NativeRawSymbol::isPointerBasedOnSymbolValue() const {
602 bool NativeRawSymbol::isPointerToDataMember() const {
606 bool NativeRawSymbol::isPointerToMemberFunction() const {
610 bool NativeRawSymbol::isPureVirtual() const {
614 bool NativeRawSymbol::isRValueReference() const {
618 bool NativeRawSymbol::isRefUdt() const {
622 bool NativeRawSymbol::isReference() const {
626 bool NativeRawSymbol::isRestrictedType() const {
630 bool NativeRawSymbol::isReturnValue() const {
634 bool NativeRawSymbol::isSafeBuffers() const {
638 bool NativeRawSymbol::isScoped() const {
642 bool NativeRawSymbol::isSdl() const {
646 bool NativeRawSymbol::isSingleInheritance() const {
650 bool NativeRawSymbol::isSplitted() const {
654 bool NativeRawSymbol::isStatic() const {
658 bool NativeRawSymbol::hasPrivateSymbols() const {
662 bool NativeRawSymbol::isUnalignedType() const {
666 bool NativeRawSymbol::isUnreached() const {
670 bool NativeRawSymbol::isValueUdt() const {
674 bool NativeRawSymbol::isVirtual() const {
678 bool NativeRawSymbol::isVirtualBaseClass() const {
682 bool NativeRawSymbol::isVirtualInheritance() const {
686 bool NativeRawSymbol::isVolatileType() const {
690 bool NativeRawSymbol::wasInlined() const {
694 std::string NativeRawSymbol::getUnused() const {