LLVM: lib/DebugInfo/LogicalView/Readers/LVBinaryReader.cpp Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
17
18using namespace llvm;
20
21#define DEBUG_TYPE "BinaryReader"
22
23
26 std::string SymbolName(Name);
27 if (SymbolNames.find(SymbolName) == SymbolNames.end()) {
28 SymbolNames.emplace(
29 std::piecewise_construct, std::forward_as_tuple(SymbolName),
30 std::forward_as_tuple(Function, 0, SectionIndex, false));
31 } else {
32
33 SymbolNames[SymbolName].Scope = Function;
34 if (SectionIndex)
35 SymbolNames[SymbolName].SectionIndex = SectionIndex;
36 }
37
38 if (Function && SymbolNames[SymbolName].IsComdat)
40
42}
43
46 std::string SymbolName(Name);
47 if (SymbolNames.find(SymbolName) == SymbolNames.end())
48 SymbolNames.emplace(
49 std::piecewise_construct, std::forward_as_tuple(SymbolName),
50 std::forward_as_tuple(nullptr, Address, SectionIndex, IsComdat));
51 else
52
53 SymbolNames[SymbolName].Address = Address;
54
59}
60
64 if (Name.empty())
66 std::string SymbolName(Name);
67
68 if (SymbolName.empty() || (SymbolNames.find(SymbolName) == SymbolNames.end()))
69 return SectionIndex;
70
71
72
73
74 if (Function->getHasRanges()) {
75 SymbolNames[SymbolName].Scope = Function;
76 SectionIndex = SymbolNames[SymbolName].SectionIndex;
77 } else {
79 }
80
81 if (SymbolNames[SymbolName].IsComdat)
83
85 return SectionIndex;
86}
87
90 LVSymbolNames::iterator Iter = SymbolNames.find(Name);
91 return Iter != SymbolNames.end() ? Iter->second : Empty;
92}
94 LVSymbolNames::iterator Iter = SymbolNames.find(Name);
95 return Iter != SymbolNames.end() ? Iter->second.Address : 0;
96}
98 LVSymbolNames::iterator Iter = SymbolNames.find(Name);
99 return Iter != SymbolNames.end() ? Iter->second.SectionIndex
101}
103 LVSymbolNames::iterator Iter = SymbolNames.find(Name);
104 return Iter != SymbolNames.end() ? Iter->second.IsComdat : false;
105}
106
108 OS << "Symbol Table\n";
109 for (LVSymbolNames::reference Entry : SymbolNames) {
111 LVScope *Scope = SymbolName.Scope;
113 OS << "Index: " << hexValue(SymbolName.SectionIndex, 5)
114 << " Comdat: " << (SymbolName.IsComdat ? "Y" : "N")
116 << " Address: " << hexValue(SymbolName.Address)
117 << " Name: " << Entry.first << "\n";
118 }
119}
120
124}
127 bool IsComdat) {
128 SymbolTable.add(Name, Address, SectionIndex, IsComdat);
129}
132}
133
136}
139}
142}
145}
146
152 if (!SectionNameOrErr)
154 else
155 Name = *SectionNameOrErr;
157 << "Address: " << hexValue(Section.getAddress()) << ", "
158 << "Size: " << hexValue(Section.getSize()) << ", "
159 << "Name: " << Name << "\n";
160 dbgs() << "isCompressed: " << Section.isCompressed() << ", "
161 << "isText: " << Section.isText() << ", "
162 << "isData: " << Section.isData() << ", "
163 << "isBSS: " << Section.isBSS() << ", "
164 << "isVirtual: " << Section.isVirtual() << "\n";
165 dbgs() << "isBitcode: " << Section.isBitcode() << ", "
166 << "isStripped: " << Section.isStripped() << ", "
167 << "isBerkeleyText: " << Section.isBerkeleyText() << ", "
168 << "isBerkeleyData: " << Section.isBerkeleyData() << ", "
169 << "isDebugSection: " << Section.isDebugSection() << "\n";
170 dbgs() << "\n";
171 });
172
173 if (!Section.isText() || Section.isVirtual() || !Section.getSize())
174 continue;
175
176
177
178 Sections.emplace(Section.getIndex(), Section);
179 addSectionAddress(Section);
180
181
183 if (!SectionNameOrErr) {
185 continue;
186 }
187 if (*SectionNameOrErr == ".text" || *SectionNameOrErr == "CODE" ||
188 *SectionNameOrErr == ".code") {
190
191
194 }
195 }
196
197
199
201 dbgs() << "\nSections Information:\n";
202 for (LVSections::reference Entry : Sections) {
206 if (!SectionNameOrErr)
209 << " Name: " << *SectionNameOrErr << "\n"
210 << "Size: " << hexValue(Section.getSize()) << "\n"
211 << "VirtualAddress: " << hexValue(VirtualAddress) << "\n"
212 << "SectionAddress: " << hexValue(Section.getAddress()) << "\n";
213 }
214 dbgs() << "\nObject Section Information:\n";
215 for (LVSectionAddresses::const_reference Entry : SectionAddresses)
216 dbgs() << "[" << hexValue(Entry.first) << ":"
217 << hexValue(Entry.first + Entry.second.getSize())
218 << "] Size: " << hexValue(Entry.second.getSize()) << "\n";
219 });
220}
221
224 if (ImageBase)
225 ImageBaseAddress = ImageBase.get();
226
228 dbgs() << "ImageBaseAddress: " << hexValue(ImageBaseAddress) << "\n";
229 });
230
232
234 if (!Section.isText() || Section.isVirtual() || !Section.getSize())
235 continue;
236
239 bool IsComdat = (COFFSection->Characteristics & Flags) == Flags;
240
241
242
243 Sections.emplace(Section.getIndex() + 1, Section);
244 addSectionAddress(Section);
245
246
248 }
249
251 dbgs() << "\nSections Information:\n";
252 for (LVSections::reference Entry : Sections) {
257 if (!SectionNameOrErr)
260 << " Name: " << *SectionNameOrErr << "\n"
261 << "Size: " << hexValue(Section.getSize()) << "\n"
262 << "VirtualAddress: " << hexValue(VirtualAddress) << "\n"
263 << "SectionAddress: " << hexValue(Section.getAddress()) << "\n"
265 << "\n"
267 << "\n";
268 }
269 dbgs() << "\nObject Section Information:\n";
270 for (LVSectionAddresses::const_reference Entry : SectionAddresses)
271 dbgs() << "[" << hexValue(Entry.first) << ":"
272 << hexValue(Entry.first + Entry.second.getSize())
273 << "] Size: " << hexValue(Entry.second.getSize()) << "\n";
274 });
275}
276
279 std::string TargetLookupError;
280 const Target *TheTarget =
282 if (!TheTarget)
284
285
287 if (!RegisterInfo)
289 "no register info for target " + TheTriple);
290 MRI.reset(RegisterInfo);
291
292
295 if (!AsmInfo)
297 "no assembly info for target " + TheTriple);
298 MAI.reset(AsmInfo);
299
300
304 if (!SubtargetInfo)
306 "no subtarget info for target " + TheTriple);
307 STI.reset(SubtargetInfo);
308
309
311 if (!InstructionInfo)
313 "no instruction info for target " + TheTriple);
314 MII.reset(InstructionInfo);
315
316 MC = std::make_unique(Triple(TheTriple), MAI.get(), MRI.get(),
317 STI.get());
318
319
321 if (!DisAsm)
323 "no disassembler for target " + TheTriple);
324 MD.reset(DisAsm);
325
328 if (!InstructionPrinter)
330 "no target assembly language printer for target " +
331 TheTriple);
332 MIP.reset(InstructionPrinter);
334
336}
337
341
342
343
344 if (SectionIndex) {
345 LVSections::iterator Iter = Sections.find(SectionIndex);
346 if (Iter == Sections.end()) {
348 "invalid section index for: '%s'",
349 Scope->getName().str().c_str());
350 }
352 return std::make_pair(Section.getAddress(), Section);
353 }
354
355
356 LVSectionAddresses::const_iterator Iter =
357 SectionAddresses.upper_bound(Address);
358 if (Iter == SectionAddresses.begin())
360 "invalid section address for: '%s'",
361 Scope->getName().str().c_str());
362
363
364 Iter = SectionAddresses.lower_bound(Address);
365 if (Iter != SectionAddresses.begin())
366 --Iter;
367 return std::make_pair(Iter->first, Iter->second);
368}
369
373 ScopesWithRanges->addEntry(Scope);
374}
375
380 ScopesWithRanges->addEntry(Scope, LowerAddress, UpperAddress);
381}
382
384
385 LVSectionRanges::iterator IterSection = SectionRanges.find(SectionIndex);
386 if (IterSection == SectionRanges.end())
387 IterSection =
388 SectionRanges.emplace(SectionIndex, std::make_unique()).first;
392}
393
397 assert(Scope && "Scope is null.");
398
399
400 if (Scope->getIsDiscarded())
402
403
406
408 dbgs() << "\nPublic Name instructions: '" << Scope->getName() << "' / '"
409 << Scope->getLinkageName() << "'\n"
410 << "DIE Offset: " << hexValue(Scope->getOffset()) << " Range: ["
412 });
413
416 if (!SectionOrErr)
417 return SectionOrErr.takeError();
419 uint64_t SectionAddress = (*SectionOrErr).first;
420
422 if (!SectionContentsOrErr)
423 return SectionOrErr.takeError();
424
425
426
427
430 << ", Section Size: " << hexValue(Section.getSize()) << "\n";
431 });
432 Size = std::min(Size + 1, Section.getSize());
433
434 ArrayRef<uint8_t> Bytes = arrayRefFromStringRef(*SectionContentsOrErr);
438
441 if (!SectionNameOrErr)
443 else
444 dbgs() << "Section Index: " << hexValue(Section.getIndex()) << " ["
446 << hexValue((uint64_t)Section.getAddress() + Section.getSize(), 10)
447 << "] Name: '" << *SectionNameOrErr << "'\n"
450 });
451
452
454 auto InstructionsSP = std::make_unique();
456 DiscoveredLines.emplace_back(std::move(InstructionsSP));
457
458 while (Begin < End) {
466 switch (S) {
469 if (BytesConsumed == 0)
470
471 BytesConsumed = 1;
472 break;
474 LLVM_DEBUG({ dbgs() << "Potentially undefined instruction:"; });
475 [[fallthrough]];
477 std::string Buffer;
482 std::string BufferCodes;
485 ArrayRef<uint8_t>(Begin, Begin + BytesConsumed), std::nullopt, 16,
486 16);
488 << "Size: " << format_decimal(BytesConsumed, 2) << " ("
492 << "\n";
493 });
494
495
496
497
502 break;
503 }
504 }
505 Address += BytesConsumed;
506 Begin += BytesConsumed;
507 }
508
510 size_t Index = 0;
512 << " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
513 << "Address: " << hexValue(FirstAddress)
514 << format(" - Collected instructions lines: %d\n",
519 << ")\n";
520 });
521
522
523 ScopeInstructions.add(SectionIndex, Scope, &Instructions);
524 AssemblerMappings.add(SectionIndex, FirstAddress, Scope);
525
527}
528
531 if (().getPrintInstructions())
533
537
539}
540
542 if (().getPrintInstructions())
544
546 size_t Index = 1;
547 dbgs() << "\nPublic Names (Scope):\n";
548 for (LVPublicNames::const_reference Name : CompileUnit->getPublicNames()) {
554 << "DIE Offset: " << hexValue(Scope->getOffset()) << " Range: ["
556 << "Name: '" << Scope->getName() << "' / '"
557 << Scope->getLinkageName() << "'\n";
558 }
559 });
560
561
562
563 for (LVPublicNames::const_reference Name : CompileUnit->getPublicNames()) {
565
566
567
568
569 if (!Scope->getLinkageNameIndex())
570 Scope->setLinkageName(Scope->getName());
573 return Err;
574 }
575
577}
578
579
580
581
582
583
587 assert(DebugLines && "DebugLines is null.");
588
589
590
591 if (DebugLines->empty() && ().getPrintInstructions())
592 return;
593
594
595
596
597
598
600 size_t Index = 1;
601 size_t PerLine = 4;
602 dbgs() << format("\nProcess debug lines: %d\n", DebugLines->size());
603 for (const LVLine *Line : *DebugLines) {
605 << ", (" << Line->getLineNumber() << ")"
606 << ((Index % PerLine) ? " " : "\n");
607 ++Index;
608 }
609 dbgs() << ((Index % PerLine) ? "\n" : "");
610 });
611
612 bool TraverseLines = true;
614 while (TraverseLines && Iter != DebugLines->end()) {
615 uint64_t DebugAddress = (*Iter)->getAddress();
616
617
618
619
622 Scope = AssemblerMappings.find(SectionIndex, DebugAddress);
623 if (!Scope) {
624 ++Iter;
625 continue;
626 }
627 }
628
629
630 LVLines InstructionLines;
631 LVLines *Lines = ScopeInstructions.find(SectionIndex, Scope);
633 InstructionLines = std::move(*Lines);
634
636 size_t Index = 0;
638 << " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
639 << format("Process instruction lines: %d\n",
640 InstructionLines.size());
641 for (const LVLine *Line : InstructionLines)
644 << ")\n";
645 });
646
647
648 if (InstructionLines.empty()) {
649 ++Iter;
650 continue;
651 }
652
653 for (LVLine *InstructionLine : InstructionLines) {
654 uint64_t InstructionAddress = InstructionLine->getAddress();
656 dbgs() << "Instruction address: " << hexValue(InstructionAddress)
657 << "\n";
658 });
659 if (TraverseLines) {
660 while (Iter != DebugLines->end()) {
661 DebugAddress = (*Iter)->getAddress();
663 bool IsDebug = (*Iter)->getIsLineDebug();
664 dbgs() << "Line " << (IsDebug ? "dbg:" : "ins:") << " ["
665 << hexValue(DebugAddress) << "]";
666 if (IsDebug)
667 dbgs() << format(" %d", (*Iter)->getLineNumber());
668 dbgs() << "\n";
669 });
670
671 if (InstructionAddress < DebugAddress) {
673 dbgs() << "Inserted instruction address: "
674 << hexValue(InstructionAddress) << " before line: "
675 << format("%d", (*Iter)->getLineNumber()) << " ["
676 << hexValue(DebugAddress) << "]\n";
677 });
678 Iter = DebugLines->insert(Iter, InstructionLine);
679
680
681 ++Iter;
682 break;
683 }
684 ++Iter;
685 }
686 if (Iter == DebugLines->end()) {
687
688
689 TraverseLines = false;
690 DebugLines->push_back(InstructionLine);
691 }
692 } else {
693 DebugLines->push_back(InstructionLine);
694 }
695 }
696 }
697
699 dbgs() << format("Lines after merge: %d\n", DebugLines->size());
700 size_t Index = 0;
701 for (const LVLine *Line : *DebugLines) {
704 << ((Line->getIsLineDebug())
705 ? Line->lineNumberAsStringStripped(true)
706 : Line->getName())
707 << ")\n";
708 }
709 });
710
711
712
713
714 if (DebugLines->empty()) {
717 LVLines *Lines = ScopeInstructions.find(Scope);
719
721 size_t Index = 0;
723 << " Scope DIE: " << hexValue(Scope->getOffset()) << "\n"
724 << format("Instruction lines: %d\n", Lines->size());
728 << ")\n";
729 });
730
731 if (Scope->getIsArtificial()) {
732
734 Scope->addElement(Line);
735 } else {
737 }
739 }
740 }
741 }
742
745
746
749
750
751 Scope = ScopesWithRanges->getEntry(Line->getAddress());
752 if (!Scope) {
753
756 dbgs() << "Adding line to CU: " << hexValue(Line->getOffset()) << ", ("
757 << ((Line->getIsLineDebug())
758 ? Line->lineNumberAsStringStripped(true)
759 : Line->getName())
760 << ")\n";
761 });
762 }
763
764
765 Scope->addElement(Line);
766
767
768 if (options().getWarningLines() && Line->getIsLineDebug() &&
769 ->getLineNumber())
771
772
773
774
775
776
777
778
779 if (Line->getIsLineDebug())
781
782
784 }
785
787}
788
791 assert(DebugLines && "DebugLines is null.");
792 if (DebugLines->empty() && !ScopeInstructions.findMap(SectionIndex))
793 return;
794
795
796
797 if (->getHasComdatScopes()) {
798 processLines(DebugLines, SectionIndex, nullptr);
799 return;
800 }
801
802
803 std::vector<size_t> AddressZero;
805 std::find_if(std::begin(*DebugLines), std::end(*DebugLines),
807 while (It != std::end(*DebugLines)) {
808 AddressZero.emplace_back(std::distance(std::begin(*DebugLines), It));
809 It = std::find_if(std::next(It), std::end(*DebugLines),
811 }
812
813
814
815
816 if (AddressZero.empty()) {
817 processLines(DebugLines, SectionIndex, nullptr);
818 return;
819 }
820
821
822
823
824
825 using LVBucket = std::tuple<size_t, size_t, LVAddress, bool>;
826 std::vector Buckets;
827
829 size_t Begin = 0;
830 size_t End = 0;
831 size_t Index = 0;
832 for (Index = 0; Index < AddressZero.size() - 1; ++Index) {
833 Begin = AddressZero[Index];
834 End = AddressZero[Index + 1] - 1;
835 Address = (*DebugLines)[End]->getAddress();
836 Buckets.emplace_back(Begin, End, Address, false);
837 }
838
839
840 if (Index) {
841 Begin = AddressZero[Index];
842 End = DebugLines->size() - 1;
843 Address = (*DebugLines)[End]->getAddress();
844 Buckets.emplace_back(Begin, End, Address, false);
845 }
846
848 dbgs() << "\nDebug Lines buckets: " << Buckets.size() << "\n";
849 for (LVBucket &Bucket : Buckets) {
850 dbgs() << "Begin: " << format_decimal(std::get<0>(Bucket), 5) << ", "
851 << "End: " << format_decimal(std::get<1>(Bucket), 5) << ", "
852 << "Address: " << hexValue(std::get<2>(Bucket)) << "\n";
853 }
854 });
855
856
857
858
860 for (LVSections::reference Entry : Sections) {
866 << " , Section Size: " << hexValue(Section.getSize())
867 << " , Section Address: " << hexValue(Section.getAddress())
868 << "\n";
869 });
870
871 for (LVBucket &Bucket : Buckets) {
872 if (std::get<3>(Bucket))
873
874 continue;
875 if (Size == std::get<2>(Bucket)) {
876
877 Group.clear();
880 DebugLines->begin() + std::get<1>(Bucket) + 1;
882 Group.push_back(*Iter);
883 processLines(&Group, SectionIndex, nullptr);
884 std::get<3>(Bucket) = true;
885 break;
886 }
887 }
888 }
889}
890
891
892
896 std::function<void(LVScope * Parent)> FindInlinedScopes =
900 LVInlineeLine::iterator Iter = CUInlineeLines.find(Scope);
901 if (Iter != CUInlineeLines.end())
903 FindInlinedScopes(Scope);
904 }
905 };
906
907
909 for (LVInlineeLine::iterator InlineeIter : InlineeIters) {
910 LVScope *Scope = InlineeIter->first;
911 addToSymbolTable(Scope->getLinkageName(), Scope, SectionIndex);
912
913
916 dbgs() << "Inlined lines for: " << Scope->getName() << "\n";
919 << Line->getLineNumber() << "\n";
922 dbgs() << "Line address: " << hexValue(Line->getOffset()) << ", ("
923 << Line->getLineNumber() << ")\n";
924 ;
925 });
926
927
928
929
931
935 return Item->getAddress() == InlineeStart;
936 });
938
939
940 Scope->setCallLineNumber((*Iter)->getLineNumber());
941
942
943
944 (*Iter)->setLineNumber((*InlineeLines->begin())->getLineNumber());
945 ++Iter;
947 }
948 }
949
950
951
952 CUInlineeLines.erase(InlineeIter);
954 }
959 dbgs() << "Line address: " << hexValue(Line->getOffset()) << ", ("
960 << Line->getLineNumber() << ")\n";
961 ;
962 });
963}
964
966 OS << "LVBinaryReader\n";
968}
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const Value * getAddress(const DbgVariableIntrinsic *DVI)
Annotations lets you mark points and ranges inside source code, for tests:
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Represents either an error or a value T.
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
Tagged union holding either a T or a Error.
Error takeError()
Take ownership of the stored error.
This class is intended to be used as a base class for asm properties and features specific to the tar...
unsigned getAssemblerDialect() const
Superclass for all disassemblers.
DecodeStatus
Ternary decode status.
This is an instance of a target assembly language printer that converts an MCInst to valid target ass...
void setPrintImmHex(bool Value)
Instances of this class represent a single low-level machine instruction.
Interface to description of machine instruction set.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
Generic base class for all target subtargets.
void append(ItTy in_start, ItTy in_end)
Add the specified range to the end of the SmallVector.
iterator insert(iterator I, T &&Elt)
void push_back(const T &Elt)
StringRef - Represent a constant reference to a string, i.e.
StringRef trim(char Char) const
Return string with consecutive Char characters starting from the left and right removed.
Target - Wrapper for Target specific information.
MCSubtargetInfo * createMCSubtargetInfo(StringRef TheTriple, StringRef CPU, StringRef Features) const
createMCSubtargetInfo - Create a MCSubtargetInfo implementation.
MCRegisterInfo * createMCRegInfo(StringRef TT) const
createMCRegInfo - Create a MCRegisterInfo implementation.
MCDisassembler * createMCDisassembler(const MCSubtargetInfo &STI, MCContext &Ctx) const
MCAsmInfo * createMCAsmInfo(const MCRegisterInfo &MRI, StringRef TheTriple, const MCTargetOptions &Options) const
createMCAsmInfo - Create a MCAsmInfo implementation for the specified target triple.
MCInstPrinter * createMCInstPrinter(const Triple &T, unsigned SyntaxVariant, const MCAsmInfo &MAI, const MCInstrInfo &MII, const MCRegisterInfo &MRI) const
MCInstrInfo * createMCInstrInfo() const
createMCInstrInfo - Create a MCInstrInfo implementation.
Triple - Helper class for working with autoconf configuration names.
StringRef getName() const
Return a constant reference to the value's name.
Stores all information relating to a compile unit, be it in its original instance in the object file ...
const LVSymbolTableEntry & getSymbolTableEntry(StringRef Name)
LVSectionIndex updateSymbolTable(LVScope *Function)
Expected< std::pair< LVSectionIndex, object::SectionRef > > getSection(LVScope *Scope, LVAddress Address, LVSectionIndex SectionIndex)
std::unique_ptr< MCContext > MC
void includeInlineeLines(LVSectionIndex SectionIndex, LVScope *Function)
std::unique_ptr< const MCInstrInfo > MII
LVAddress getSymbolTableAddress(StringRef Name)
void print(raw_ostream &OS) const
std::unique_ptr< const MCSubtargetInfo > STI
void addToSymbolTable(StringRef Name, LVScope *Function, LVSectionIndex SectionIndex=0)
virtual void mapRangeAddress(const object::ObjectFile &Obj)
void processLines(LVLines *DebugLines, LVSectionIndex SectionIndex)
void mapVirtualAddress(const object::ObjectFile &Obj)
std::unique_ptr< const MCAsmInfo > MAI
LVSectionIndex getSymbolTableIndex(StringRef Name)
bool getSymbolTableIsComdat(StringRef Name)
std::unique_ptr< const MCRegisterInfo > MRI
std::unique_ptr< const MCDisassembler > MD
LVRange * getSectionRanges(LVSectionIndex SectionIndex)
Error loadGenericTargetInfo(StringRef TheTriple, StringRef TheFeatures)
void addSectionRange(LVSectionIndex SectionIndex, LVScope *Scope)
Error createInstructions()
std::unique_ptr< MCInstPrinter > MIP
LVAddress WasmCodeSectionOffset
void resolvePatternMatch(LVLine *Line)
LVScope * getEntry(LVAddress Address) const
void addEntry(LVScope *Scope, LVAddress LowerAddress, LVAddress UpperAddress)
LVSectionIndex getDotTextSectionIndex() const
LVScopeCompileUnit * CompileUnit
LVSectionIndex DotTextSectionIndex
const LVScopes * getScopes() const
LVSectionIndex getIndex(StringRef Name)
bool getIsComdat(StringRef Name)
void print(raw_ostream &OS)
LVAddress getAddress(StringRef Name)
void add(StringRef Name, LVScope *Function, LVSectionIndex SectionIndex=0)
LVSectionIndex update(LVScope *Function)
const LVSymbolTableEntry & getEntry(StringRef Name)
uint64_t getImageBase() const
const coff_section * getCOFFSection(const SectionRef &Section) const
This class is the base class for all object file types.
section_iterator_range sections() const
This is a value type class that represents a single section in the list of sections in the object fil...
This class implements an extremely fast bulk output stream that can only output to a stream.
A raw_ostream that writes to an std::string.
std::string & str()
Returns the string's reference.
A raw_ostream that writes to an SmallVector or SmallString.
FormattedNumber hexValue(uint64_t N, unsigned Width=HEX_WIDTH, bool Upper=false)
std::pair< LVAddress, uint64_t > LVNameInfo
constexpr LVSectionIndex UndefinedSectionIndex
This is an optimization pass for GlobalISel generic memory operations.
FormattedNumber format_decimal(int64_t N, unsigned Width)
format_decimal - Output N as a right justified, fixed-width decimal.
raw_fd_ostream & outs()
This returns a reference to a raw_fd_ostream for standard output.
Error createStringError(std::error_code EC, char const *Fmt, const Ts &... Vals)
Create formatted StringError object.
auto formatv(bool Validate, const char *Fmt, Ts &&...Vals)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
format_object< Ts... > format(const char *Fmt, const Ts &... Vals)
These are helper functions used to produce formatted output.
support::detail::AlignAdapter< T > fmt_align(T &&Item, AlignStyle Where, size_t Amount, char Fill=' ')
void consumeError(Error Err)
Consume a Error without doing anything.
FormattedBytes format_bytes(ArrayRef< uint8_t > Bytes, std::optional< uint64_t > FirstByteOffset=std::nullopt, uint32_t NumPerLine=16, uint8_t ByteGroupSize=4, uint32_t IndentLevel=0, bool Upper=false)
static const Target * lookupTarget(StringRef Triple, std::string &Error)
lookupTarget - Lookup a target based on a target triple.
support::ulittle32_t PointerToRawData
support::ulittle32_t Characteristics
support::ulittle32_t SizeOfRawData
support::ulittle32_t VirtualAddress