struct CfiEntry
Defined at line 144 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
Public Methods
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs>
std::optional<CfiEntry> Read (Diagnostics &diag,std::span<const std::byte>bytes,ErrorArgs &&...error_args)
Read a single CFI entry (either CIE or FDE) from the byte stream.
Failures will be sent to the diagnostics object with any error_args
appended to the basic details in the FormatError call. The Elf template
parameter indicates the byte order.
Defined at line 151 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
void NormalizeEhFrame (uint64_t vaddr)
After Read yields an entry from .eh_frame, normalize it to standard DWARF
CFI format as used in .debug_frame. The argument must be the virtual
address that corresponds to the beginning of the buffer passed to Read.
Defined at line 184 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs>
std::optional<CfiEntry> ReadEhFrame (Diagnostics &diag,std::span<const std::byte>bytes,Elf::size_typevaddr,ErrorArgs &&...error_args)
Like Read, but with NormalizeEhFrame applied to the results.
Defined at line 208 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs,auto& memory>
std::optional<CfiEntry> ReadEhFrameFromMemory (Diagnostics &diag,MemoryReader<typename Elf::size_type, std::byte> auto &memory,Elf::size_typevaddr,ErrorArgs &&...error_args)
This does ReadEhFrame, but using a Memory object to read the FDE at vaddr.
The error_args do not need to include reporting the FDE vaddr passed here.
Defined at line 221 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
size_t size_bytes ()
Defined at line 234 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
bool IsCie ()
Returns true if this is a CIE, false if it's an FDE.
Defined at line 237 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
std::optional<uint64_t> cie_pointer ()
Returns std::nullopt for a CIE, or the CIE pointer for an FDE.
Defined at line 240 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs,auto& memory>
std::optional<CfiEntry> ReadEhFrameCieFromMemory (Diagnostics &diag,MemoryReader<typename Elf::size_type, std::byte> auto &memory,ErrorArgs &&...error_args)
Read the CIE referenced by this FDE. The Memory object is used to read
from virtual addresses in the same address space used in NormalizeEhFrame
on this object.
Defined at line 251 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs>
std::optional<CfiCie> DecodeCie (Diagnostics &diag,uint64_tvaddr,ErrorArgs &&...error_args)
Decode a CIE into the internal form described above. The vaddr should be
that of the CIE itself if in .eh_frame format, where "PC-relative"
encodings might be used. The error_args do not need to include reporting
the CIE vaddr passed here.
Defined at line 284 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h
template <ElfApi Elf = Elf<>,class Diagnostics,typename... ErrorArgs>
std::optional<CfiFde> DecodeFde (Diagnostics &diag,uint64_tvaddr,const CfiCie &cie,ErrorArgs &&...error_args)
Decode an FDE into the internal form described above, after the CIE it
points to has already been decoded. The vaddr should be that of the FDE
itself if in .eh_frame format, where "PC-relative" encodings might be
used. The error_args do not need to include reporting the FDE vaddr passed
here.
Defined at line 497 of file ../../src/lib/elfldltl/include/lib/elfldltl/dwarf/cfi-entry.h