#include "llvm/DebugInfo/DWARF/DWARFDebugFrame.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/BinaryFormat/Dwarf.h"
#include "llvm/DebugInfo/DIContext.h"
#include "llvm/DebugInfo/DWARF/DWARFDataExtractor.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"
usingnamespacellvm;
namespace {
dwarf::CIE createCIE(bool IsDWARF64, uint64_t Offset, uint64_t Length) { … }
void expectDumpResult(const dwarf::CIE &TestCIE, bool IsEH,
StringRef ExpectedFirstLine) { … }
void expectDumpResult(const dwarf::FDE &TestFDE, bool IsEH,
StringRef ExpectedFirstLine) { … }
TEST(DWARFDebugFrame, DumpDWARF32CIE) { … }
TEST(DWARFDebugFrame, DumpDWARF64CIE) { … }
TEST(DWARFDebugFrame, DumpEHCIE) { … }
TEST(DWARFDebugFrame, DumpEH64CIE) { … }
TEST(DWARFDebugFrame, DumpDWARF64FDE) { … }
TEST(DWARFDebugFrame, DumpEH64FDE) { … }
static Error parseCFI(dwarf::CIE &C, ArrayRef<uint8_t> Instructions,
std::optional<uint64_t> Size = std::nullopt) { … }
static Error parseCFI(dwarf::FDE &FDE, ArrayRef<uint8_t> Instructions) { … }
TEST(DWARFDebugFrame, InvalidCFIOpcodesTest) { … }
TEST(DWARFDebugFrame, ParseTruncatedCFITest) { … }
void expectDumpResult(const dwarf::UnwindLocation &Loc,
StringRef ExpectedFirstLine) { … }
TEST(DWARFDebugFrame, DumpUnwindLocations) { … }
void expectDumpResult(const dwarf::RegisterLocations &Locs,
StringRef ExpectedFirstLine) { … }
TEST(DWARFDebugFrame, RegisterLocations) { … }
TEST(DWARFDebugFrame, UnwindTableEmptyRows) { … }
TEST(DWARFDebugFrame, UnwindTableEmptyRows_NOPs) { … }
TEST(DWARFDebugFrame, UnwindTableErrorNonAscendingFDERows) { … }
TEST(DWARFDebugFrame, UnwindTableError_DW_CFA_restore_state) { … }
TEST(DWARFDebugFrame, UnwindTableError_DW_CFA_GNU_window_save) { … }
TEST(DWARFDebugFrame, UnwindTableError_DW_CFA_def_cfa_offset) { … }
TEST(DWARFDebugFrame, UnwindTableDefCFAOffsetSFCFAError) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_def_cfa_register) { … }
TEST(DWARFDebugFrame, UnwindTableRowPushingOpcodes) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_restore) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_restore_extended) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_offset) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_val_offset) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_nop) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_remember_state) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_undefined) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_same_value) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_register) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_expression) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_val_expression) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_def_cfa) { … }
TEST(DWARFDebugFrame, UnwindTable_DW_CFA_LLVM_def_aspace_cfa) { … }
}