NativeRawSymbol.h 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. #pragma once
  2. #ifdef __GNUC__
  3. #pragma GCC diagnostic push
  4. #pragma GCC diagnostic ignored "-Wunused-parameter"
  5. #endif
  6. //==- NativeRawSymbol.h - Native implementation of IPDBRawSymbol -*- C++ -*-==//
  7. //
  8. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  9. // See https://llvm.org/LICENSE.txt for license information.
  10. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  11. //
  12. //===----------------------------------------------------------------------===//
  13. #ifndef LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
  14. #define LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
  15. #include "llvm/DebugInfo/PDB/IPDBRawSymbol.h"
  16. #include <cstdint>
  17. #include <memory>
  18. namespace llvm {
  19. namespace pdb {
  20. class NativeSession;
  21. class NativeRawSymbol : public IPDBRawSymbol {
  22. friend class SymbolCache;
  23. virtual void initialize() {}
  24. public:
  25. NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag,
  26. SymIndexId SymbolId);
  27. void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields,
  28. PdbSymbolIdField RecurseIdFields) const override;
  29. std::unique_ptr<IPDBEnumSymbols>
  30. findChildren(PDB_SymType Type) const override;
  31. std::unique_ptr<IPDBEnumSymbols>
  32. findChildren(PDB_SymType Type, StringRef Name,
  33. PDB_NameSearchFlags Flags) const override;
  34. std::unique_ptr<IPDBEnumSymbols>
  35. findChildrenByAddr(PDB_SymType Type, StringRef Name,
  36. PDB_NameSearchFlags Flags,
  37. uint32_t Section, uint32_t Offset) const override;
  38. std::unique_ptr<IPDBEnumSymbols>
  39. findChildrenByVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
  40. uint64_t VA) const override;
  41. std::unique_ptr<IPDBEnumSymbols>
  42. findChildrenByRVA(PDB_SymType Type, StringRef Name, PDB_NameSearchFlags Flags,
  43. uint32_t RVA) const override;
  44. std::unique_ptr<IPDBEnumSymbols>
  45. findInlineFramesByAddr(uint32_t Section, uint32_t Offset) const override;
  46. std::unique_ptr<IPDBEnumSymbols>
  47. findInlineFramesByRVA(uint32_t RVA) const override;
  48. std::unique_ptr<IPDBEnumSymbols>
  49. findInlineFramesByVA(uint64_t VA) const override;
  50. std::unique_ptr<IPDBEnumLineNumbers> findInlineeLines() const override;
  51. std::unique_ptr<IPDBEnumLineNumbers>
  52. findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
  53. uint32_t Length) const override;
  54. std::unique_ptr<IPDBEnumLineNumbers>
  55. findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const override;
  56. std::unique_ptr<IPDBEnumLineNumbers>
  57. findInlineeLinesByVA(uint64_t VA, uint32_t Length) const override;
  58. void getDataBytes(SmallVector<uint8_t, 32> &Bytes) const override;
  59. void getFrontEndVersion(VersionInfo &Version) const override;
  60. void getBackEndVersion(VersionInfo &Version) const override;
  61. PDB_MemberAccess getAccess() const override;
  62. uint32_t getAddressOffset() const override;
  63. uint32_t getAddressSection() const override;
  64. uint32_t getAge() const override;
  65. SymIndexId getArrayIndexTypeId() const override;
  66. uint32_t getBaseDataOffset() const override;
  67. uint32_t getBaseDataSlot() const override;
  68. SymIndexId getBaseSymbolId() const override;
  69. PDB_BuiltinType getBuiltinType() const override;
  70. uint32_t getBitPosition() const override;
  71. PDB_CallingConv getCallingConvention() const override;
  72. SymIndexId getClassParentId() const override;
  73. std::string getCompilerName() const override;
  74. uint32_t getCount() const override;
  75. uint32_t getCountLiveRanges() const override;
  76. PDB_Lang getLanguage() const override;
  77. SymIndexId getLexicalParentId() const override;
  78. std::string getLibraryName() const override;
  79. uint32_t getLiveRangeStartAddressOffset() const override;
  80. uint32_t getLiveRangeStartAddressSection() const override;
  81. uint32_t getLiveRangeStartRelativeVirtualAddress() const override;
  82. codeview::RegisterId getLocalBasePointerRegisterId() const override;
  83. SymIndexId getLowerBoundId() const override;
  84. uint32_t getMemorySpaceKind() const override;
  85. std::string getName() const override;
  86. uint32_t getNumberOfAcceleratorPointerTags() const override;
  87. uint32_t getNumberOfColumns() const override;
  88. uint32_t getNumberOfModifiers() const override;
  89. uint32_t getNumberOfRegisterIndices() const override;
  90. uint32_t getNumberOfRows() const override;
  91. std::string getObjectFileName() const override;
  92. uint32_t getOemId() const override;
  93. SymIndexId getOemSymbolId() const override;
  94. uint32_t getOffsetInUdt() const override;
  95. PDB_Cpu getPlatform() const override;
  96. uint32_t getRank() const override;
  97. codeview::RegisterId getRegisterId() const override;
  98. uint32_t getRegisterType() const override;
  99. uint32_t getRelativeVirtualAddress() const override;
  100. uint32_t getSamplerSlot() const override;
  101. uint32_t getSignature() const override;
  102. uint32_t getSizeInUdt() const override;
  103. uint32_t getSlot() const override;
  104. std::string getSourceFileName() const override;
  105. std::unique_ptr<IPDBLineNumber> getSrcLineOnTypeDefn() const override;
  106. uint32_t getStride() const override;
  107. SymIndexId getSubTypeId() const override;
  108. std::string getSymbolsFileName() const override;
  109. SymIndexId getSymIndexId() const override;
  110. uint32_t getTargetOffset() const override;
  111. uint32_t getTargetRelativeVirtualAddress() const override;
  112. uint64_t getTargetVirtualAddress() const override;
  113. uint32_t getTargetSection() const override;
  114. uint32_t getTextureSlot() const override;
  115. uint32_t getTimeStamp() const override;
  116. uint32_t getToken() const override;
  117. SymIndexId getTypeId() const override;
  118. uint32_t getUavSlot() const override;
  119. std::string getUndecoratedName() const override;
  120. std::string getUndecoratedNameEx(PDB_UndnameFlags Flags) const override;
  121. SymIndexId getUnmodifiedTypeId() const override;
  122. SymIndexId getUpperBoundId() const override;
  123. Variant getValue() const override;
  124. uint32_t getVirtualBaseDispIndex() const override;
  125. uint32_t getVirtualBaseOffset() const override;
  126. SymIndexId getVirtualTableShapeId() const override;
  127. std::unique_ptr<PDBSymbolTypeBuiltin>
  128. getVirtualBaseTableType() const override;
  129. PDB_DataKind getDataKind() const override;
  130. PDB_SymType getSymTag() const override;
  131. codeview::GUID getGuid() const override;
  132. int32_t getOffset() const override;
  133. int32_t getThisAdjust() const override;
  134. int32_t getVirtualBasePointerOffset() const override;
  135. PDB_LocType getLocationType() const override;
  136. PDB_Machine getMachineType() const override;
  137. codeview::ThunkOrdinal getThunkOrdinal() const override;
  138. uint64_t getLength() const override;
  139. uint64_t getLiveRangeLength() const override;
  140. uint64_t getVirtualAddress() const override;
  141. PDB_UdtType getUdtKind() const override;
  142. bool hasConstructor() const override;
  143. bool hasCustomCallingConvention() const override;
  144. bool hasFarReturn() const override;
  145. bool isCode() const override;
  146. bool isCompilerGenerated() const override;
  147. bool isConstType() const override;
  148. bool isEditAndContinueEnabled() const override;
  149. bool isFunction() const override;
  150. bool getAddressTaken() const override;
  151. bool getNoStackOrdering() const override;
  152. bool hasAlloca() const override;
  153. bool hasAssignmentOperator() const override;
  154. bool hasCTypes() const override;
  155. bool hasCastOperator() const override;
  156. bool hasDebugInfo() const override;
  157. bool hasEH() const override;
  158. bool hasEHa() const override;
  159. bool hasInlAsm() const override;
  160. bool hasInlineAttribute() const override;
  161. bool hasInterruptReturn() const override;
  162. bool hasFramePointer() const override;
  163. bool hasLongJump() const override;
  164. bool hasManagedCode() const override;
  165. bool hasNestedTypes() const override;
  166. bool hasNoInlineAttribute() const override;
  167. bool hasNoReturnAttribute() const override;
  168. bool hasOptimizedCodeDebugInfo() const override;
  169. bool hasOverloadedOperator() const override;
  170. bool hasSEH() const override;
  171. bool hasSecurityChecks() const override;
  172. bool hasSetJump() const override;
  173. bool hasStrictGSCheck() const override;
  174. bool isAcceleratorGroupSharedLocal() const override;
  175. bool isAcceleratorPointerTagLiveRange() const override;
  176. bool isAcceleratorStubFunction() const override;
  177. bool isAggregated() const override;
  178. bool isIntroVirtualFunction() const override;
  179. bool isCVTCIL() const override;
  180. bool isConstructorVirtualBase() const override;
  181. bool isCxxReturnUdt() const override;
  182. bool isDataAligned() const override;
  183. bool isHLSLData() const override;
  184. bool isHotpatchable() const override;
  185. bool isIndirectVirtualBaseClass() const override;
  186. bool isInterfaceUdt() const override;
  187. bool isIntrinsic() const override;
  188. bool isLTCG() const override;
  189. bool isLocationControlFlowDependent() const override;
  190. bool isMSILNetmodule() const override;
  191. bool isMatrixRowMajor() const override;
  192. bool isManagedCode() const override;
  193. bool isMSILCode() const override;
  194. bool isMultipleInheritance() const override;
  195. bool isNaked() const override;
  196. bool isNested() const override;
  197. bool isOptimizedAway() const override;
  198. bool isPacked() const override;
  199. bool isPointerBasedOnSymbolValue() const override;
  200. bool isPointerToDataMember() const override;
  201. bool isPointerToMemberFunction() const override;
  202. bool isPureVirtual() const override;
  203. bool isRValueReference() const override;
  204. bool isRefUdt() const override;
  205. bool isReference() const override;
  206. bool isRestrictedType() const override;
  207. bool isReturnValue() const override;
  208. bool isSafeBuffers() const override;
  209. bool isScoped() const override;
  210. bool isSdl() const override;
  211. bool isSingleInheritance() const override;
  212. bool isSplitted() const override;
  213. bool isStatic() const override;
  214. bool hasPrivateSymbols() const override;
  215. bool isUnalignedType() const override;
  216. bool isUnreached() const override;
  217. bool isValueUdt() const override;
  218. bool isVirtual() const override;
  219. bool isVirtualBaseClass() const override;
  220. bool isVirtualInheritance() const override;
  221. bool isVolatileType() const override;
  222. bool wasInlined() const override;
  223. std::string getUnused() const override;
  224. protected:
  225. NativeSession &Session;
  226. PDB_SymType Tag;
  227. SymIndexId SymbolId;
  228. };
  229. } // end namespace pdb
  230. } // end namespace llvm
  231. #endif // LLVM_DEBUGINFO_PDB_NATIVE_NATIVERAWSYMBOL_H
  232. #ifdef __GNUC__
  233. #pragma GCC diagnostic pop
  234. #endif