DIARawSymbol.h 9.9 KB

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