LLDB mainline
Classes | Namespaces | Functions | Variables
EmulateInstructionRISCV.cpp File Reference
#include "EmulateInstructionRISCV.h"
#include "Plugins/Process/Utility/RegisterInfoPOSIX_riscv64.h"
#include "Plugins/Process/Utility/lldb-riscv-register-enums.h"
#include "RISCVCInstructions.h"
#include "RISCVInstructions.h"
#include "lldb/Core/Address.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Interpreter/OptionValueArray.h"
#include "lldb/Interpreter/OptionValueDictionary.h"
#include "lldb/Symbol/UnwindPlan.h"
#include "lldb/Utility/ArchSpec.h"
#include "lldb/Utility/LLDBLog.h"
#include "lldb/Utility/Stream.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/MathExtras.h"
#include <optional>

Go to the source code of this file.

Classes

class  lldb_private::Executor
 

Namespaces

namespace  lldb_private
 A class that represents a running process on the host machine.
 

Functions

template<typename... Ts>
static std::optional< std::tuple< Ts... > > lldb_private::zipOpt (std::optional< Ts > &&...ts)
 Returns all values wrapped in Optional, or std::nullopt if any of the values is std::nullopt.
 
constexpr int32_t lldb_private::SignExt (uint32_t imm)
 
constexpr uint32_t lldb_private::DecodeBImm (uint32_t inst)
 
constexpr uint32_t lldb_private::DecodeSImm (uint32_t inst)
 
constexpr uint32_t lldb_private::DecodeUImm (uint32_t inst)
 
static uint32_t lldb_private::GPREncodingToLLDB (uint32_t reg_encode)
 
static uint32_t lldb_private::FPREncodingToLLDB (uint32_t reg_encode)
 
static bool lldb_private::CompareB (uint64_t rs1, uint64_t rs2, uint32_t funct3)
 
template<typename I >
static std::enable_if_t< is_load< I >||is_store< I >, std::optional< uint64_t > > lldb_private::LoadStoreAddr (EmulateInstructionRISCV &emulator, I inst)
 
template<typename I , typename T , typename E >
static std::enable_if_t< is_load< I >, bool > lldb_private::Load (EmulateInstructionRISCV &emulator, I inst, uint64_t(*extend)(E))
 
template<typename I , typename T >
static std::enable_if_t< is_store< I >, bool > lldb_private::Store (EmulateInstructionRISCV &emulator, I inst)
 
template<typename I >
static std::enable_if_t< is_amo_add< I >||is_amo_bit_op< I >||is_amo_swap< I >||is_amo_cmp< I >, std::optional< uint64_t > > lldb_private::AtomicAddr (EmulateInstructionRISCV &emulator, I inst, unsigned int align)
 
template<typename I , typename T >
static std::enable_if_t< is_amo_swap< I >, bool > lldb_private::AtomicSwap (EmulateInstructionRISCV &emulator, I inst, int align, uint64_t(*extend)(T))
 
template<typename I , typename T >
static std::enable_if_t< is_amo_add< I >, bool > lldb_private::AtomicADD (EmulateInstructionRISCV &emulator, I inst, int align, uint64_t(*extend)(T))
 
template<typename I , typename T >
static std::enable_if_t< is_amo_bit_op< I >, bool > lldb_private::AtomicBitOperate (EmulateInstructionRISCV &emulator, I inst, int align, uint64_t(*extend)(T), T(*operate)(T, T))
 
template<typename I , typename T >
static std::enable_if_t< is_amo_cmp< I >, bool > lldb_private::AtomicCmp (EmulateInstructionRISCV &emulator, I inst, int align, uint64_t(*extend)(T), T(*cmp)(T, T))
 
bool lldb_private::AtomicSequence (EmulateInstructionRISCV &emulator)
 
template<typename T >
static RISCVInst lldb_private::DecodeUType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeJType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeIType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeBType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeSType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeRType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeRShamtType (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeRRS1Type (uint32_t inst)
 
template<typename T >
static RISCVInst lldb_private::DecodeR4Type (uint32_t inst)
 

Variables

constexpr uint32_t lldb_private::BEQ = 0b000
 
constexpr uint32_t lldb_private::BNE = 0b001
 
constexpr uint32_t lldb_private::BLT = 0b100
 
constexpr uint32_t lldb_private::BGE = 0b101
 
constexpr uint32_t lldb_private::BLTU = 0b110
 
constexpr uint32_t lldb_private::BGEU = 0b111
 
template<typename T >
constexpr bool lldb_private::is_load
 
template<typename T >
constexpr bool lldb_private::is_store
 
template<typename T >
constexpr bool lldb_private::is_amo_add
 
template<typename T >
constexpr bool lldb_private::is_amo_bit_op
 
template<typename T >
constexpr bool lldb_private::is_amo_swap
 
template<typename T >
constexpr bool lldb_private::is_amo_cmp
 
static const InstrPattern lldb_private::PATTERNS []