LLVM 22.0.0git
NativeRawSymbol.h
Go to the documentation of this file.
1//==- NativeRawSymbol.h - Native implementation of IPDBRawSymbol -*- C++ -*-==//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
10#define LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
11
14#include <cstdint>
15#include <memory>
16
17namespace llvm {
18namespace pdb {
19
20class NativeSession;
21
23 friend class SymbolCache;
24 virtual void initialize() {}
25
26public:
28 SymIndexId SymbolId);
29
30 void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
31 PdbSymbolIdField RecurseIdFields) const override;
32
33 std::unique_ptr<IPDBEnumSymbols>
34 findChildren(PDB_SymType Type) const override;
35 std::unique_ptr<IPDBEnumSymbols>
36 findChildren(PDB_SymType Type, StringRef Name,
37 PDB_NameSearchFlags Flags) const override;
38 std::unique_ptr<IPDBEnumSymbols>
39 findChildrenByAddr(PDB_SymType Type, StringRef Name,
41 uint32_t Section, uint32_t Offset) const override;
42 std::unique_ptr<IPDBEnumSymbols>
43 findChildrenByVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
44 uint64_t VA) const override;
45 std::unique_ptr<IPDBEnumSymbols>
46 findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
47 uint32_t RVA) const override;
48
49 std::unique_ptr<IPDBEnumSymbols>
50 findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const override;
51 std::unique_ptr<IPDBEnumSymbols>
52 findInlineFramesByRVA(uint32_t RVA) const override;
53 std::unique_ptr<IPDBEnumSymbols>
54 findInlineFramesByVA(uint64_t VA) const override;
55
56 std::unique_ptr<IPDBEnumLineNumbers> findInlineeLines() const override;
57 std::unique_ptr<IPDBEnumLineNumbers>
58 findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
59 uint32_t Length) const override;
60 std::unique_ptr<IPDBEnumLineNumbers>
61 findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const override;
62 std::unique_ptr<IPDBEnumLineNumbers>
63 findInlineeLinesByVA(uint64_t VA, uint32_t Length) const override;
64
65 void getDataBytes(SmallVector<uint8_t, 32> &Bytes) const override;
66 void getFrontEndVersion(VersionInfo &Version) const override;
67 void getBackEndVersion(VersionInfo &Version) const override;
68 PDB_MemberAccess getAccess() const override;
69 uint32_t getAddressOffset() const override;
70 uint32_t getAddressSection() const override;
71 uint32_t getAge() const override;
72 SymIndexId getArrayIndexTypeId() const override;
73 uint32_t getBaseDataOffset() const override;
74 uint32_t getBaseDataSlot() const override;
75 SymIndexId getBaseSymbolId() const override;
76 PDB_BuiltinType getBuiltinType() const override;
77 uint32_t getBitPosition() const override;
78 PDB_CallingConv getCallingConvention() const override;
79 SymIndexId getClassParentId() const override;
80 std::string getCompilerName() const override;
81 uint32_t getCount() const override;
82 uint32_t getCountLiveRanges() const override;
83 PDB_Lang getLanguage() const override;
84 SymIndexId getLexicalParentId() const override;
85 std::string getLibraryName() const override;
86 uint32_t getLiveRangeStartAddressOffset() const override;
87 uint32_t getLiveRangeStartAddressSection() const override;
88 uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
89 codeview::RegisterId getLocalBasePointerRegisterId() const override;
90 SymIndexId getLowerBoundId() const override;
91 uint32_t getMemorySpaceKind() const override;
92 std::string getName() const override;
93 uint32_t getNumberOfAcceleratorPointerTags() const override;
94 uint32_t getNumberOfColumns() const override;
95 uint32_t getNumberOfModifiers() const override;
96 uint32_t getNumberOfRegisterIndices() const override;
97 uint32_t getNumberOfRows() const override;
98 std::string getObjectFileName() const override;
99 uint32_t getOemId() const override;
100 SymIndexId getOemSymbolId() const override;
101 uint32_t getOffsetInUdt() const override;
102 PDB_Cpu getPlatform() const override;
103 uint32_t getRank() const override;
104 codeview::RegisterId getRegisterId() const override;
105 uint32_t getRegisterType() const override;
106 uint32_t getRelativeVirtualAddress() const override;
107 uint32_t getSamplerSlot() const override;
108 uint32_t getSignature() const override;
109 uint32_t getSizeInUdt() const override;
110 uint32_t getSlot() const override;
111 std::string getSourceFileName() const override;
112 std::unique_ptr<IPDBLineNumber> getSrcLineOnTypeDefn() const override;
113 uint32_t getStride() const override;
114 SymIndexId getSubTypeId() const override;
115 std::string getSymbolsFileName() const override;
116 SymIndexId getSymIndexId() const override;
117 uint32_t getTargetOffset() const override;
118 uint32_t getTargetRelativeVirtualAddress() const override;
119 uint64_t getTargetVirtualAddress() const override;
120 uint32_t getTargetSection() const override;
121 uint32_t getTextureSlot() const override;
122 uint32_t getTimeStamp() const override;
123 uint32_t getToken() const override;
124 SymIndexId getTypeId() const override;
125 uint32_t getUavSlot() const override;
126 std::string getUndecoratedName() const override;
127 std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override;
128 SymIndexId getUnmodifiedTypeId() const override;
129 SymIndexId getUpperBoundId() const override;
130 Variant getValue() const override;
131 uint32_t getVirtualBaseDispIndex() const override;
132 uint32_t getVirtualBaseOffset() const override;
133 SymIndexId getVirtualTableShapeId() const override;
134 std::unique_ptr<PDBSymbolTypeBuiltin>
135 getVirtualBaseTableType() const override;
136 PDB_DataKind getDataKind() const override;
137 PDB_SymType getSymTag() const override;
138 codeview::GUID getGuid() const override;
139 int32_t getOffset() const override;
140 int32_t getThisAdjust() const override;
141 int32_t getVirtualBasePointerOffset() const override;
142 PDB_LocType getLocationType() const override;
143 PDB_Machine getMachineType() const override;
144 codeview::ThunkOrdinal getThunkOrdinal() const override;
145 uint64_t getLength() const override;
146 uint64_t getLiveRangeLength() const override;
147 uint64_t getVirtualAddress() const override;
148 PDB_UdtType getUdtKind() const override;
149 bool hasConstructor() const override;
150 bool hasCustomCallingConvention() const override;
151 bool hasFarReturn() const override;
152 bool isCode() const override;
153 bool isCompilerGenerated() const override;
154 bool isConstType() const override;
155 bool isEditAndContinueEnabled() const override;
156 bool isFunction() const override;
157 bool getAddressTaken() const override;
158 bool getNoStackOrdering() const override;
159 bool hasAlloca() const override;
160 bool hasAssignmentOperator() const override;
161 bool hasCTypes() const override;
162 bool hasCastOperator() const override;
163 bool hasDebugInfo() const override;
164 bool hasEH() const override;
165 bool hasEHa() const override;
166 bool hasInlAsm() const override;
167 bool hasInlineAttribute() const override;
168 bool hasInterruptReturn() const override;
169 bool hasFramePointer() const override;
170 bool hasLongJump() const override;
171 bool hasManagedCode() const override;
172 bool hasNestedTypes() const override;
173 bool hasNoInlineAttribute() const override;
174 bool hasNoReturnAttribute() const override;
175 bool hasOptimizedCodeDebugInfo() const override;
176 bool hasOverloadedOperator() const override;
177 bool hasSEH() const override;
178 bool hasSecurityChecks() const override;
179 bool hasSetJump() const override;
180 bool hasStrictGSCheck() const override;
181 bool isAcceleratorGroupSharedLocal() const override;
182 bool isAcceleratorPointerTagLiveRange() const override;
183 bool isAcceleratorStubFunction() const override;
184 bool isAggregated() const override;
185 bool isIntroVirtualFunction() const override;
186 bool isCVTCIL() const override;
187 bool isConstructorVirtualBase() const override;
188 bool isCxxReturnUdt() const override;
189 bool isDataAligned() const override;
190 bool isHLSLData() const override;
191 bool isHotpatchable() const override;
192 bool isIndirectVirtualBaseClass() const override;
193 bool isInterfaceUdt() const override;
194 bool isIntrinsic() const override;
195 bool isLTCG() const override;
196 bool isLocationControlFlowDependent() const override;
197 bool isMSILNetmodule() const override;
198 bool isMatrixRowMajor() const override;
199 bool isManagedCode() const override;
200 bool isMSILCode() const override;
201 bool isMultipleInheritance() const override;
202 bool isNaked() const override;
203 bool isNested() const override;
204 bool isOptimizedAway() const override;
205 bool isPacked() const override;
206 bool isPointerBasedOnSymbolValue() const override;
207 bool isPointerToDataMember() const override;
208 bool isPointerToMemberFunction() const override;
209 bool isPureVirtual() const override;
210 bool isRValueReference() const override;
211 bool isRefUdt() const override;
212 bool isReference() const override;
213 bool isRestrictedType() const override;
214 bool isReturnValue() const override;
215 bool isSafeBuffers() const override;
216 bool isScoped() const override;
217 bool isSdl() const override;
218 bool isSingleInheritance() const override;
219 bool isSplitted() const override;
220 bool isStatic() const override;
221 bool hasPrivateSymbols() const override;
222 bool isUnalignedType() const override;
223 bool isUnreached() const override;
224 bool isValueUdt() const override;
225 bool isVirtual() const override;
226 bool isVirtualBaseClass() const override;
227 bool isVirtualInheritance() const override;
228 bool isVolatileType() const override;
229 bool wasInlined() const override;
230 std::string getUnused() const override;
231
232protected:
236};
237
238} // end namespace pdb
239} // end namespace llvm
240
241#endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
#define LLVM_ABI
Definition: Compiler.h:213
static bool hasDebugInfo(const MachineFunction *MF)
std::string Name
uint64_t Offset
Definition: ELF_riscv.cpp:478
static StringRef getName(Value *V)
static std::optional< int32_t > getOffset(ArrayRef< int32_t > Offsets, size_t Idx)
raw_pwrite_stream & OS
static bool isFunction(SDValue Op)
static void initialize(TargetLibraryInfoImpl &TLI, const Triple &T, ArrayRef< StringLiteral > StandardNames)
Initialize the set of available library functions based on the specified target triple.
static std::string getSignature(FunctionType *FTy)
static const MCSection * getTargetSection(const MCExpr *Expr)
static bool isIntrinsic(const CallBase &Call, Intrinsic::ID ID)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
Definition: SmallVector.h:1197
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:55
The instances of the Type class are immutable: once they are created, they are never changed.
Definition: Type.h:45
IPDBRawSymbol defines an interface used to represent an arbitrary symbol.
Definition: IPDBRawSymbol.h:47
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn....
Definition: CodeView.h:77
CallingConvention
These values correspond to the CV_call_e enumeration, and are documented at the following locations: ...
Definition: CodeView.h:157
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:537
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration in the Microsoft Debug Interface Access SDK,...
Definition: CodeView.h:147
uint32_t SymIndexId
Definition: PDBTypes.h:26
PDB_NameSearchFlags
Defines flags used for enumerating child symbols.
Definition: PDBTypes.h:102
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:335
PDB_MemberAccess
Definition: PDBTypes.h:385
PDB_UdtType
These values correspond to the UdtKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:310
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:243
PDB_LocType
These values correspond to the LocationType enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:292
PDB_DataKind
These values correspond to the DataKind enumeration, and are documented here: https://msdn....
Definition: PDBTypes.h:228
PDB_UndnameFlags
These values correspond to the flags that can be combined to control the return of an undecorated nam...
Definition: PDBTypes.h:362
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
LLVM_ABI COFF::MachineTypes getMachineType(StringRef S)
This represents the 'GUID' type from windows.h.
Definition: GUID.h:22