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