LLDB mainline
RegisterContextDarwin_riscv32.cpp File Reference
#include "lldb/Utility/DataBufferHeap.h"
#include "lldb/Utility/DataExtractor.h"
#include "lldb/Utility/Endian.h"
#include "lldb/Utility/Log.h"
#include "lldb/Utility/RegisterValue.h"
#include "lldb/Utility/Scalar.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Compiler.h"
#include <cstddef>
#include <memory>
#include "RegisterContextDarwin_riscv32.h"
#include "Utility/RISCV_DWARF_Registers.h"

Go to the source code of this file.

Macros

#define GPR_OFFSET(reg)
#define FPU_OFFSET(reg)
#define EXC_OFFSET(reg)
#define DEFINE_GPR_ABI(reg, canon)
#define DEFINE_GPR(reg)
#define DEFINE_FPU_ABI(reg, canon)
#define DEFINE_FPU(reg)
#define DEFINE_EXC(reg)
#define REG_CONTEXT_SIZE

Enumerations

enum  {
  gpr_x0 = 0 , gpr_x1 , gpr_x2 , gpr_x3 ,
  gpr_x4 , gpr_x5 , gpr_x6 , gpr_x7 ,
  gpr_x8 , gpr_x9 , gpr_x10 , gpr_x11 ,
  gpr_x12 , gpr_x13 , gpr_x14 , gpr_x15 ,
  gpr_x16 , gpr_x17 , gpr_x18 , gpr_x19 ,
  gpr_x20 , gpr_x21 , gpr_x22 , gpr_x23 ,
  gpr_x24 , gpr_x25 , gpr_x26 , gpr_x27 ,
  gpr_x28 , gpr_x29 , gpr_x30 , gpr_x31 ,
  gpr_pc , fpr_f0 , fpr_f1 , fpr_f2 ,
  fpr_f3 , fpr_f4 , fpr_f5 , fpr_f6 ,
  fpr_f7 , fpr_f8 , fpr_f9 , fpr_f10 ,
  fpr_f11 , fpr_f12 , fpr_f13 , fpr_f14 ,
  fpr_f15 , fpr_f16 , fpr_f17 , fpr_f18 ,
  fpr_f19 , fpr_f20 , fpr_f21 , fpr_f22 ,
  fpr_f23 , fpr_f24 , fpr_f25 , fpr_f26 ,
  fpr_f27 , fpr_f28 , fpr_f29 , fpr_f30 ,
  fpr_f31 , fpr_fcsr , exc_exception , exc_fsr ,
  exc_far , csr_bank , k_num_registers
}

Variables

static RegisterInfo g_register_infos []
static size_t k_num_register_infos = std::size(g_register_infos)
static uint32_t g_gpr_regnums []
static uint32_t g_fpr_regnums []
static uint32_t g_exc_regnums [] = {exc_exception, exc_fsr, exc_far}
static uint32_t g_csr_regnums [] = {csr_bank}
const size_t k_num_gpr_registers = std::size(g_gpr_regnums)
const size_t k_num_fpr_registers = std::size(g_fpr_regnums)
const size_t k_num_exc_registers = std::size(g_exc_regnums)
const size_t k_num_csr_registers = std::size(g_csr_regnums)
static const RegisterSet g_reg_sets []
const size_t k_num_regsets = std::size(g_reg_sets)

Macro Definition Documentation

◆ DEFINE_EXC

#define DEFINE_EXC ( reg)
Value:
#reg, nullptr, \
sizeof(((RegisterContextDarwin_riscv32::EXC *)nullptr)->reg), \
EXC_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 138 of file RegisterContextDarwin_riscv32.cpp.

◆ DEFINE_FPU

#define DEFINE_FPU ( reg)
Value:
#reg, nullptr, \
sizeof(((RegisterContextDarwin_riscv32::FPU *)nullptr)->reg), \
FPU_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 134 of file RegisterContextDarwin_riscv32.cpp.

◆ DEFINE_FPU_ABI

#define DEFINE_FPU_ABI ( reg,
canon )
Value:
#reg, #canon, \
sizeof(((RegisterContextDarwin_riscv32::FPU *)nullptr)->canon), \
FPU_OFFSET(canon), eEncodingUint, eFormatHex

Definition at line 130 of file RegisterContextDarwin_riscv32.cpp.

◆ DEFINE_GPR

#define DEFINE_GPR ( reg)
Value:
#reg, nullptr, \
sizeof(((RegisterContextDarwin_riscv32::GPR *)nullptr)->reg), \
GPR_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 126 of file RegisterContextDarwin_riscv32.cpp.

◆ DEFINE_GPR_ABI

#define DEFINE_GPR_ABI ( reg,
canon )
Value:
#reg, #canon, \
sizeof(((RegisterContextDarwin_riscv32::GPR *)nullptr)->canon), \
GPR_OFFSET(canon), eEncodingUint, eFormatHex

Definition at line 122 of file RegisterContextDarwin_riscv32.cpp.

◆ EXC_OFFSET

◆ FPU_OFFSET

#define FPU_OFFSET ( reg)
Value:
(LLVM_EXTENSION offsetof(RegisterContextDarwin_riscv32::FPU, reg) + \

Definition at line 110 of file RegisterContextDarwin_riscv32.cpp.

◆ GPR_OFFSET

#define GPR_OFFSET ( reg)
Value:
(LLVM_EXTENSION offsetof(RegisterContextDarwin_riscv32::GPR, reg))

Definition at line 108 of file RegisterContextDarwin_riscv32.cpp.

◆ REG_CONTEXT_SIZE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
gpr_x0 
gpr_x1 
gpr_x2 
gpr_x3 
gpr_x4 
gpr_x5 
gpr_x6 
gpr_x7 
gpr_x8 
gpr_x9 
gpr_x10 
gpr_x11 
gpr_x12 
gpr_x13 
gpr_x14 
gpr_x15 
gpr_x16 
gpr_x17 
gpr_x18 
gpr_x19 
gpr_x20 
gpr_x21 
gpr_x22 
gpr_x23 
gpr_x24 
gpr_x25 
gpr_x26 
gpr_x27 
gpr_x28 
gpr_x29 
gpr_x30 
gpr_x31 
gpr_pc 
fpr_f0 
fpr_f1 
fpr_f2 
fpr_f3 
fpr_f4 
fpr_f5 
fpr_f6 
fpr_f7 
fpr_f8 
fpr_f9 
fpr_f10 
fpr_f11 
fpr_f12 
fpr_f13 
fpr_f14 
fpr_f15 
fpr_f16 
fpr_f17 
fpr_f18 
fpr_f19 
fpr_f20 
fpr_f21 
fpr_f22 
fpr_f23 
fpr_f24 
fpr_f25 
fpr_f26 
fpr_f27 
fpr_f28 
fpr_f29 
fpr_f30 
fpr_f31 
fpr_fcsr 
exc_exception 
exc_fsr 
exc_far 
csr_bank 
k_num_registers 

Definition at line 29 of file RegisterContextDarwin_riscv32.cpp.

Variable Documentation

◆ g_csr_regnums

uint32_t g_csr_regnums[] = {csr_bank}
static

Definition at line 778 of file RegisterContextDarwin_riscv32.cpp.

◆ g_exc_regnums

uint32_t g_exc_regnums[] = {exc_exception, exc_fsr, exc_far}
static

Definition at line 775 of file RegisterContextDarwin_riscv32.cpp.

◆ g_fpr_regnums

uint32_t g_fpr_regnums[]
static
Initial value:
= {

Definition at line 766 of file RegisterContextDarwin_riscv32.cpp.

◆ g_gpr_regnums

uint32_t g_gpr_regnums[]
static
Initial value:
= {

Definition at line 758 of file RegisterContextDarwin_riscv32.cpp.

◆ g_reg_sets

const RegisterSet g_reg_sets[]
static
Initial value:
= {
{
"General Purpose Registers",
"gpr",
},
{"Floating Point Registers", "fpr", k_num_fpr_registers, g_fpr_regnums},
{"Exception State Registers", "exc", k_num_exc_registers, g_exc_regnums},
{"CSR register bank", "csr", k_num_csr_registers, g_csr_regnums}}
static uint32_t g_exc_regnums[]
const size_t k_num_gpr_registers
const size_t k_num_exc_registers
const size_t k_num_csr_registers
static uint32_t g_fpr_regnums[]
const size_t k_num_fpr_registers
static uint32_t g_csr_regnums[]
const uint32_t g_gpr_regnums[]

Definition at line 789 of file RegisterContextDarwin_riscv32.cpp.

◆ g_register_infos

RegisterInfo g_register_infos[]
static

Definition at line 149 of file RegisterContextDarwin_riscv32.cpp.

◆ k_num_csr_registers

const size_t k_num_csr_registers = std::size(g_csr_regnums)

Definition at line 784 of file RegisterContextDarwin_riscv32.cpp.

◆ k_num_exc_registers

const size_t k_num_exc_registers = std::size(g_exc_regnums)

Definition at line 783 of file RegisterContextDarwin_riscv32.cpp.

◆ k_num_fpr_registers

const size_t k_num_fpr_registers = std::size(g_fpr_regnums)

◆ k_num_gpr_registers

const size_t k_num_gpr_registers = std::size(g_gpr_regnums)

Definition at line 781 of file RegisterContextDarwin_riscv32.cpp.

◆ k_num_register_infos

size_t k_num_register_infos = std::size(g_register_infos)
static

Definition at line 716 of file RegisterContextDarwin_riscv32.cpp.

◆ k_num_regsets

const size_t k_num_regsets = std::size(g_reg_sets)

Definition at line 800 of file RegisterContextDarwin_riscv32.cpp.