9#ifndef LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
10#define LLVM_DEBUGINFO_DWARF_DWARFDEBUGFRAME_H
26class DWARFDataExtractor;
65 CFIs(CodeAlign, DataAlign, Arch) {}
100 int64_t DataAlignmentFactor,
uint64_t ReturnAddressRegister,
102 uint32_t LSDAPointerEncoding, std::optional<uint64_t> Personality,
105 DataAlignmentFactor, Arch),
106 Version(Version), Augmentation(
std::
move(Augmentation)),
107 AddressSize(AddressSize), SegmentDescriptorSize(SegmentDescriptorSize),
108 CodeAlignmentFactor(CodeAlignmentFactor),
109 DataAlignmentFactor(DataAlignmentFactor),
110 ReturnAddressRegister(ReturnAddressRegister),
111 AugmentationData(
std::
move(AugmentationData)),
112 FDEPointerEncoding(FDEPointerEncoding),
113 LSDAPointerEncoding(LSDAPointerEncoding), Personality(Personality),
114 PersonalityEnc(PersonalityEnc) {}
125 return PersonalityEnc;
141 const uint8_t SegmentDescriptorSize;
143 const int64_t DataAlignmentFactor;
144 const uint64_t ReturnAddressRegister;
150 const std::optional<uint64_t> Personality;
151 const std::optional<uint32_t> PersonalityEnc;
161 Cie ? Cie->getCodeAlignmentFactor() : 0,
163 CIEPointer(CIEPointer), InitialLocation(InitialLocation),
186 const CIE *LinkedCIE;
187 const std::optional<uint64_t> LSDAAddress;
200 std::vector<std::unique_ptr<dwarf::FrameEntry>> Entries;
217 std::optional<uint64_t>
Offset)
const;
224 bool empty()
const {
return Entries.empty(); }
static int getDataAlignmentFactor(MCStreamer &streamer)
This file defines the SmallString class.
A class that represents an address range.
A parsed .debug_frame or .eh_frame section.
iterator_range< iterator > entries() const
LLVM_ABI void dump(raw_ostream &OS, DIDumpOptions DumpOpts, std::optional< uint64_t > Offset) const
Dump the section data into the given stream.
LLVM_ABI ~DWARFDebugFrame()
iterator begin() const
DWARF Frame entries accessors.
uint64_t getEHFrameAddress() const
bool empty() const
Return whether the section has any entries.
Lightweight error class with error context and mandatory checking.
SmallString - A SmallString is just a SmallVector with methods and accessors that make it work better...
StringRef - Represent a constant reference to a string, i.e.
Represent a sequence of Call Frame Information instructions that, when read in order,...
DWARF Common Information Entry (CIE)
static bool classof(const FrameEntry *FE)
CIE(bool IsDWARF64, uint64_t Offset, uint64_t Length, uint8_t Version, SmallString< 8 > Augmentation, uint8_t AddressSize, uint8_t SegmentDescriptorSize, uint64_t CodeAlignmentFactor, int64_t DataAlignmentFactor, uint64_t ReturnAddressRegister, SmallString< 8 > AugmentationData, uint32_t FDEPointerEncoding, uint32_t LSDAPointerEncoding, std::optional< uint64_t > Personality, std::optional< uint32_t > PersonalityEnc, Triple::ArchType Arch)
uint64_t getReturnAddressRegister() const
uint8_t getVersion() const
int64_t getDataAlignmentFactor() const
std::optional< uint32_t > getPersonalityEncoding() const
std::optional< uint64_t > getPersonalityAddress() const
StringRef getAugmentationData() const
uint64_t getCodeAlignmentFactor() const
uint32_t getLSDAPointerEncoding() const
uint32_t getFDEPointerEncoding() const
StringRef getAugmentationString() const
DWARF Frame Description Entry (FDE)
uint64_t getAddressRange() const
uint64_t getInitialLocation() const
uint64_t getCIEPointer() const
std::optional< uint64_t > getLSDAAddress() const
const CIE * getLinkedCIE() const
static bool classof(const FrameEntry *FE)
FDE(bool IsDWARF64, uint64_t Offset, uint64_t Length, uint64_t CIEPointer, uint64_t InitialLocation, uint64_t AddressRange, CIE *Cie, std::optional< uint64_t > LSDAAddress, Triple::ArchType Arch)
An entry in either debug_frame or eh_frame.
FrameEntry(FrameKind K, bool IsDWARF64, uint64_t Offset, uint64_t Length, uint64_t CodeAlign, int64_t DataAlign, Triple::ArchType Arch)
const uint64_t Length
Entry length as specified in DWARF.
const uint64_t Offset
Offset of this entry in the section.
virtual ~FrameEntry()=default
virtual void dump(raw_ostream &OS, DIDumpOptions DumpOpts) const =0
Dump the instructions in this CFI fragment.
const CFIProgram & cfis() const
FrameKind getKind() const
uint64_t getLength() const
uint64_t getOffset() const
A range adaptor for a pair of iterators.
This class implements an extremely fast bulk output stream that can only output to a stream.
LLVM_ABI Expected< UnwindTable > createUnwindTable(const CIE *Cie)
Create an UnwindTable from a Common Information Entry (CIE).
This is an optimization pass for GlobalISel generic memory operations.
void dump(const SparseBitVector< ElementSize > &LHS, raw_ostream &out)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.
Container for dump options that control which debug information will be dumped.
An iterator type that allows iterating over the pointees via some other iterator.