LLVM  6.0.0svn
SymbolRecord.h
Go to the documentation of this file.
1 //===- SymbolRecord.h -------------------------------------------*- C++ -*-===//
2 //
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 #ifndef LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORD_H
11 #define LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORD_H
12 
13 #include "llvm/ADT/APSInt.h"
14 #include "llvm/ADT/ArrayRef.h"
15 #include "llvm/ADT/Optional.h"
16 #include "llvm/ADT/StringRef.h"
23 #include "llvm/Support/Endian.h"
24 #include <cstdint>
25 #include <vector>
26 
27 namespace llvm {
28 namespace codeview {
29 
30 class SymbolRecord {
31 protected:
32  explicit SymbolRecord(SymbolRecordKind Kind) : Kind(Kind) {}
33 
34 public:
35  SymbolRecordKind getKind() const { return Kind; }
36 
38 };
39 
40 // S_GPROC32, S_LPROC32, S_GPROC32_ID, S_LPROC32_ID, S_LPROC32_DPC or
41 // S_LPROC32_DPC_ID
42 class ProcSym : public SymbolRecord {
43  static constexpr uint32_t RelocationOffset = 32;
44 
45 public:
48  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
49 
51  return RecordOffset + RelocationOffset;
52  }
53 
54  uint32_t Parent = 0;
56  uint32_t Next = 0;
57  uint32_t CodeSize = 0;
58  uint32_t DbgStart = 0;
59  uint32_t DbgEnd = 0;
62  uint16_t Segment = 0;
65 
66  uint32_t RecordOffset = 0;
67 };
68 
69 // S_THUNK32
70 class Thunk32Sym : public SymbolRecord {
71 public:
74  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
75 
80  uint16_t Segment;
81  uint16_t Length;
85 
87 };
88 
89 // S_TRAMPOLINE
90 class TrampolineSym : public SymbolRecord {
91 public:
94  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
95 
97  uint16_t Size;
100  uint16_t ThunkSection;
101  uint16_t TargetSection;
102 
104 };
105 
106 // S_SECTION
107 class SectionSym : public SymbolRecord {
108 public:
111  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
112 
113  uint16_t SectionNumber;
114  uint8_t Alignment;
119 
121 };
122 
123 // S_COFFGROUP
124 class CoffGroupSym : public SymbolRecord {
125 public:
128  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
129 
133  uint16_t Segment;
135 
137 };
138 
139 class ScopeEndSym : public SymbolRecord {
140 public:
143  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
144 
146 };
147 
148 class CallerSym : public SymbolRecord {
149 public:
152  : SymbolRecord(Kind), RecordOffset(RecordOffset) {}
153 
154  std::vector<TypeIndex> Indices;
155 
157 };
158 
160  struct AnnotationData {
165  int32_t S1;
166  };
167 
168  BinaryAnnotationIterator() = default;
169  BinaryAnnotationIterator(ArrayRef<uint8_t> Annotations) : Data(Annotations) {}
171  : Data(Other.Data) {}
172 
174  return Data == Other.Data;
175  }
176 
178  return !(*this == Other);
179  }
180 
182  Data = Other.Data;
183  return *this;
184  }
185 
187  if (!ParseCurrentAnnotation()) {
188  *this = BinaryAnnotationIterator();
189  return *this;
190  }
191  Data = Next;
192  Next = ArrayRef<uint8_t>();
193  Current.reset();
194  return *this;
195  }
196 
198  BinaryAnnotationIterator Orig(*this);
199  ++(*this);
200  return Orig;
201  }
202 
204  ParseCurrentAnnotation();
205  return Current.getValue();
206  }
207 
208 private:
209  static uint32_t GetCompressedAnnotation(ArrayRef<uint8_t> &Annotations) {
210  if (Annotations.empty())
211  return -1;
212 
213  uint8_t FirstByte = Annotations.front();
214  Annotations = Annotations.drop_front();
215 
216  if ((FirstByte & 0x80) == 0x00)
217  return FirstByte;
218 
219  if (Annotations.empty())
220  return -1;
221 
222  uint8_t SecondByte = Annotations.front();
223  Annotations = Annotations.drop_front();
224 
225  if ((FirstByte & 0xC0) == 0x80)
226  return ((FirstByte & 0x3F) << 8) | SecondByte;
227 
228  if (Annotations.empty())
229  return -1;
230 
231  uint8_t ThirdByte = Annotations.front();
232  Annotations = Annotations.drop_front();
233 
234  if (Annotations.empty())
235  return -1;
236 
237  uint8_t FourthByte = Annotations.front();
238  Annotations = Annotations.drop_front();
239 
240  if ((FirstByte & 0xE0) == 0xC0)
241  return ((FirstByte & 0x1F) << 24) | (SecondByte << 16) |
242  (ThirdByte << 8) | FourthByte;
243 
244  return -1;
245  };
246 
247  static int32_t DecodeSignedOperand(uint32_t Operand) {
248  if (Operand & 1)
249  return -(Operand >> 1);
250  return Operand >> 1;
251  };
252 
253  static int32_t DecodeSignedOperand(ArrayRef<uint8_t> &Annotations) {
254  return DecodeSignedOperand(GetCompressedAnnotation(Annotations));
255  };
256 
257  bool ParseCurrentAnnotation() {
258  if (Current.hasValue())
259  return true;
260 
261  Next = Data;
262  uint32_t Op = GetCompressedAnnotation(Next);
263  AnnotationData Result;
264  Result.OpCode = static_cast<BinaryAnnotationsOpCode>(Op);
265  switch (Result.OpCode) {
267  Result.Name = "Invalid";
268  Next = ArrayRef<uint8_t>();
269  break;
271  Result.Name = "CodeOffset";
272  Result.U1 = GetCompressedAnnotation(Next);
273  break;
275  Result.Name = "ChangeCodeOffsetBase";
276  Result.U1 = GetCompressedAnnotation(Next);
277  break;
279  Result.Name = "ChangeCodeOffset";
280  Result.U1 = GetCompressedAnnotation(Next);
281  break;
283  Result.Name = "ChangeCodeLength";
284  Result.U1 = GetCompressedAnnotation(Next);
285  break;
287  Result.Name = "ChangeFile";
288  Result.U1 = GetCompressedAnnotation(Next);
289  break;
291  Result.Name = "ChangeLineEndDelta";
292  Result.U1 = GetCompressedAnnotation(Next);
293  break;
295  Result.Name = "ChangeRangeKind";
296  Result.U1 = GetCompressedAnnotation(Next);
297  break;
299  Result.Name = "ChangeColumnStart";
300  Result.U1 = GetCompressedAnnotation(Next);
301  break;
303  Result.Name = "ChangeColumnEnd";
304  Result.U1 = GetCompressedAnnotation(Next);
305  break;
307  Result.Name = "ChangeLineOffset";
308  Result.S1 = DecodeSignedOperand(Next);
309  break;
311  Result.Name = "ChangeColumnEndDelta";
312  Result.S1 = DecodeSignedOperand(Next);
313  break;
315  Result.Name = "ChangeCodeOffsetAndLineOffset";
316  uint32_t Annotation = GetCompressedAnnotation(Next);
317  Result.S1 = DecodeSignedOperand(Annotation >> 4);
318  Result.U1 = Annotation & 0xf;
319  break;
320  }
322  Result.Name = "ChangeCodeLengthAndCodeOffset";
323  Result.U1 = GetCompressedAnnotation(Next);
324  Result.U2 = GetCompressedAnnotation(Next);
325  break;
326  }
327  }
328  Current = Result;
329  return true;
330  }
331 
332  Optional<AnnotationData> Current;
334  ArrayRef<uint8_t> Next;
335 };
336 
337 // S_INLINESITE
338 class InlineSiteSym : public SymbolRecord {
339 public:
341  InlineSiteSym(uint32_t RecordOffset)
343  RecordOffset(RecordOffset) {}
344 
346  return make_range(BinaryAnnotationIterator(AnnotationData),
348  }
349 
353  std::vector<uint8_t> AnnotationData;
354 
356 };
357 
358 // S_PUB32
359 class PublicSym32 : public SymbolRecord {
360 public:
362  explicit PublicSym32(uint32_t RecordOffset)
364  RecordOffset(RecordOffset) {}
365 
368  uint16_t Segment = 0;
370 
371  uint32_t RecordOffset = 0;
372 };
373 
374 // S_REGISTER
375 class RegisterSym : public SymbolRecord {
376 public:
378  RegisterSym(uint32_t RecordOffset)
380  RecordOffset(RecordOffset) {}
381 
385 
387 };
388 
389 // S_PROCREF, S_LPROCREF
390 class ProcRefSym : public SymbolRecord {
391 public:
393  explicit ProcRefSym(uint32_t RecordOffset)
394  : SymbolRecord(SymbolRecordKind::ProcRefSym), RecordOffset(RecordOffset) {
395  }
396 
399  uint16_t Module;
401 
403 };
404 
405 // S_LOCAL
406 class LocalSym : public SymbolRecord {
407 public:
409  explicit LocalSym(uint32_t RecordOffset)
410  : SymbolRecord(SymbolRecordKind::LocalSym), RecordOffset(RecordOffset) {}
411 
415 
417 };
418 
421  uint16_t ISectStart;
422  uint16_t Range;
423 };
424 
426  uint16_t GapStartOffset;
427  uint16_t Range;
428 };
429 
430 enum : uint16_t { MaxDefRange = 0xf000 };
431 
432 // S_DEFRANGE
433 class DefRangeSym : public SymbolRecord {
434  static constexpr uint32_t RelocationOffset = 8;
435 
436 public:
438  explicit DefRangeSym(uint32_t RecordOffset)
440  RecordOffset(RecordOffset) {}
441 
443  return RecordOffset + RelocationOffset;
444  }
445 
448  std::vector<LocalVariableAddrGap> Gaps;
449 
451 };
452 
453 // S_DEFRANGE_SUBFIELD
455  static constexpr uint32_t RelocationOffset = 12;
456 
457 public:
461  RecordOffset(RecordOffset) {}
462 
464  return RecordOffset + RelocationOffset;
465  }
466 
468  uint16_t OffsetInParent;
470  std::vector<LocalVariableAddrGap> Gaps;
471 
473 };
474 
475 // S_DEFRANGE_REGISTER
477 public:
478  struct Header {
481  };
482 
486  RecordOffset(RecordOffset) {}
487 
488  uint32_t getRelocationOffset() const { return RecordOffset + sizeof(Header); }
489 
492  std::vector<LocalVariableAddrGap> Gaps;
493 
495 };
496 
497 // S_DEFRANGE_SUBFIELD_REGISTER
499 public:
500  struct Header {
504  };
505 
507  : SymbolRecord(Kind) {}
510  RecordOffset(RecordOffset) {}
511 
512  uint32_t getRelocationOffset() const { return RecordOffset + sizeof(Header); }
513 
516  std::vector<LocalVariableAddrGap> Gaps;
517 
519 };
520 
521 // S_DEFRANGE_FRAMEPOINTER_REL
523  static constexpr uint32_t RelocationOffset = 8;
524 
525 public:
527  : SymbolRecord(Kind) {}
530  RecordOffset(RecordOffset) {}
531 
533  return RecordOffset + RelocationOffset;
534  }
535 
536  int32_t Offset;
538  std::vector<LocalVariableAddrGap> Gaps;
539 
541 };
542 
543 // S_DEFRANGE_REGISTER_REL
545 public:
546  struct Header {
550  };
551 
553  explicit DefRangeRegisterRelSym(uint32_t RecordOffset)
555  RecordOffset(RecordOffset) {}
556 
557  // The flags implement this notional bitfield:
558  // uint16_t IsSubfield : 1;
559  // uint16_t Padding : 3;
560  // uint16_t OffsetInParent : 12;
561  enum : uint16_t {
562  IsSubfieldFlag = 1,
563  OffsetInParentShift = 4,
564  };
565 
566  bool hasSpilledUDTMember() const { return Hdr.Flags & IsSubfieldFlag; }
567  uint16_t offsetInParent() const { return Hdr.Flags >> OffsetInParentShift; }
568 
569  uint32_t getRelocationOffset() const { return RecordOffset + sizeof(Header); }
570 
573  std::vector<LocalVariableAddrGap> Gaps;
574 
576 };
577 
578 // S_DEFRANGE_FRAMEPOINTER_REL_FULL_SCOPE
580 public:
582  : SymbolRecord(Kind) {}
585  RecordOffset(RecordOffset) {}
586 
587  int32_t Offset;
588 
590 };
591 
592 // S_BLOCK32
593 class BlockSym : public SymbolRecord {
594  static constexpr uint32_t RelocationOffset = 16;
595 
596 public:
598  explicit BlockSym(uint32_t RecordOffset)
599  : SymbolRecord(SymbolRecordKind::BlockSym), RecordOffset(RecordOffset) {}
600 
602  return RecordOffset + RelocationOffset;
603  }
604 
609  uint16_t Segment;
611 
613 };
614 
615 // S_LABEL32
616 class LabelSym : public SymbolRecord {
617  static constexpr uint32_t RelocationOffset = 4;
618 
619 public:
621  explicit LabelSym(uint32_t RecordOffset)
622  : SymbolRecord(SymbolRecordKind::LabelSym), RecordOffset(RecordOffset) {}
623 
625  return RecordOffset + RelocationOffset;
626  }
627 
629  uint16_t Segment;
632 
634 };
635 
636 // S_OBJNAME
637 class ObjNameSym : public SymbolRecord {
638 public:
640  ObjNameSym(uint32_t RecordOffset)
641  : SymbolRecord(SymbolRecordKind::ObjNameSym), RecordOffset(RecordOffset) {
642  }
643 
646 
648 };
649 
650 // S_ENVBLOCK
651 class EnvBlockSym : public SymbolRecord {
652 public:
654  EnvBlockSym(uint32_t RecordOffset)
656  RecordOffset(RecordOffset) {}
657 
658  std::vector<StringRef> Fields;
659 
661 };
662 
663 // S_EXPORT
664 class ExportSym : public SymbolRecord {
665 public:
667  ExportSym(uint32_t RecordOffset)
668  : SymbolRecord(SymbolRecordKind::ExportSym), RecordOffset(RecordOffset) {}
669 
670  uint16_t Ordinal;
673 
675 };
676 
677 // S_FILESTATIC
678 class FileStaticSym : public SymbolRecord {
679 public:
681  FileStaticSym(uint32_t RecordOffset)
683  RecordOffset(RecordOffset) {}
684 
689 
691 };
692 
693 // S_COMPILE2
694 class Compile2Sym : public SymbolRecord {
695 public:
697  Compile2Sym(uint32_t RecordOffset)
699  RecordOffset(RecordOffset) {}
700 
710  std::vector<StringRef> ExtraStrings;
711 
712  uint8_t getLanguage() const { return static_cast<uint32_t>(Flags) & 0xFF; }
713  uint32_t getFlags() const { return static_cast<uint32_t>(Flags) & ~0xFF; }
714 
716 };
717 
718 // S_COMPILE3
719 class Compile3Sym : public SymbolRecord {
720 public:
722  Compile3Sym(uint32_t RecordOffset)
724  RecordOffset(RecordOffset) {}
725 
737 
739  Flags = CompileSym3Flags((uint32_t(Flags) & 0xFFFFFF00) | uint32_t(Lang));
740  }
741 
742  uint8_t getLanguage() const { return static_cast<uint32_t>(Flags) & 0xFF; }
743  uint32_t getFlags() const { return static_cast<uint32_t>(Flags) & ~0xFF; }
744 
746 };
747 
748 // S_FRAMEPROC
749 class FrameProcSym : public SymbolRecord {
750 public:
752  explicit FrameProcSym(uint32_t RecordOffset)
754  RecordOffset(RecordOffset) {}
755 
763 
765 };
766 
767 // S_CALLSITEINFO
769  static constexpr uint32_t RelocationOffset = 4;
770 
771 public:
773  explicit CallSiteInfoSym(uint32_t RecordOffset)
775 
777  return RecordOffset + RelocationOffset;
778  }
779 
781  uint16_t Segment;
783 
785 };
786 
787 // S_HEAPALLOCSITE
789  static constexpr uint32_t RelocationOffset = 4;
790 
791 public:
793  explicit HeapAllocationSiteSym(uint32_t RecordOffset)
795  RecordOffset(RecordOffset) {}
796 
798  return RecordOffset + RelocationOffset;
799  }
800 
802  uint16_t Segment;
805 
807 };
808 
809 // S_FRAMECOOKIE
810 class FrameCookieSym : public SymbolRecord {
811  static constexpr uint32_t RelocationOffset = 4;
812 
813 public:
815  explicit FrameCookieSym(uint32_t RecordOffset)
817 
819  return RecordOffset + RelocationOffset;
820  }
821 
823  uint16_t Register;
825  uint8_t Flags;
826 
828 };
829 
830 // S_UDT, S_COBOLUDT
831 class UDTSym : public SymbolRecord {
832 public:
834  explicit UDTSym(uint32_t RecordOffset)
836 
839 
841 };
842 
843 // S_BUILDINFO
844 class BuildInfoSym : public SymbolRecord {
845 public:
847  BuildInfoSym(uint32_t RecordOffset)
849  RecordOffset(RecordOffset) {}
850 
852 
854 };
855 
856 // S_BPREL32
857 class BPRelativeSym : public SymbolRecord {
858 public:
860  explicit BPRelativeSym(uint32_t RecordOffset)
862  RecordOffset(RecordOffset) {}
863 
864  int32_t Offset;
867 
869 };
870 
871 // S_REGREL32
872 class RegRelativeSym : public SymbolRecord {
873 public:
875  explicit RegRelativeSym(uint32_t RecordOffset)
877  RecordOffset(RecordOffset) {}
878 
883 
885 };
886 
887 // S_CONSTANT, S_MANCONSTANT
888 class ConstantSym : public SymbolRecord {
889 public:
891  ConstantSym(uint32_t RecordOffset)
893  RecordOffset(RecordOffset) {}
894 
898 
900 };
901 
902 // S_LDATA32, S_GDATA32, S_LMANDATA, S_GMANDATA
903 class DataSym : public SymbolRecord {
904  static constexpr uint32_t RelocationOffset = 8;
905 
906 public:
908  DataSym(uint32_t RecordOffset)
909  : SymbolRecord(SymbolRecordKind::DataSym), RecordOffset(RecordOffset) {}
910 
912  return RecordOffset + RelocationOffset;
913  }
914 
917  uint16_t Segment;
919 
921 };
922 
923 // S_LTHREAD32, S_GTHREAD32
925  static constexpr uint32_t RelocationOffset = 8;
926 
927 public:
929  explicit ThreadLocalDataSym(uint32_t RecordOffset)
931  RecordOffset(RecordOffset) {}
932 
934  return RecordOffset + RelocationOffset;
935  }
936 
939  uint16_t Segment;
941 
943 };
944 
945 // S_ANNOTATION
946 
949 
951  uint32_t Offset);
952 
953 } // end namespace codeview
954 } // end namespace llvm
955 
956 #endif // LLVM_DEBUGINFO_CODEVIEW_SYMBOLRECORD_H
const T & front() const
front - Get the first element.
Definition: ArrayRef.h:152
DefRangeFramePointerRelSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:526
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:776
SymbolRecordKind
Distinguishes individual records in the Symbols subsection of a .debug$S section. ...
Definition: CodeView.h:41
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:818
ObjNameSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:640
Thunk32Sym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:73
CompileSym3Flags
Corresponds to COMPILESYM3::Flags bitfield.
Definition: CodeView.h:451
DefRangeSubfieldRegisterSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:506
UDTSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:833
BPRelativeSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:859
LocalSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:408
PublicSym32(SymbolRecordKind Kind)
Definition: SymbolRecord.h:361
FrameProcedureOptions Flags
Definition: SymbolRecord.h:762
This provides a very simple, boring adaptor for a begin and end iterator into a range type...
uint8_t getLanguage() const
Definition: SymbolRecord.h:742
bool operator!=(const BinaryAnnotationIterator &Other) const
Definition: SymbolRecord.h:177
ProcRefSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:393
ScopeEndSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:141
uint32_t getFlags() const
Definition: SymbolRecord.h:743
detail::packed_endian_specific_integral< uint16_t, little, unaligned > ulittle16_t
Definition: Endian.h:269
BlockSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:598
ConstantSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:891
RegRelativeSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:874
ConstantSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:890
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:516
EnvBlockSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:653
ArrayRef< uint8_t > VariantData
Definition: SymbolRecord.h:84
void setLanguage(SourceLanguage Lang)
Definition: SymbolRecord.h:738
UDTSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:834
CallerSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:151
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:573
std::vector< uint8_t > AnnotationData
Definition: SymbolRecord.h:353
DefRangeRegisterSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:484
ProcRefSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:392
Tagged union holding either a T or a Error.
Definition: CachePruning.h:23
ThreadLocalDataSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:929
DefRangeRegisterRelSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:553
LabelSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:620
uint8_t getLanguage() const
Definition: SymbolRecord.h:712
EnvBlockSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:654
std::vector< StringRef > ExtraStrings
Definition: SymbolRecord.h:710
BinaryAnnotationIterator(const BinaryAnnotationIterator &Other)
Definition: SymbolRecord.h:170
PublicSymFlags
Corresponds to the CV_PUBSYMFLAGS bitfield.
Definition: CodeView.h:411
A 32-bit type reference.
Definition: TypeIndex.h:96
CallSiteInfoSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:772
RegisterSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:377
InlineSiteSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:341
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:442
BinaryAnnotationIterator(ArrayRef< uint8_t > Annotations)
Definition: SymbolRecord.h:169
BlockSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:597
FrameCookieSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:814
DataSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:908
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:492
ExportSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:667
detail::packed_endian_specific_integral< uint32_t, little, unaligned > ulittle32_t
Definition: Endian.h:271
FrameProcSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:751
RegRelativeSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:875
HeapAllocationSiteSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:793
std::vector< StringRef > Fields
Definition: SymbolRecord.h:658
LocalVariableAddrRange Range
Definition: SymbolRecord.h:447
BPRelativeSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:860
DefRangeSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:438
DefRangeRegisterSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:483
BinaryAnnotationIterator operator++(int)
Definition: SymbolRecord.h:197
DataSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:907
static const unsigned End
uint32_t getFlags() const
Definition: SymbolRecord.h:713
SectionSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:110
std::vector< TypeIndex > Indices
Definition: SymbolRecord.h:154
const AnnotationData & operator*()
Definition: SymbolRecord.h:203
LocalVariableAddrRange Range
Definition: SymbolRecord.h:491
ProcSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:47
DefRangeSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:437
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:448
BinaryAnnotationIterator & operator=(const BinaryAnnotationIterator Other)
Definition: SymbolRecord.h:181
PublicSym32(uint32_t RecordOffset)
Definition: SymbolRecord.h:362
BinaryAnnotationIterator & operator++()
Definition: SymbolRecord.h:186
LocalVariableAddrRange Range
Definition: SymbolRecord.h:469
ThreadLocalDataSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:928
Expected< CVSymbol > readSymbolFromStream(BinaryStreamRef Stream, uint32_t Offset)
iterator_range< T > make_range(T x, T y)
Convenience function for iterating over sub-ranges.
SourceLanguage
These values correspond to the CV_CFL_LANG enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bw3aekw6.aspx.
Definition: CodeView.h:144
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:911
SymbolRecordKind getKind() const
Definition: SymbolRecord.h:35
BinaryStreamRef is to BinaryStream what ArrayRef is to an Array.
CPUType
These values correspond to the CV_CPU_TYPE_e enumeration, and are documented here: https://msdn...
Definition: CodeView.h:79
TrampolineSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:93
Compile3Sym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:721
FrameProcSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:752
A range adaptor for a pair of iterators.
Thunk32Sym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:72
FrameCookieSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:815
ScopeEndSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:142
CoffGroupSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:126
bool operator==(BinaryAnnotationIterator Other) const
Definition: SymbolRecord.h:173
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:538
DefRangeFramePointerRelSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:528
ArrayRef< T > drop_front(size_t N=1) const
Drop the first N elements of the array.
Definition: ArrayRef.h:188
LabelSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:621
detail::packed_endian_specific_integral< int32_t, little, unaligned > little32_t
Definition: Endian.h:278
HeapAllocationSiteSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:792
InlineSiteSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:340
SectionSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:109
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:50
CallerSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:150
LocalSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:409
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:624
FileStaticSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:680
ThunkOrdinal
These values correspond to the THUNK_ORDINAL enumeration.
Definition: CodeView.h:514
RegisterSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:378
iterator_range< BinaryAnnotationIterator > annotations() const
Definition: SymbolRecord.h:345
CoffGroupSym(SymbolRecordKind Kind, uint32_t RecordOffset)
Definition: SymbolRecord.h:127
TrampolineSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:92
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:470
Compile3Sym(uint32_t RecordOffset)
Definition: SymbolRecord.h:722
BuildInfoSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:846
DefRangeRegisterRelSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:552
BuildInfoSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:847
CallSiteInfoSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:773
ObjNameSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:639
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:601
ProcSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:46
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49
ProcSymFlags
Corresponds to the CV_PROCFLAGS bitfield.
Definition: CodeView.h:421
LocalSymFlags
Corresponds to CV_LVARFLAGS bitfield.
Definition: CodeView.h:394
Compile2Sym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:696
DefRangeSubfieldRegisterSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:508
FileStaticSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:681
DefRangeSubfieldSym(uint32_t RecordOffset)
Definition: SymbolRecord.h:459
CompileSym2Flags
Corresponds to COMPILESYM2::Flags bitfield.
Definition: CodeView.h:435
ExportSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:666
DefRangeSubfieldSym(SymbolRecordKind Kind)
Definition: SymbolRecord.h:458
SymbolRecord(SymbolRecordKind Kind)
Definition: SymbolRecord.h:32
bool empty() const
empty - Check if the array is empty.
Definition: ArrayRef.h:144
Compile2Sym(uint32_t RecordOffset)
Definition: SymbolRecord.h:697