PageRenderTime 42ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/contrib/llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp

https://bitbucket.org/freebsd/freebsd-base
C++ | 734 lines | 546 code | 181 blank | 7 comment | 0 complexity | c416228b354a085107070dc733b1066e MD5 | raw file
  1. //===- NativeRawSymbol.cpp - Native implementation of IPDBRawSymbol -------===//
  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. #include "llvm/DebugInfo/PDB/Native/NativeRawSymbol.h"
  9. #include "llvm/DebugInfo/PDB/IPDBLineNumber.h"
  10. #include "llvm/DebugInfo/PDB/Native/NativeSession.h"
  11. #include "llvm/DebugInfo/PDB/PDBSymbolTypeBuiltin.h"
  12. #include "llvm/Support/FormatVariadic.h"
  13. using namespace llvm;
  14. using namespace llvm::pdb;
  15. NativeRawSymbol::NativeRawSymbol(NativeSession &PDBSession, PDB_SymType Tag,
  16. SymIndexId SymbolId)
  17. : Session(PDBSession), Tag(Tag), SymbolId(SymbolId) {}
  18. void NativeRawSymbol::dump(raw_ostream &OS, int Indent,
  19. PdbSymbolIdField ShowIdFields,
  20. PdbSymbolIdField RecurseIdFields) const {
  21. dumpSymbolIdField(OS, "symIndexId", SymbolId, Indent, Session,
  22. PdbSymbolIdField::SymIndexId, ShowIdFields,
  23. RecurseIdFields);
  24. dumpSymbolField(OS, "symTag", Tag, Indent);
  25. }
  26. std::unique_ptr<IPDBEnumSymbols>
  27. NativeRawSymbol::findChildren(PDB_SymType Type) const {
  28. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  29. }
  30. std::unique_ptr<IPDBEnumSymbols>
  31. NativeRawSymbol::findChildren(PDB_SymType Type, StringRef Name,
  32. PDB_NameSearchFlags Flags) const {
  33. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  34. }
  35. std::unique_ptr<IPDBEnumSymbols>
  36. NativeRawSymbol::findChildrenByAddr(PDB_SymType Type, StringRef Name,
  37. PDB_NameSearchFlags Flags, uint32_t Section, uint32_t Offset) const {
  38. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  39. }
  40. std::unique_ptr<IPDBEnumSymbols>
  41. NativeRawSymbol::findChildrenByVA(PDB_SymType Type, StringRef Name,
  42. PDB_NameSearchFlags Flags, uint64_t VA) const {
  43. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  44. }
  45. std::unique_ptr<IPDBEnumSymbols>
  46. NativeRawSymbol::findChildrenByRVA(PDB_SymType Type, StringRef Name,
  47. PDB_NameSearchFlags Flags, uint32_t RVA) const {
  48. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  49. }
  50. std::unique_ptr<IPDBEnumSymbols>
  51. NativeRawSymbol::findInlineFramesByAddr(uint32_t Section,
  52. uint32_t Offset) const {
  53. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  54. }
  55. std::unique_ptr<IPDBEnumSymbols>
  56. NativeRawSymbol::findInlineFramesByRVA(uint32_t RVA) const {
  57. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  58. }
  59. std::unique_ptr<IPDBEnumSymbols>
  60. NativeRawSymbol::findInlineFramesByVA(uint64_t VA) const {
  61. return llvm::make_unique<NullEnumerator<PDBSymbol>>();
  62. }
  63. std::unique_ptr<IPDBEnumLineNumbers>
  64. NativeRawSymbol::findInlineeLines() const {
  65. return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
  66. }
  67. std::unique_ptr<IPDBEnumLineNumbers>
  68. NativeRawSymbol::findInlineeLinesByAddr(uint32_t Section, uint32_t Offset,
  69. uint32_t Length) const {
  70. return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
  71. }
  72. std::unique_ptr<IPDBEnumLineNumbers>
  73. NativeRawSymbol::findInlineeLinesByRVA(uint32_t RVA, uint32_t Length) const {
  74. return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
  75. }
  76. std::unique_ptr<IPDBEnumLineNumbers>
  77. NativeRawSymbol::findInlineeLinesByVA(uint64_t VA, uint32_t Length) const {
  78. return llvm::make_unique<NullEnumerator<IPDBLineNumber>>();
  79. }
  80. void NativeRawSymbol::getDataBytes(SmallVector<uint8_t, 32> &bytes) const {
  81. bytes.clear();
  82. }
  83. PDB_MemberAccess NativeRawSymbol::getAccess() const {
  84. return PDB_MemberAccess::Private;
  85. }
  86. uint32_t NativeRawSymbol::getAddressOffset() const {
  87. return 0;
  88. }
  89. uint32_t NativeRawSymbol::getAddressSection() const {
  90. return 0;
  91. }
  92. uint32_t NativeRawSymbol::getAge() const {
  93. return 0;
  94. }
  95. SymIndexId NativeRawSymbol::getArrayIndexTypeId() const { return 0; }
  96. void NativeRawSymbol::getBackEndVersion(VersionInfo &Version) const {
  97. Version.Major = 0;
  98. Version.Minor = 0;
  99. Version.Build = 0;
  100. Version.QFE = 0;
  101. }
  102. uint32_t NativeRawSymbol::getBaseDataOffset() const {
  103. return 0;
  104. }
  105. uint32_t NativeRawSymbol::getBaseDataSlot() const {
  106. return 0;
  107. }
  108. SymIndexId NativeRawSymbol::getBaseSymbolId() const { return 0; }
  109. PDB_BuiltinType NativeRawSymbol::getBuiltinType() const {
  110. return PDB_BuiltinType::None;
  111. }
  112. uint32_t NativeRawSymbol::getBitPosition() const {
  113. return 0;
  114. }
  115. PDB_CallingConv NativeRawSymbol::getCallingConvention() const {
  116. return PDB_CallingConv::FarStdCall;
  117. }
  118. SymIndexId NativeRawSymbol::getClassParentId() const { return 0; }
  119. std::string NativeRawSymbol::getCompilerName() const {
  120. return {};
  121. }
  122. uint32_t NativeRawSymbol::getCount() const {
  123. return 0;
  124. }
  125. uint32_t NativeRawSymbol::getCountLiveRanges() const {
  126. return 0;
  127. }
  128. void NativeRawSymbol::getFrontEndVersion(VersionInfo &Version) const {
  129. Version.Major = 0;
  130. Version.Minor = 0;
  131. Version.Build = 0;
  132. Version.QFE = 0;
  133. }
  134. PDB_Lang NativeRawSymbol::getLanguage() const {
  135. return PDB_Lang::Cobol;
  136. }
  137. SymIndexId NativeRawSymbol::getLexicalParentId() const { return 0; }
  138. std::string NativeRawSymbol::getLibraryName() const {
  139. return {};
  140. }
  141. uint32_t NativeRawSymbol::getLiveRangeStartAddressOffset() const {
  142. return 0;
  143. }
  144. uint32_t NativeRawSymbol::getLiveRangeStartAddressSection() const {
  145. return 0;
  146. }
  147. uint32_t NativeRawSymbol::getLiveRangeStartRelativeVirtualAddress() const {
  148. return 0;
  149. }
  150. codeview::RegisterId NativeRawSymbol::getLocalBasePointerRegisterId() const {
  151. return codeview::RegisterId::EAX;
  152. }
  153. SymIndexId NativeRawSymbol::getLowerBoundId() const { return 0; }
  154. uint32_t NativeRawSymbol::getMemorySpaceKind() const {
  155. return 0;
  156. }
  157. std::string NativeRawSymbol::getName() const {
  158. return {};
  159. }
  160. uint32_t NativeRawSymbol::getNumberOfAcceleratorPointerTags() const {
  161. return 0;
  162. }
  163. uint32_t NativeRawSymbol::getNumberOfColumns() const {
  164. return 0;
  165. }
  166. uint32_t NativeRawSymbol::getNumberOfModifiers() const {
  167. return 0;
  168. }
  169. uint32_t NativeRawSymbol::getNumberOfRegisterIndices() const {
  170. return 0;
  171. }
  172. uint32_t NativeRawSymbol::getNumberOfRows() const {
  173. return 0;
  174. }
  175. std::string NativeRawSymbol::getObjectFileName() const {
  176. return {};
  177. }
  178. uint32_t NativeRawSymbol::getOemId() const {
  179. return 0;
  180. }
  181. SymIndexId NativeRawSymbol::getOemSymbolId() const { return 0; }
  182. uint32_t NativeRawSymbol::getOffsetInUdt() const {
  183. return 0;
  184. }
  185. PDB_Cpu NativeRawSymbol::getPlatform() const {
  186. return PDB_Cpu::Intel8080;
  187. }
  188. uint32_t NativeRawSymbol::getRank() const {
  189. return 0;
  190. }
  191. codeview::RegisterId NativeRawSymbol::getRegisterId() const {
  192. return codeview::RegisterId::EAX;
  193. }
  194. uint32_t NativeRawSymbol::getRegisterType() const {
  195. return 0;
  196. }
  197. uint32_t NativeRawSymbol::getRelativeVirtualAddress() const {
  198. return 0;
  199. }
  200. uint32_t NativeRawSymbol::getSamplerSlot() const {
  201. return 0;
  202. }
  203. uint32_t NativeRawSymbol::getSignature() const {
  204. return 0;
  205. }
  206. uint32_t NativeRawSymbol::getSizeInUdt() const {
  207. return 0;
  208. }
  209. uint32_t NativeRawSymbol::getSlot() const {
  210. return 0;
  211. }
  212. std::string NativeRawSymbol::getSourceFileName() const {
  213. return {};
  214. }
  215. std::unique_ptr<IPDBLineNumber>
  216. NativeRawSymbol::getSrcLineOnTypeDefn() const {
  217. return nullptr;
  218. }
  219. uint32_t NativeRawSymbol::getStride() const {
  220. return 0;
  221. }
  222. SymIndexId NativeRawSymbol::getSubTypeId() const { return 0; }
  223. std::string NativeRawSymbol::getSymbolsFileName() const { return {}; }
  224. SymIndexId NativeRawSymbol::getSymIndexId() const { return SymbolId; }
  225. uint32_t NativeRawSymbol::getTargetOffset() const {
  226. return 0;
  227. }
  228. uint32_t NativeRawSymbol::getTargetRelativeVirtualAddress() const {
  229. return 0;
  230. }
  231. uint64_t NativeRawSymbol::getTargetVirtualAddress() const {
  232. return 0;
  233. }
  234. uint32_t NativeRawSymbol::getTargetSection() const {
  235. return 0;
  236. }
  237. uint32_t NativeRawSymbol::getTextureSlot() const {
  238. return 0;
  239. }
  240. uint32_t NativeRawSymbol::getTimeStamp() const {
  241. return 0;
  242. }
  243. uint32_t NativeRawSymbol::getToken() const {
  244. return 0;
  245. }
  246. SymIndexId NativeRawSymbol::getTypeId() const { return 0; }
  247. uint32_t NativeRawSymbol::getUavSlot() const {
  248. return 0;
  249. }
  250. std::string NativeRawSymbol::getUndecoratedName() const {
  251. return {};
  252. }
  253. std::string NativeRawSymbol::getUndecoratedNameEx(
  254. PDB_UndnameFlags Flags) const {
  255. return {};
  256. }
  257. SymIndexId NativeRawSymbol::getUnmodifiedTypeId() const { return 0; }
  258. SymIndexId NativeRawSymbol::getUpperBoundId() const { return 0; }
  259. Variant NativeRawSymbol::getValue() const {
  260. return Variant();
  261. }
  262. uint32_t NativeRawSymbol::getVirtualBaseDispIndex() const {
  263. return 0;
  264. }
  265. uint32_t NativeRawSymbol::getVirtualBaseOffset() const {
  266. return 0;
  267. }
  268. SymIndexId NativeRawSymbol::getVirtualTableShapeId() const { return 0; }
  269. std::unique_ptr<PDBSymbolTypeBuiltin>
  270. NativeRawSymbol::getVirtualBaseTableType() const {
  271. return nullptr;
  272. }
  273. PDB_DataKind NativeRawSymbol::getDataKind() const {
  274. return PDB_DataKind::Unknown;
  275. }
  276. PDB_SymType NativeRawSymbol::getSymTag() const { return Tag; }
  277. codeview::GUID NativeRawSymbol::getGuid() const { return codeview::GUID{{0}}; }
  278. int32_t NativeRawSymbol::getOffset() const {
  279. return 0;
  280. }
  281. int32_t NativeRawSymbol::getThisAdjust() const {
  282. return 0;
  283. }
  284. int32_t NativeRawSymbol::getVirtualBasePointerOffset() const {
  285. return 0;
  286. }
  287. PDB_LocType NativeRawSymbol::getLocationType() const {
  288. return PDB_LocType::Null;
  289. }
  290. PDB_Machine NativeRawSymbol::getMachineType() const {
  291. return PDB_Machine::Invalid;
  292. }
  293. codeview::ThunkOrdinal NativeRawSymbol::getThunkOrdinal() const {
  294. return codeview::ThunkOrdinal::Standard;
  295. }
  296. uint64_t NativeRawSymbol::getLength() const {
  297. return 0;
  298. }
  299. uint64_t NativeRawSymbol::getLiveRangeLength() const {
  300. return 0;
  301. }
  302. uint64_t NativeRawSymbol::getVirtualAddress() const {
  303. return 0;
  304. }
  305. PDB_UdtType NativeRawSymbol::getUdtKind() const {
  306. return PDB_UdtType::Struct;
  307. }
  308. bool NativeRawSymbol::hasConstructor() const {
  309. return false;
  310. }
  311. bool NativeRawSymbol::hasCustomCallingConvention() const {
  312. return false;
  313. }
  314. bool NativeRawSymbol::hasFarReturn() const {
  315. return false;
  316. }
  317. bool NativeRawSymbol::isCode() const {
  318. return false;
  319. }
  320. bool NativeRawSymbol::isCompilerGenerated() const {
  321. return false;
  322. }
  323. bool NativeRawSymbol::isConstType() const {
  324. return false;
  325. }
  326. bool NativeRawSymbol::isEditAndContinueEnabled() const {
  327. return false;
  328. }
  329. bool NativeRawSymbol::isFunction() const {
  330. return false;
  331. }
  332. bool NativeRawSymbol::getAddressTaken() const {
  333. return false;
  334. }
  335. bool NativeRawSymbol::getNoStackOrdering() const {
  336. return false;
  337. }
  338. bool NativeRawSymbol::hasAlloca() const {
  339. return false;
  340. }
  341. bool NativeRawSymbol::hasAssignmentOperator() const {
  342. return false;
  343. }
  344. bool NativeRawSymbol::hasCTypes() const {
  345. return false;
  346. }
  347. bool NativeRawSymbol::hasCastOperator() const {
  348. return false;
  349. }
  350. bool NativeRawSymbol::hasDebugInfo() const {
  351. return false;
  352. }
  353. bool NativeRawSymbol::hasEH() const {
  354. return false;
  355. }
  356. bool NativeRawSymbol::hasEHa() const {
  357. return false;
  358. }
  359. bool NativeRawSymbol::hasInlAsm() const {
  360. return false;
  361. }
  362. bool NativeRawSymbol::hasInlineAttribute() const {
  363. return false;
  364. }
  365. bool NativeRawSymbol::hasInterruptReturn() const {
  366. return false;
  367. }
  368. bool NativeRawSymbol::hasFramePointer() const {
  369. return false;
  370. }
  371. bool NativeRawSymbol::hasLongJump() const {
  372. return false;
  373. }
  374. bool NativeRawSymbol::hasManagedCode() const {
  375. return false;
  376. }
  377. bool NativeRawSymbol::hasNestedTypes() const {
  378. return false;
  379. }
  380. bool NativeRawSymbol::hasNoInlineAttribute() const {
  381. return false;
  382. }
  383. bool NativeRawSymbol::hasNoReturnAttribute() const {
  384. return false;
  385. }
  386. bool NativeRawSymbol::hasOptimizedCodeDebugInfo() const {
  387. return false;
  388. }
  389. bool NativeRawSymbol::hasOverloadedOperator() const {
  390. return false;
  391. }
  392. bool NativeRawSymbol::hasSEH() const {
  393. return false;
  394. }
  395. bool NativeRawSymbol::hasSecurityChecks() const {
  396. return false;
  397. }
  398. bool NativeRawSymbol::hasSetJump() const {
  399. return false;
  400. }
  401. bool NativeRawSymbol::hasStrictGSCheck() const {
  402. return false;
  403. }
  404. bool NativeRawSymbol::isAcceleratorGroupSharedLocal() const {
  405. return false;
  406. }
  407. bool NativeRawSymbol::isAcceleratorPointerTagLiveRange() const {
  408. return false;
  409. }
  410. bool NativeRawSymbol::isAcceleratorStubFunction() const {
  411. return false;
  412. }
  413. bool NativeRawSymbol::isAggregated() const {
  414. return false;
  415. }
  416. bool NativeRawSymbol::isIntroVirtualFunction() const {
  417. return false;
  418. }
  419. bool NativeRawSymbol::isCVTCIL() const {
  420. return false;
  421. }
  422. bool NativeRawSymbol::isConstructorVirtualBase() const {
  423. return false;
  424. }
  425. bool NativeRawSymbol::isCxxReturnUdt() const {
  426. return false;
  427. }
  428. bool NativeRawSymbol::isDataAligned() const {
  429. return false;
  430. }
  431. bool NativeRawSymbol::isHLSLData() const {
  432. return false;
  433. }
  434. bool NativeRawSymbol::isHotpatchable() const {
  435. return false;
  436. }
  437. bool NativeRawSymbol::isIndirectVirtualBaseClass() const {
  438. return false;
  439. }
  440. bool NativeRawSymbol::isInterfaceUdt() const {
  441. return false;
  442. }
  443. bool NativeRawSymbol::isIntrinsic() const {
  444. return false;
  445. }
  446. bool NativeRawSymbol::isLTCG() const {
  447. return false;
  448. }
  449. bool NativeRawSymbol::isLocationControlFlowDependent() const {
  450. return false;
  451. }
  452. bool NativeRawSymbol::isMSILNetmodule() const {
  453. return false;
  454. }
  455. bool NativeRawSymbol::isMatrixRowMajor() const {
  456. return false;
  457. }
  458. bool NativeRawSymbol::isManagedCode() const {
  459. return false;
  460. }
  461. bool NativeRawSymbol::isMSILCode() const {
  462. return false;
  463. }
  464. bool NativeRawSymbol::isMultipleInheritance() const {
  465. return false;
  466. }
  467. bool NativeRawSymbol::isNaked() const {
  468. return false;
  469. }
  470. bool NativeRawSymbol::isNested() const {
  471. return false;
  472. }
  473. bool NativeRawSymbol::isOptimizedAway() const {
  474. return false;
  475. }
  476. bool NativeRawSymbol::isPacked() const {
  477. return false;
  478. }
  479. bool NativeRawSymbol::isPointerBasedOnSymbolValue() const {
  480. return false;
  481. }
  482. bool NativeRawSymbol::isPointerToDataMember() const {
  483. return false;
  484. }
  485. bool NativeRawSymbol::isPointerToMemberFunction() const {
  486. return false;
  487. }
  488. bool NativeRawSymbol::isPureVirtual() const {
  489. return false;
  490. }
  491. bool NativeRawSymbol::isRValueReference() const {
  492. return false;
  493. }
  494. bool NativeRawSymbol::isRefUdt() const {
  495. return false;
  496. }
  497. bool NativeRawSymbol::isReference() const {
  498. return false;
  499. }
  500. bool NativeRawSymbol::isRestrictedType() const {
  501. return false;
  502. }
  503. bool NativeRawSymbol::isReturnValue() const {
  504. return false;
  505. }
  506. bool NativeRawSymbol::isSafeBuffers() const {
  507. return false;
  508. }
  509. bool NativeRawSymbol::isScoped() const {
  510. return false;
  511. }
  512. bool NativeRawSymbol::isSdl() const {
  513. return false;
  514. }
  515. bool NativeRawSymbol::isSingleInheritance() const {
  516. return false;
  517. }
  518. bool NativeRawSymbol::isSplitted() const {
  519. return false;
  520. }
  521. bool NativeRawSymbol::isStatic() const {
  522. return false;
  523. }
  524. bool NativeRawSymbol::hasPrivateSymbols() const {
  525. return false;
  526. }
  527. bool NativeRawSymbol::isUnalignedType() const {
  528. return false;
  529. }
  530. bool NativeRawSymbol::isUnreached() const {
  531. return false;
  532. }
  533. bool NativeRawSymbol::isValueUdt() const {
  534. return false;
  535. }
  536. bool NativeRawSymbol::isVirtual() const {
  537. return false;
  538. }
  539. bool NativeRawSymbol::isVirtualBaseClass() const {
  540. return false;
  541. }
  542. bool NativeRawSymbol::isVirtualInheritance() const {
  543. return false;
  544. }
  545. bool NativeRawSymbol::isVolatileType() const {
  546. return false;
  547. }
  548. bool NativeRawSymbol::wasInlined() const {
  549. return false;
  550. }
  551. std::string NativeRawSymbol::getUnused() const {
  552. return {};
  553. }