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