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

source code of llvm/lib/DebugInfo/PDB/Native/NativeRawSymbol.cpp