llvm/lldb/unittests/Expression/DWARFExpressionTest.cpp

//===-- DWARFExpressionTest.cpp -------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "lldb/Expression/DWARFExpression.h"
#include "Plugins/Platform/Linux/PlatformLinux.h"
#include "Plugins/SymbolFile/DWARF/DWARFDebugInfo.h"
#include "Plugins/SymbolFile/DWARF/SymbolFileDWARFDwo.h"
#include "Plugins/TypeSystem/Clang/TypeSystemClang.h"
#include "TestingSupport/Symbol/YAMLModuleTester.h"
#include "lldb/Core/Debugger.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/Value.h"
#include "lldb/Core/dwarf.h"
#include "lldb/Host/HostInfo.h"
#include "lldb/Symbol/ObjectFile.h"
#include "lldb/Utility/StreamString.h"
#include "llvm/ADT/StringExtras.h"
#include "llvm/Testing/Support/Error.h"
#include "gtest/gtest.h"

usingnamespacelldb_private;
usingnamespacelldb_private::dwarf;
usingnamespacelldb_private::plugin::dwarf;

static llvm::Expected<Scalar> Evaluate(llvm::ArrayRef<uint8_t> expr,
                                       lldb::ModuleSP module_sp = {}

class DWARFExpressionTester : public YAMLModuleTester {};

/// Unfortunately Scalar's operator==() is really picky.
static Scalar GetScalar(unsigned bits, uint64_t value, bool sign) {}

/// This is needed for the tests that use a mock process.
class DWARFExpressionMockProcessTest : public ::testing::Test {};

// NB: This class doesn't use the override keyword to avoid
// -Winconsistent-missing-override warnings from the compiler. The
// inconsistency comes from the overriding definitions in the MOCK_*** macros.
class MockTarget : public Target {};

TEST(DWARFExpression, DW_OP_pick) {}

TEST(DWARFExpression, DW_OP_const) {}

TEST(DWARFExpression, DW_OP_skip) {}

TEST(DWARFExpression, DW_OP_bra) {}

TEST(DWARFExpression, DW_OP_convert) {}

TEST(DWARFExpression, DW_OP_stack_value) {}

TEST(DWARFExpression, DW_OP_piece) {}

TEST(DWARFExpression, DW_OP_implicit_value) {}

TEST(DWARFExpression, DW_OP_unknown) {}

TEST_F(DWARFExpressionMockProcessTest, DW_OP_deref) {}

TEST_F(DWARFExpressionMockProcessTest, WASM_DW_OP_addr) {}

TEST_F(DWARFExpressionMockProcessTest, WASM_DW_OP_addr_index) {}

class CustomSymbolFileDWARF : public SymbolFileDWARF {};

char CustomSymbolFileDWARF::ID;

static auto testExpressionVendorExtensions(lldb::ModuleSP module_sp,
                                           DWARFUnit &dwarf_unit) {}

TEST(DWARFExpression, Extensions) {}

TEST(DWARFExpression, ExtensionsDWO) {}

TEST_F(DWARFExpressionMockProcessTest, DW_OP_piece_file_addr) {}