LLVM  6.0.0svn
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;
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) {
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 
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.printEnum("BaseRegister", uint16_t(DefRangeRegisterRel.Hdr.Register),
321  getRegisterNames());
322  W.printBoolean("HasSpilledUDTMember",
323  DefRangeRegisterRel.hasSpilledUDTMember());
324  W.printNumber("OffsetInParent", DefRangeRegisterRel.offsetInParent());
325  W.printNumber("BasePointerOffset", DefRangeRegisterRel.Hdr.BasePointerOffset);
326  printLocalVariableAddrRange(DefRangeRegisterRel.Range,
327  DefRangeRegisterRel.getRelocationOffset());
328  printLocalVariableAddrGap(DefRangeRegisterRel.Gaps);
329  return Error::success();
330 }
331 
333  CVSymbol &CVR, DefRangeRegisterSym &DefRangeRegister) {
334  W.printEnum("Register", uint16_t(DefRangeRegister.Hdr.Register),
335  getRegisterNames());
336  W.printNumber("MayHaveNoName", DefRangeRegister.Hdr.MayHaveNoName);
337  printLocalVariableAddrRange(DefRangeRegister.Range,
338  DefRangeRegister.getRelocationOffset());
339  printLocalVariableAddrGap(DefRangeRegister.Gaps);
340  return Error::success();
341 }
342 
344  CVSymbol &CVR, DefRangeSubfieldRegisterSym &DefRangeSubfieldRegister) {
345  W.printEnum("Register", uint16_t(DefRangeSubfieldRegister.Hdr.Register),
346  getRegisterNames());
347  W.printNumber("MayHaveNoName", DefRangeSubfieldRegister.Hdr.MayHaveNoName);
348  W.printNumber("OffsetInParent", DefRangeSubfieldRegister.Hdr.OffsetInParent);
349  printLocalVariableAddrRange(DefRangeSubfieldRegister.Range,
350  DefRangeSubfieldRegister.getRelocationOffset());
351  printLocalVariableAddrGap(DefRangeSubfieldRegister.Gaps);
352  return Error::success();
353 }
354 
356  CVSymbol &CVR, DefRangeSubfieldSym &DefRangeSubfield) {
357  if (ObjDelegate) {
358  DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
359  auto ExpectedProgram = Strings.getString(DefRangeSubfield.Program);
360  if (!ExpectedProgram) {
361  consumeError(ExpectedProgram.takeError());
362  return llvm::make_error<CodeViewError>(
363  "String table offset outside of bounds of String Table!");
364  }
365  W.printString("Program", *ExpectedProgram);
366  }
367  W.printNumber("OffsetInParent", DefRangeSubfield.OffsetInParent);
368  printLocalVariableAddrRange(DefRangeSubfield.Range,
369  DefRangeSubfield.getRelocationOffset());
370  printLocalVariableAddrGap(DefRangeSubfield.Gaps);
371  return Error::success();
372 }
373 
375  DefRangeSym &DefRange) {
376  if (ObjDelegate) {
377  DebugStringTableSubsectionRef Strings = ObjDelegate->getStringTable();
378  auto ExpectedProgram = Strings.getString(DefRange.Program);
379  if (!ExpectedProgram) {
380  consumeError(ExpectedProgram.takeError());
381  return llvm::make_error<CodeViewError>(
382  "String table offset outside of bounds of String Table!");
383  }
384  W.printString("Program", *ExpectedProgram);
385  }
386  printLocalVariableAddrRange(DefRange.Range, DefRange.getRelocationOffset());
387  printLocalVariableAddrGap(DefRange.Gaps);
388  return Error::success();
389 }
390 
392  FrameCookieSym &FrameCookie) {
394  if (ObjDelegate) {
395  ObjDelegate->printRelocatedField("CodeOffset",
396  FrameCookie.getRelocationOffset(),
397  FrameCookie.CodeOffset, &LinkageName);
398  }
399  W.printEnum("Register", uint16_t(FrameCookie.Register), getRegisterNames());
400  W.printEnum("CookieKind", uint16_t(FrameCookie.CookieKind),
402  W.printHex("Flags", FrameCookie.Flags);
403  return Error::success();
404 }
405 
407  FrameProcSym &FrameProc) {
408  W.printHex("TotalFrameBytes", FrameProc.TotalFrameBytes);
409  W.printHex("PaddingFrameBytes", FrameProc.PaddingFrameBytes);
410  W.printHex("OffsetToPadding", FrameProc.OffsetToPadding);
411  W.printHex("BytesOfCalleeSavedRegisters",
412  FrameProc.BytesOfCalleeSavedRegisters);
413  W.printHex("OffsetOfExceptionHandler", FrameProc.OffsetOfExceptionHandler);
414  W.printHex("SectionIdOfExceptionHandler",
415  FrameProc.SectionIdOfExceptionHandler);
416  W.printFlags("Flags", static_cast<uint32_t>(FrameProc.Flags),
418  return Error::success();
419 }
420 
422  CVSymbol &CVR, HeapAllocationSiteSym &HeapAllocSite) {
424  if (ObjDelegate) {
425  ObjDelegate->printRelocatedField("CodeOffset",
426  HeapAllocSite.getRelocationOffset(),
427  HeapAllocSite.CodeOffset, &LinkageName);
428  }
429  W.printHex("Segment", HeapAllocSite.Segment);
430  W.printHex("CallInstructionSize", HeapAllocSite.CallInstructionSize);
431  printTypeIndex("Type", HeapAllocSite.Type);
432  if (!LinkageName.empty())
433  W.printString("LinkageName", LinkageName);
434  return Error::success();
435 }
436 
438  InlineSiteSym &InlineSite) {
439  W.printHex("PtrParent", InlineSite.Parent);
440  W.printHex("PtrEnd", InlineSite.End);
441  printTypeIndex("Inlinee", InlineSite.Inlinee);
442 
443  ListScope BinaryAnnotations(W, "BinaryAnnotations");
444  for (auto &Annotation : InlineSite.annotations()) {
445  switch (Annotation.OpCode) {
447  W.printString("(Annotation Padding)");
448  break;
452  W.printHex(Annotation.Name, Annotation.U1);
453  break;
459  W.printNumber(Annotation.Name, Annotation.U1);
460  break;
463  W.printNumber(Annotation.Name, Annotation.S1);
464  break;
466  if (ObjDelegate) {
467  W.printHex("ChangeFile",
468  ObjDelegate->getFileNameForFileOffset(Annotation.U1),
469  Annotation.U1);
470  } else {
471  W.printHex("ChangeFile", Annotation.U1);
472  }
473 
474  break;
476  W.startLine() << "ChangeCodeOffsetAndLineOffset: {CodeOffset: "
477  << W.hex(Annotation.U1) << ", LineOffset: " << Annotation.S1
478  << "}\n";
479  break;
480  }
482  W.startLine() << "ChangeCodeLengthAndCodeOffset: {CodeOffset: "
483  << W.hex(Annotation.U2)
484  << ", Length: " << W.hex(Annotation.U1) << "}\n";
485  break;
486  }
487  }
488  }
489  return Error::success();
490 }
491 
494  printTypeIndex("Type", Register.Index);
495  W.printEnum("Seg", uint16_t(Register.Register), getRegisterNames());
496  W.printString("Name", Register.Name);
497  return Error::success();
498 }
499 
501  W.printFlags("Flags", uint32_t(Public.Flags), getPublicSymFlagNames());
502  W.printNumber("Seg", Public.Segment);
503  W.printNumber("Off", Public.Offset);
504  W.printString("Name", Public.Name);
505  return Error::success();
506 }
507 
509  W.printNumber("SumName", ProcRef.SumName);
510  W.printNumber("SymOffset", ProcRef.SymOffset);
511  W.printNumber("Mod", ProcRef.Module);
512  W.printString("Name", ProcRef.Name);
513  return Error::success();
514 }
515 
518  if (ObjDelegate) {
519  ObjDelegate->printRelocatedField("CodeOffset", Label.getRelocationOffset(),
520  Label.CodeOffset, &LinkageName);
521  }
522  W.printHex("Segment", Label.Segment);
523  W.printHex("Flags", uint8_t(Label.Flags));
524  W.printFlags("Flags", uint8_t(Label.Flags), getProcSymFlagNames());
525  W.printString("DisplayName", Label.Name);
526  if (!LinkageName.empty())
527  W.printString("LinkageName", LinkageName);
528  return Error::success();
529 }
530 
532  printTypeIndex("Type", Local.Type);
533  W.printFlags("Flags", uint16_t(Local.Flags), getLocalFlagNames());
534  W.printString("VarName", Local.Name);
535  return Error::success();
536 }
537 
539  W.printHex("Signature", ObjName.Signature);
540  W.printString("ObjectName", ObjName.Name);
541  return Error::success();
542 }
543 
545  if (InFunctionScope)
546  return llvm::make_error<CodeViewError>(
547  "Visiting a ProcSym while inside function scope!");
548 
549  InFunctionScope = true;
550 
552  W.printHex("PtrParent", Proc.Parent);
553  W.printHex("PtrEnd", Proc.End);
554  W.printHex("PtrNext", Proc.Next);
555  W.printHex("CodeSize", Proc.CodeSize);
556  W.printHex("DbgStart", Proc.DbgStart);
557  W.printHex("DbgEnd", Proc.DbgEnd);
558  printTypeIndex("FunctionType", Proc.FunctionType);
559  if (ObjDelegate) {
560  ObjDelegate->printRelocatedField("CodeOffset", Proc.getRelocationOffset(),
561  Proc.CodeOffset, &LinkageName);
562  }
563  W.printHex("Segment", Proc.Segment);
564  W.printFlags("Flags", static_cast<uint8_t>(Proc.Flags),
566  W.printString("DisplayName", Proc.Name);
567  if (!LinkageName.empty())
568  W.printString("LinkageName", LinkageName);
569  return Error::success();
570 }
571 
573  ScopeEndSym &ScopeEnd) {
574  InFunctionScope = false;
575  return Error::success();
576 }
577 
579  ListScope S(W, CVR.kind() == S_CALLEES ? "Callees" : "Callers");
580  for (auto FuncID : Caller.Indices)
581  printTypeIndex("FuncID", FuncID);
582  return Error::success();
583 }
584 
586  RegRelativeSym &RegRel) {
587  W.printHex("Offset", RegRel.Offset);
588  printTypeIndex("Type", RegRel.Type);
589  W.printEnum("Register", uint16_t(RegRel.Register), getRegisterNames());
590  W.printString("VarName", RegRel.Name);
591  return Error::success();
592 }
593 
595  ThreadLocalDataSym &Data) {
597  if (ObjDelegate) {
598  ObjDelegate->printRelocatedField("DataOffset", Data.getRelocationOffset(),
599  Data.DataOffset, &LinkageName);
600  }
601  printTypeIndex("Type", Data.Type);
602  W.printString("DisplayName", Data.Name);
603  if (!LinkageName.empty())
604  W.printString("LinkageName", LinkageName);
605  return Error::success();
606 }
607 
609  printTypeIndex("Type", UDT.Type);
610  W.printString("UDTName", UDT.Name);
611  return Error::success();
612 }
613 
614 Error CVSymbolDumperImpl::visitUnknownSymbol(CVSymbol &CVR) {
615  W.printNumber("Length", CVR.length());
616  return Error::success();
617 }
618 
621  SymbolDeserializer Deserializer(ObjDelegate.get(), Container);
622  CVSymbolDumperImpl Dumper(Types, ObjDelegate.get(), W, PrintRecordBytes);
623 
624  Pipeline.addCallbackToPipeline(Deserializer);
625  Pipeline.addCallbackToPipeline(Dumper);
626  CVSymbolVisitor Visitor(Pipeline);
627  return Visitor.visitSymbolRecord(Record);
628 }
629 
632  SymbolDeserializer Deserializer(ObjDelegate.get(), Container);
633  CVSymbolDumperImpl Dumper(Types, ObjDelegate.get(), W, PrintRecordBytes);
634 
635  Pipeline.addCallbackToPipeline(Deserializer);
636  Pipeline.addCallbackToPipeline(Dumper);
637  CVSymbolVisitor Visitor(Pipeline);
638  return Visitor.visitSymbolStream(Symbols);
639 }
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:776
Kind kind() const
Definition: CVRecord.h:37
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:818
ArrayRef< EnumEntry< uint16_t > > getExportSymFlagNames()
Definition: EnumTables.cpp:345
ArrayRef< EnumEntry< uint32_t > > getCompileSym3FlagNames()
Definition: EnumTables.cpp:329
FrameProcedureOptions Flags
Definition: SymbolRecord.h:762
ArrayRef< EnumEntry< uint16_t > > getRegisterNames()
Definition: EnumTables.cpp:301
uint8_t getLanguage() const
Definition: SymbolRecord.h:742
Error visitSymbolRecord(CVSymbol &Record)
uint32_t getFlags() const
Definition: SymbolRecord.h:743
Expected< StringRef > getString(uint32_t Offset) const
Export information to summary.
ArrayRef< EnumEntry< uint32_t > > getPublicSymFlagNames()
Definition: EnumTables.cpp:305
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:516
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:573
ArrayRef< EnumEntry< uint8_t > > getThunkOrdinalNames()
Definition: EnumTables.cpp:353
ArrayRef< uint8_t > content() const
Definition: CVRecord.h:44
uint8_t getLanguage() const
Definition: SymbolRecord.h:712
ArrayRef< EnumEntry< uint8_t > > getFrameCookieKindNames()
Definition: EnumTables.cpp:317
static Error visitKnownRecord(CVSymbol &Record, SymbolVisitorCallbacks &Callbacks)
LLVM_NODISCARD LLVM_ATTRIBUTE_ALWAYS_INLINE bool empty() const
empty - Check if the string is empty.
Definition: StringRef.h:133
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 length() const
Definition: CVRecord.h:36
ArrayRef< EnumEntry< COFF::SectionCharacteristics > > getImageSectionCharacteristicNames()
Definition: EnumTables.cpp:362
SectionCharacteristics
Definition: COFF.h:281
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:442
static StringRef getSymbolKindName(SymbolKind Kind)
ArrayRef< EnumEntry< unsigned > > getCPUTypeNames()
Definition: EnumTables.cpp:337
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 getFlags() const
Definition: SymbolRecord.h:713
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:962
LocalVariableAddrRange Range
Definition: SymbolRecord.h:469
Error dump(CVRecord< SymbolKind > &Record)
Dumps one type record.
ArrayRef< EnumEntry< uint32_t > > getFrameProcSymFlagNames()
Definition: EnumTables.cpp:341
static ErrorSuccess success()
Create a success value.
Definition: Error.h:313
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:911
ArrayRef< EnumEntry< SymbolKind > > getSymbolTypeNames()
Definition: EnumTables.cpp:293
Promote Memory to Register
Definition: Mem2Reg.cpp:110
ArrayRef< EnumEntry< uint8_t > > getProcSymFlagNames()
Definition: EnumTables.cpp:309
ArrayRef< EnumEntry< SourceLanguage > > getSourceLanguageNames()
Definition: EnumTables.cpp:321
ArrayRef< EnumEntry< uint32_t > > getCompileSym2FlagNames()
Definition: EnumTables.cpp:325
Represents a read-only view of a CodeView string table.
ArrayRef< EnumEntry< uint16_t > > getTrampolineNames()
Definition: EnumTables.cpp:357
Error visitSymbolStream(const CVSymbolArray &Symbols)
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:538
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:50
SymbolKind
Duplicate copy of the above enum, but using the official CV names.
Definition: CodeView.h:48
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:624
iterator_range< BinaryAnnotationIterator > annotations() const
Definition: SymbolRecord.h:345
const unsigned Kind
std::vector< LocalVariableAddrGap > Gaps
Definition: SymbolRecord.h:470
A raw_ostream that writes to an std::string.
Definition: raw_ostream.h:462
Lightweight error class with error context and mandatory checking.
Definition: Error.h:156
ArrayRef< EnumEntry< uint16_t > > getLocalFlagNames()
Definition: EnumTables.cpp:313
uint32_t getRelocationOffset() const
Definition: SymbolRecord.h:601
StringRef - Represent a constant reference to a string, i.e.
Definition: StringRef.h:49