LLVM  5.0.0
SymbolDumper.cpp
Go to the documentation of this file.
1 //===-- SymbolDumper.cpp - CodeView symbol info dumper ----------*- 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 
11 #include "llvm/ADT/DenseMap.h"
12 #include "llvm/ADT/SmallString.h"
22 #include "llvm/Support/Error.h"
24 
25 #include <system_error>
26 
27 using namespace llvm;
28 using namespace llvm::codeview;
29 
30 namespace {
31 /// Use this private dumper implementation to keep implementation details about
32 /// the visitor out of SymbolDumper.h.
33 class CVSymbolDumperImpl : public SymbolVisitorCallbacks {
34 public:
35  CVSymbolDumperImpl(TypeCollection &Types, SymbolDumpDelegate *ObjDelegate,
36  ScopedPrinter &W, bool PrintRecordBytes)
37  : Types(Types), ObjDelegate(ObjDelegate), W(W),
38  PrintRecordBytes(PrintRecordBytes), InFunctionScope(false) {}
39 
40 /// CVSymbolVisitor overrides.
41 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
42  Error visitKnownRecord(CVSymbol &CVR, Name &Record) override;
43 #define SYMBOL_RECORD_ALIAS(EnumName, EnumVal, Name, AliasName)
44 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
45 
46  Error visitSymbolBegin(CVSymbol &Record) override;
47  Error visitSymbolEnd(CVSymbol &Record) override;
48  Error visitUnknownSymbol(CVSymbol &Record) override;
49 
50 private:
51  void printLocalVariableAddrRange(const LocalVariableAddrRange &Range,
52  uint32_t RelocationOffset);
53  void printLocalVariableAddrGap(ArrayRef<LocalVariableAddrGap> Gaps);
54  void printTypeIndex(StringRef FieldName, TypeIndex TI);
55 
56  TypeCollection &Types;
57  SymbolDumpDelegate *ObjDelegate;
58  ScopedPrinter &W;
59 
60  bool PrintRecordBytes;
61  bool InFunctionScope;
62 };
63 }
64 
66  switch (Kind) {
67 #define SYMBOL_RECORD(EnumName, EnumVal, Name) \
68  case EnumName: \
69  return #Name;
70 #include "llvm/DebugInfo/CodeView/CodeViewSymbols.def"
71  default:
72  break;
73  }
74  return "UnknownSym";
75 }
76 
77 void CVSymbolDumperImpl::printLocalVariableAddrRange(
78  const LocalVariableAddrRange &Range, uint32_t RelocationOffset) {
79  DictScope S(W, "LocalVariableAddrRange");
80  if (ObjDelegate)
81  ObjDelegate->printRelocatedField("OffsetStart", RelocationOffset,
82  Range.OffsetStart);
83  W.printHex("ISectStart", Range.ISectStart);
84  W.printHex("Range", Range.Range);
85 }
86 
87 void CVSymbolDumperImpl::printLocalVariableAddrGap(
89  for (auto &Gap : Gaps) {
90  ListScope S(W, "LocalVariableAddrGap");
91  W.printHex("GapStartOffset", Gap.GapStartOffset);
92  W.printHex("Range", Gap.Range);
93  }
94 }
95 
97  codeview::printTypeIndex(W, FieldName, TI, Types);
98 }
99 
100 Error CVSymbolDumperImpl::visitSymbolBegin(CVSymbol &CVR) {
101  W.startLine() << getSymbolKindName(CVR.Type);
102  W.getOStream() << " {\n";
103  W.indent();
104  W.printEnum("Kind", unsigned(CVR.Type), getSymbolTypeNames());
105  return Error::success();
106 }
107 
108 Error CVSymbolDumperImpl::visitSymbolEnd(CVSymbol &CVR) {
109  if (PrintRecordBytes && ObjDelegate)
110  ObjDelegate->printBinaryBlockWithRelocs("SymData", CVR.content());
111 
112  W.unindent();
113  W.startLine() << "}\n";
114  return Error::success();
115 }
116 
119  W.printHex("PtrParent", Block.Parent);
120  W.printHex("PtrEnd", Block.End);
121  W.printHex("CodeSize", Block.CodeSize);
122  if (ObjDelegate) {
123  ObjDelegate->printRelocatedField("CodeOffset", Block.getRelocationOffset(),
124  Block.CodeOffset, &LinkageName);
125  }
126  W.printHex("Segment", Block.Segment);
127  W.printString("BlockName", Block.Name);
128  W.printString("LinkageName", LinkageName);
129  return Error::success();
130 }
131 
133  W.printNumber("Parent", Thunk.Parent);
134  W.printNumber("End", Thunk.End);
135  W.printNumber("Next", Thunk.Next);
136  W.printNumber("Off", Thunk.Offset);
137  W.printNumber("Seg", Thunk.Segment);
138  W.printNumber("Len", Thunk.Length);
139  W.printEnum("Ordinal", uint8_t(Thunk.Thunk), getThunkOrdinalNames());
140  return Error::success();
141 }
142 
144  TrampolineSym &Tramp) {
145  W.printEnum("Type", uint16_t(Tramp.Type), getTrampolineNames());
146  W.printNumber("Size", Tramp.Size);
147  W.printNumber("ThunkOff", Tramp.ThunkOffset);
148  W.printNumber("TargetOff", Tramp.TargetOffset);
149  W.printNumber("ThunkSection", Tramp.ThunkSection);
150  W.printNumber("TargetSection", Tramp.TargetSection);
151  return Error::success();
152 }
153 
155  W.printNumber("SectionNumber", Section.SectionNumber);
156  W.printNumber("Alignment", Section.Alignment);
157  W.printNumber("Rva", Section.Rva);
158  W.printNumber("Length", Section.Length);
159  W.printFlags("Characteristics", Section.Characteristics,
161  COFF::SectionCharacteristics(0x00F00000));
162 
163  W.printString("Name", Section.Name);
164  return Error::success();
165 }
166 
168  CoffGroupSym &CoffGroup) {
169  W.printNumber("Size", CoffGroup.Size);
170  W.printFlags("Characteristics", CoffGroup.Characteristics,
172  COFF::SectionCharacteristics(0x00F00000));
173  W.printNumber("Offset", CoffGroup.Offset);
174  W.printNumber("Segment", CoffGroup.Segment);
175  W.printString("Name", CoffGroup.Name);
176  return Error::success();
177 }
178 
180  BPRelativeSym &BPRel) {
181  W.printNumber("Offset", BPRel.Offset);
182  printTypeIndex("Type", BPRel.Type);
183  W.printString("VarName", BPRel.Name);
184  return Error::success();
185 }
186 
188  BuildInfoSym &BuildInfo) {
189  printTypeIndex("BuildId", BuildInfo.BuildId);
190  return Error::success();
191 }
192 
194  CallSiteInfoSym &CallSiteInfo) {
195  StringRef LinkageName;
196  if (ObjDelegate) {
197  ObjDelegate->printRelocatedField("CodeOffset",
198  CallSiteInfo.getRelocationOffset(),
199  CallSiteInfo.CodeOffset, &LinkageName);
200  }
201  W.printHex("Segment", CallSiteInfo.Segment);
202  printTypeIndex("Type", CallSiteInfo.Type);
203  if (!LinkageName.empty())
204  W.printString("LinkageName", LinkageName);
205  return Error::success();
206 }
207 
209  EnvBlockSym &EnvBlock) {
210  ListScope L(W, "Entries");
211  for (auto Entry : EnvBlock.Fields) {
212  W.printString(Entry);
213  }
214  return Error::success();
215 }
216 
218  FileStaticSym &FileStatic) {
219  printTypeIndex("Index", FileStatic.Index);
220  W.printNumber("ModFilenameOffset", FileStatic.ModFilenameOffset);
221  W.printFlags("Flags", uint16_t(FileStatic.Flags), getLocalFlagNames());
222  W.printString("Name", FileStatic.Name);
223  return Error::success();
224 }
225 
227  W.printNumber("Ordinal", Export.Ordinal);
228  W.printFlags("Flags", uint16_t(Export.Flags), getExportSymFlagNames());
229  W.printString("Name", Export.Name);
230  return Error::success();
231 }
232 
234  Compile2Sym &Compile2) {
235  W.printEnum("Language", Compile2.getLanguage(), getSourceLanguageNames());
236  W.printFlags("Flags", Compile2.getFlags(), getCompileSym2FlagNames());
237  W.printEnum("Machine", unsigned(Compile2.Machine), getCPUTypeNames());
238  std::string FrontendVersion;
239  {
240  raw_string_ostream Out(FrontendVersion);
241  Out << Compile2.VersionFrontendMajor << '.' << Compile2.VersionFrontendMinor
242  << '.' << Compile2.VersionFrontendBuild;
243  }
244  std::string BackendVersion;
245  {
246  raw_string_ostream Out(BackendVersion);
247  Out << Compile2.VersionBackendMajor << '.' << Compile2.VersionBackendMinor
248  << '.' << Compile2.VersionBackendBuild;
249  }
250  W.printString("FrontendVersion", FrontendVersion);
251  W.printString("BackendVersion", BackendVersion);
252  W.printString("VersionName", Compile2.Version);
253  return Error::success();
254 }
255 
257  Compile3Sym &Compile3) {
258  W.printEnum("Language", Compile3.getLanguage(), getSourceLanguageNames());
259  W.printFlags("Flags", Compile3.getFlags(), getCompileSym3FlagNames());
260  W.printEnum("Machine", unsigned(Compile3.Machine), getCPUTypeNames());
261  std::string FrontendVersion;
262  {
263  raw_string_ostream Out(FrontendVersion);
264  Out << Compile3.VersionFrontendMajor << '.' << Compile3.VersionFrontendMinor
265  << '.' << Compile3.VersionFrontendBuild << '.'
266  << Compile3.VersionFrontendQFE;
267  }
268  std::string BackendVersion;
269  {
270  raw_string_ostream Out(BackendVersion);
271  Out << Compile3.VersionBackendMajor << '.' << Compile3.VersionBackendMinor
272  << '.' << Compile3.VersionBackendBuild << '.'
273  << Compile3.VersionBackendQFE;
274  }
275  W.printString("FrontendVersion", FrontendVersion);
276  W.printString("BackendVersion", BackendVersion);
277  W.printString("VersionName", Compile3.Version);
278  return Error::success();
279 }
280 
283  printTypeIndex("Type", Constant.Type);
284  W.printNumber("Value", Constant.Value);
285  W.printString("Name", Constant.Name);
286  return Error::success();
287 }
288 
290  StringRef LinkageName;
291  if (ObjDelegate) {
292  ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
293  Data.DataOffset, &LinkageName);
294  }
295  printTypeIndex("Type", Data.Type);
296  W.printString("DisplayName", Data.Name);
297  if (!LinkageName.empty())
298  W.printString("LinkageName", LinkageName);
299  return Error::success();
300 }
301 
303  CVSymbol &CVR,
304  DefRangeFramePointerRelFullScopeSym &DefRangeFramePointerRelFullScope) {
305  W.printNumber("Offset", DefRangeFramePointerRelFullScope.Offset);
306  return Error::success();
307 }
308 
310  CVSymbol &CVR, DefRangeFramePointerRelSym &DefRangeFramePointerRel) {
311  W.printNumber("Offset", DefRangeFramePointerRel.Offset);
312  printLocalVariableAddrRange(DefRangeFramePointerRel.Range,
313  DefRangeFramePointerRel.getRelocationOffset());
314  printLocalVariableAddrGap(DefRangeFramePointerRel.Gaps);
315  return Error::success();
316 }
317 
319  CVSymbol &CVR, DefRangeRegisterRelSym &DefRangeRegisterRel) {
320  W.printNumber("BaseRegister", DefRangeRegisterRel.Hdr.Register);
321  W.printBoolean("HasSpilledUDTMember",
322  DefRangeRegisterRel.hasSpilledUDTMember());
323  W.printNumber("OffsetInParent", DefRangeRegisterRel.offsetInParent());
324  W.printNumber("BasePointerOffset", DefRangeRegisterRel.Hdr.BasePointerOffset);
325  printLocalVariableAddrRange(DefRangeRegisterRel.Range,
326  DefRangeRegisterRel.getRelocationOffset());
327  printLocalVariableAddrGap(DefRangeRegisterRel.Gaps);
328  return Error::success();
329 }
330 
332  CVSymbol &CVR, DefRangeRegisterSym &DefRangeRegister) {
333  W.printNumber("Register", DefRangeRegister.Hdr.Register);
334  W.printNumber("MayHaveNoName", DefRangeRegister.Hdr.MayHaveNoName);
335  printLocalVariableAddrRange(DefRangeRegister.Range,
336  DefRangeRegister.getRelocationOffset());
337  printLocalVariableAddrGap(DefRangeRegister.Gaps);
338  return Error::success();
339 }
340 
342  CVSymbol &CVR, DefRangeSubfieldRegisterSym &DefRangeSubfieldRegister) {
343  W.printNumber("Register", DefRangeSubfieldRegister.Hdr.Register);
344  W.printNumber("MayHaveNoName", DefRangeSubfieldRegister.Hdr.MayHaveNoName);
345  W.printNumber("OffsetInParent", DefRangeSubfieldRegister.Hdr.OffsetInParent);
346  printLocalVariableAddrRange(DefRangeSubfieldRegister.Range,
347  DefRangeSubfieldRegister.getRelocationOffset());
348  printLocalVariableAddrGap(DefRangeSubfieldRegister.Gaps);
349  return Error::success();
350 }
351 
353  CVSymbol &CVR, DefRangeSubfieldSym &DefRangeSubfield) {
354  if (ObjDelegate) {
355  DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
356  auto ExpectedProgram = Strings.getString(DefRangeSubfield.Program);
357  if (!ExpectedProgram) {
358  consumeError(ExpectedProgram.takeError());
359  return llvm::make_error<CodeViewError>(
360  "String table offset outside of bounds of String Table!");
361  }
362  W.printString("Program", *ExpectedProgram);
363  }
364  W.printNumber("OffsetInParent", DefRangeSubfield.OffsetInParent);
365  printLocalVariableAddrRange(DefRangeSubfield.Range,
366  DefRangeSubfield.getRelocationOffset());
367  printLocalVariableAddrGap(DefRangeSubfield.Gaps);
368  return Error::success();
369 }
370 
372  DefRangeSym &DefRange) {
373  if (ObjDelegate) {
374  DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
375  auto ExpectedProgram = Strings.getString(DefRange.Program);
376  if (!ExpectedProgram) {
377  consumeError(ExpectedProgram.takeError());
378  return llvm::make_error<CodeViewError>(
379  "String table offset outside of bounds of String Table!");
380  }
381  W.printString("Program", *ExpectedProgram);
382  }
383  printLocalVariableAddrRange(DefRange.Range, DefRange.getRelocationOffset());
384  printLocalVariableAddrGap(DefRange.Gaps);
385  return Error::success();
386 }
387 
389  FrameCookieSym &FrameCookie) {
390  StringRef LinkageName;
391  if (ObjDelegate) {
392  ObjDelegate->printRelocatedField("CodeOffset",
393  FrameCookie.getRelocationOffset(),
394  FrameCookie.CodeOffset, &LinkageName);
395  }
396  W.printHex("Register", FrameCookie.Register);
397  W.printEnum("CookieKind", uint16_t(FrameCookie.CookieKind),
399  W.printHex("Flags", FrameCookie.Flags);
400  return Error::success();
401 }
402 
404  FrameProcSym &FrameProc) {
405  W.printHex("TotalFrameBytes", FrameProc.TotalFrameBytes);
406  W.printHex("PaddingFrameBytes", FrameProc.PaddingFrameBytes);
407  W.printHex("OffsetToPadding", FrameProc.OffsetToPadding);
408  W.printHex("BytesOfCalleeSavedRegisters",
409  FrameProc.BytesOfCalleeSavedRegisters);
410  W.printHex("OffsetOfExceptionHandler", FrameProc.OffsetOfExceptionHandler);
411  W.printHex("SectionIdOfExceptionHandler",
412  FrameProc.SectionIdOfExceptionHandler);
413  W.printFlags("Flags", static_cast<uint32_t>(FrameProc.Flags),
415  return Error::success();
416 }
417 
419  CVSymbol &CVR, HeapAllocationSiteSym &HeapAllocSite) {
420  StringRef LinkageName;
421  if (ObjDelegate) {
422  ObjDelegate->printRelocatedField("CodeOffset",
423  HeapAllocSite.getRelocationOffset(),
424  HeapAllocSite.CodeOffset, &LinkageName);
425  }
426  W.printHex("Segment", HeapAllocSite.Segment);
427  W.printHex("CallInstructionSize", HeapAllocSite.CallInstructionSize);
428  printTypeIndex("Type", HeapAllocSite.Type);
429  if (!LinkageName.empty())
430  W.printString("LinkageName", LinkageName);
431  return Error::success();
432 }
433 
435  InlineSiteSym &InlineSite) {
436  W.printHex("PtrParent", InlineSite.Parent);
437  W.printHex("PtrEnd", InlineSite.End);
438  printTypeIndex("Inlinee", InlineSite.Inlinee);
439 
440  ListScope BinaryAnnotations(W, "BinaryAnnotations");
441  for (auto &Annotation : InlineSite.annotations()) {
442  switch (Annotation.OpCode) {
444  W.printString("(Annotation Padding)");
445  break;
449  W.printHex(Annotation.Name, Annotation.U1);
450  break;
456  W.printNumber(Annotation.Name, Annotation.U1);
457  break;
460  W.printNumber(Annotation.Name, Annotation.S1);
461  break;
463  if (ObjDelegate) {
464  W.printHex("ChangeFile",
465  ObjDelegate->getFileNameForFileOffset(Annotation.U1),
466  Annotation.U1);
467  } else {
468  W.printHex("ChangeFile", Annotation.U1);
469  }
470 
471  break;
473  W.startLine() << "ChangeCodeOffsetAndLineOffset: {CodeOffset: "
474  << W.hex(Annotation.U1) << ", LineOffset: " << Annotation.S1
475  << "}\n";
476  break;
477  }
479  W.startLine() << "ChangeCodeLengthAndCodeOffset: {CodeOffset: "
480  << W.hex(Annotation.U2)
481  << ", Length: " << W.hex(Annotation.U1) << "}\n";
482  break;
483  }
484  }
485  }
486  return Error::success();
487 }
488 
491  printTypeIndex("Type", Register.Index);
492  W.printEnum("Seg", uint16_t(Register.Register), getRegisterNames());
493  W.printString("Name", Register.Name);
494  return Error::success();
495 }
496 
498  W.printFlags("Flags", uint32_t(Public.Flags), getPublicSymFlagNames());
499  W.printNumber("Seg", Public.Segment);
500  W.printNumber("Off", Public.Offset);
501  W.printString("Name", Public.Name);
502  return Error::success();
503 }
504 
506  W.printNumber("SumName", ProcRef.SumName);
507  W.printNumber("SymOffset", ProcRef.SymOffset);
508  W.printNumber("Mod", ProcRef.Module);
509  W.printString("Name", ProcRef.Name);
510  return Error::success();
511 }
512 
514  StringRef LinkageName;
515  if (ObjDelegate) {
516  ObjDelegate->printRelocatedField("CodeOffset", Label.getRelocationOffset(),
517  Label.CodeOffset, &LinkageName);
518  }
519  W.printHex("Segment", Label.Segment);
520  W.printHex("Flags", uint8_t(Label.Flags));
521  W.printFlags("Flags", uint8_t(Label.Flags), getProcSymFlagNames());
522  W.printString("DisplayName", Label.Name);
523  if (!LinkageName.empty())
524  W.printString("LinkageName", LinkageName);
525  return Error::success();
526 }
527 
529  printTypeIndex("Type", Local.Type);
530  W.printFlags("Flags", uint16_t(Local.Flags), getLocalFlagNames());
531  W.printString("VarName", Local.Name);
532  return Error::success();
533 }
534 
536  W.printHex("Signature", ObjName.Signature);
537  W.printString("ObjectName", ObjName.Name);
538  return Error::success();
539 }
540 
542  if (InFunctionScope)
543  return llvm::make_error<CodeViewError>(
544  "Visiting a ProcSym while inside function scope!");
545 
546  InFunctionScope = true;
547 
548  StringRef LinkageName;
549  W.printHex("PtrParent", Proc.Parent);
550  W.printHex("PtrEnd", Proc.End);
551  W.printHex("PtrNext", Proc.Next);
552  W.printHex("CodeSize", Proc.CodeSize);
553  W.printHex("DbgStart", Proc.DbgStart);
554  W.printHex("DbgEnd", Proc.DbgEnd);
555  printTypeIndex("FunctionType", Proc.FunctionType);
556  if (ObjDelegate) {
557  ObjDelegate->printRelocatedField("CodeOffset", Proc.getRelocationOffset(),
558  Proc.CodeOffset, &LinkageName);
559  }
560  W.printHex("Segment", Proc.Segment);
561  W.printFlags("Flags", static_cast<uint8_t>(Proc.Flags),
563  W.printString("DisplayName", Proc.Name);
564  if (!LinkageName.empty())
565  W.printString("LinkageName", LinkageName);
566  return Error::success();
567 }
568 
570  ScopeEndSym &ScopeEnd) {
571  InFunctionScope = false;
572  return Error::success();
573 }
574 
576  ListScope S(W, CVR.kind() == S_CALLEES ? "Callees" : "Callers");
577  for (auto FuncID : Caller.Indices)
578  printTypeIndex("FuncID", FuncID);
579  return Error::success();
580 }
581 
583  RegRelativeSym &RegRel) {
584  W.printHex("Offset", RegRel.Offset);
585  printTypeIndex("Type", RegRel.Type);
586  W.printEnum("Register", uint16_t(RegRel.Register), getRegisterNames());
587  W.printString("VarName", RegRel.Name);
588  return Error::success();
589 }
590 
592  ThreadLocalDataSym &Data) {
593  StringRef LinkageName;
594  if (ObjDelegate) {
595  ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
596  Data.DataOffset, &LinkageName);
597  }
598  printTypeIndex("Type", Data.Type);
599  W.printString("DisplayName", Data.Name);
600  if (!LinkageName.empty())
601  W.printString("LinkageName", LinkageName);
602  return Error::success();
603 }
604 
606  printTypeIndex("Type", UDT.Type);
607  W.printString("UDTName", UDT.Name);
608  return Error::success();
609 }
610 
611 Error CVSymbolDumperImpl::visitUnknownSymbol(CVSymbol &CVR) {
612  W.printNumber("Length", CVR.length());
613  return Error::success();
614 }
615 
618  SymbolDeserializer Deserializer(ObjDelegate.get(), Container);
619  CVSymbolDumperImpl Dumper(Types, ObjDelegate.get(), W, PrintRecordBytes);
620 
621  Pipeline.addCallbackToPipeline(Deserializer);
622  Pipeline.addCallbackToPipeline(Dumper);
623  CVSymbolVisitor Visitor(Pipeline);
624  return Visitor.visitSymbolRecord(Record);
625 }
626 
629  SymbolDeserializer Deserializer(ObjDelegate.get(), Container);
630  CVSymbolDumperImpl Dumper(Types, ObjDelegate.get(), W, PrintRecordBytes);
631 
632  Pipeline.addCallbackToPipeline(Deserializer);
633  Pipeline.addCallbackToPipeline(Dumper);
634  CVSymbolVisitor Visitor(Pipeline);
635  return Visitor.visitSymbolStream(Symbols);
636 }
MachineLoop * L
ArrayRef< EnumEntry< uint16_t > > getExportSymFlagNames()
Definition: EnumTables.cpp:391
ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
Definition: EnumTables.cpp:375
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:50
FrameProcedureOptions Flags
Definition: SymbolRecord.h:762
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:818
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:347
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:933
Error visitSymbolRecord(CVSymbol &Record)
iterator_range< BinaryAnnotationIterator > annotations() const
Definition: SymbolRecord.h:345
ArrayRef< EnumEntry< uint32_t > > getPublicSymFlagNames()
Definition: EnumTables.cpp:351
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:516
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:573
ArrayRef< EnumEntry< uint8_t > > getThunkOrdinalNames()
Definition: EnumTables.cpp:399
ArrayRef< EnumEntry< uint8_t > > getFrameCookieKindNames()
Definition: EnumTables.cpp:363
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
A 32-bit type reference.
Definition: TypeIndex.h:96
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: APInt.h:33
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:601
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:624
ArrayRef< EnumEntry< COFF::SectionCharacteristics > > getImageSectionCharacteristicNames()
Definition: EnumTables.cpp:408
Kind kind() const
Definition: CVRecord.h:37
SectionCharacteristics
Definition: COFF.h:281
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:911
static StringRef getSymbolKindName(SymbolKind Kind)
Function Alias Analysis false
ArrayRef< EnumEntry< unsigned > > getCPUTypeNames()
Definition: EnumTables.cpp:383
void printTypeIndex(ScopedPrinter &Printer, StringRef FieldName, TypeIndex TI, TypeCollection &Types)
Definition: TypeIndex.cpp:90
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:492
void addCallbackToPipeline(SymbolVisitorCallbacks &Callbacks)
This is an important base class in LLVM.
Definition: Constant.h:42
std::vector< StringRef > Fields
Definition: SymbolRecord.h:658
LocalVariableAddrRange Range
Definition: SymbolRecord.h:447
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:776
std::vector< TypeIndex > Indices
Definition: SymbolRecord.h:154
LocalVariableAddrRange Range
Definition: SymbolRecord.h:491
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:448
void consumeError(Error Err)
Consume a Error without doing anything.
Definition: Error.h:593
LocalVariableAddrRange Range
Definition: SymbolRecord.h:469
uint32_t getFlags() const
Definition: SymbolRecord.h:743
Error dump(CVRecord< SymbolKind > &Record)
Dumps one type record.
ArrayRef< EnumEntry< uint32_t > > getFrameProcSymFlagNames()
Definition: EnumTables.cpp:387
Expected< StringRef > getString(uint32_t Offset) const
static ErrorSuccess success()
Create a success value.
Definition: Error.h:311
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:339
ArrayRef< uint8_t > content() const
Definition: CVRecord.h:44
Promote Memory to Register
Definition: Mem2Reg.cpp:101
ArrayRef< EnumEntry< uint8_t > > getProcSymFlagNames()
Definition: EnumTables.cpp:355
uint8_t getLanguage() const
Definition: SymbolRecord.h:712
ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
Definition: EnumTables.cpp:367
uint8_t getLanguage() const
Definition: SymbolRecord.h:742
ArrayRef< EnumEntry< uint32_t > > getCompileSym2FlagNames()
Definition: EnumTables.cpp:371
Represents a read-only view of a CodeView string table.
ArrayRef< EnumEntry< uint16_t > > getTrampolineNames()
Definition: EnumTables.cpp:403
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:133
Error visitSymbolStream(const CVSymbolArray &Symbols)
uint32_t length() const
Definition: CVRecord.h:36
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:538
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:48
const unsigned Kind
uint32_t getFlags() const
Definition: SymbolRecord.h:713
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:470
A raw_ostream that writes to an std::string.
Definition: raw_ostream.h:463
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
Definition: EnumTables.cpp:359
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:442
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49