LLDB  mainline
Macros | Enumerations | Variables
RegisterContextDarwin_x86_64.cpp File Reference
#include <inttypes.h>
#include <stdarg.h>
#include <stddef.h>
#include <memory>
#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 "RegisterContextDarwin_x86_64.h"
Include dependency graph for RegisterContextDarwin_x86_64.cpp:

Go to the source code of this file.

Macros

#define LLVM_EXTENSION
 
#define GPR_OFFSET(reg)   (LLVM_EXTENSION offsetof(RegisterContextDarwin_x86_64::GPR, reg))
 
#define FPU_OFFSET(reg)
 
#define EXC_OFFSET(reg)
 
#define DEFINE_GPR(reg, alt)
 
#define DEFINE_FPU_UINT(reg)
 
#define DEFINE_FPU_VECT(reg, i)
 
#define DEFINE_EXC(reg)
 
#define REG_CONTEXT_SIZE
 

Enumerations

enum  {
  gpr_rax = 0, gpr_rbx, gpr_rcx, gpr_rdx,
  gpr_rdi, gpr_rsi, gpr_rbp, gpr_rsp,
  gpr_r8, gpr_r9, gpr_r10, gpr_r11,
  gpr_r12, gpr_r13, gpr_r14, gpr_r15,
  gpr_rip, gpr_rflags, gpr_cs, gpr_fs,
  gpr_gs, fpu_fcw, fpu_fsw, fpu_ftw,
  fpu_fop, fpu_ip, fpu_cs, fpu_dp,
  fpu_ds, fpu_mxcsr, fpu_mxcsrmask, fpu_stmm0,
  fpu_stmm1, fpu_stmm2, fpu_stmm3, fpu_stmm4,
  fpu_stmm5, fpu_stmm6, fpu_stmm7, fpu_xmm0,
  fpu_xmm1, fpu_xmm2, fpu_xmm3, fpu_xmm4,
  fpu_xmm5, fpu_xmm6, fpu_xmm7, fpu_xmm8,
  fpu_xmm9, fpu_xmm10, fpu_xmm11, fpu_xmm12,
  fpu_xmm13, fpu_xmm14, fpu_xmm15, exc_trapno,
  exc_err, exc_faultvaddr, k_num_registers, fpu_fctrl = fpu_fcw,
  fpu_fstat = fpu_fsw, fpu_ftag = fpu_ftw, fpu_fiseg = fpu_cs, fpu_fioff = fpu_ip,
  fpu_foseg = fpu_ds, fpu_fooff = fpu_dp
}
 
enum  ehframe_dwarf_regnums {
  ehframe_dwarf_gpr_rax = 0, ehframe_dwarf_gpr_rdx, ehframe_dwarf_gpr_rcx, ehframe_dwarf_gpr_rbx,
  ehframe_dwarf_gpr_rsi, ehframe_dwarf_gpr_rdi, ehframe_dwarf_gpr_rbp, ehframe_dwarf_gpr_rsp,
  ehframe_dwarf_gpr_r8, ehframe_dwarf_gpr_r9, ehframe_dwarf_gpr_r10, ehframe_dwarf_gpr_r11,
  ehframe_dwarf_gpr_r12, ehframe_dwarf_gpr_r13, ehframe_dwarf_gpr_r14, ehframe_dwarf_gpr_r15,
  ehframe_dwarf_gpr_rip, ehframe_dwarf_fpu_xmm0, ehframe_dwarf_fpu_xmm1, ehframe_dwarf_fpu_xmm2,
  ehframe_dwarf_fpu_xmm3, ehframe_dwarf_fpu_xmm4, ehframe_dwarf_fpu_xmm5, ehframe_dwarf_fpu_xmm6,
  ehframe_dwarf_fpu_xmm7, ehframe_dwarf_fpu_xmm8, ehframe_dwarf_fpu_xmm9, ehframe_dwarf_fpu_xmm10,
  ehframe_dwarf_fpu_xmm11, ehframe_dwarf_fpu_xmm12, ehframe_dwarf_fpu_xmm13, ehframe_dwarf_fpu_xmm14,
  ehframe_dwarf_fpu_xmm15, ehframe_dwarf_fpu_stmm0, ehframe_dwarf_fpu_stmm1, ehframe_dwarf_fpu_stmm2,
  ehframe_dwarf_fpu_stmm3, ehframe_dwarf_fpu_stmm4, ehframe_dwarf_fpu_stmm5, ehframe_dwarf_fpu_stmm6,
  ehframe_dwarf_fpu_stmm7
}
 

Variables

static RegisterInfo g_register_infos []
 
static size_t k_num_register_infos = llvm::array_lengthof(g_register_infos)
 
static uint32_t g_gpr_regnums []
 
static uint32_t g_fpu_regnums []
 
static uint32_t g_exc_regnums [] = {exc_trapno, exc_err, exc_faultvaddr}
 
const size_t k_num_gpr_registers = llvm::array_lengthof(g_gpr_regnums)
 
const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums)
 
const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums)
 
static const RegisterSet g_reg_sets []
 
const size_t k_num_regsets = llvm::array_lengthof(g_reg_sets)
 

Macro Definition Documentation

◆ DEFINE_EXC

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

Definition at line 182 of file RegisterContextDarwin_x86_64.cpp.

◆ DEFINE_FPU_UINT

#define DEFINE_FPU_UINT (   reg)
Value:
#reg, NULL, sizeof(((RegisterContextDarwin_x86_64::FPU *) NULL)->reg), \
FPU_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 171 of file RegisterContextDarwin_x86_64.cpp.

◆ DEFINE_FPU_VECT

#define DEFINE_FPU_VECT (   reg,
 
)
Value:
#reg #i, NULL, \
sizeof(((RegisterContextDarwin_x86_64::FPU *) NULL)->reg[i].bytes), \
FPU_OFFSET(reg[i]), eEncodingVector, eFormatVectorOfUInt8, \
{ehframe_dwarf_fpu_##reg##i, \
ehframe_dwarf_fpu_##reg##i, LLDB_INVALID_REGNUM, \
LLDB_INVALID_REGNUM, fpu_##reg##i }, \
nullptr, nullptr, nullptr, 0

Definition at line 174 of file RegisterContextDarwin_x86_64.cpp.

◆ DEFINE_GPR

#define DEFINE_GPR (   reg,
  alt 
)
Value:
#reg, alt, sizeof(((RegisterContextDarwin_x86_64::GPR *) NULL)->reg), \
GPR_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 168 of file RegisterContextDarwin_x86_64.cpp.

◆ EXC_OFFSET

#define EXC_OFFSET (   reg)

◆ FPU_OFFSET

#define FPU_OFFSET (   reg)

◆ GPR_OFFSET

#define GPR_OFFSET (   reg)    (LLVM_EXTENSION offsetof(RegisterContextDarwin_x86_64::GPR, reg))

Definition at line 154 of file RegisterContextDarwin_x86_64.cpp.

◆ LLVM_EXTENSION

#define LLVM_EXTENSION

Definition at line 27 of file RegisterContextDarwin_x86_64.cpp.

◆ REG_CONTEXT_SIZE

#define REG_CONTEXT_SIZE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
gpr_rax 
gpr_rbx 
gpr_rcx 
gpr_rdx 
gpr_rdi 
gpr_rsi 
gpr_rbp 
gpr_rsp 
gpr_r8 
gpr_r9 
gpr_r10 
gpr_r11 
gpr_r12 
gpr_r13 
gpr_r14 
gpr_r15 
gpr_rip 
gpr_rflags 
gpr_cs 
gpr_fs 
gpr_gs 
fpu_fcw 
fpu_fsw 
fpu_ftw 
fpu_fop 
fpu_ip 
fpu_cs 
fpu_dp 
fpu_ds 
fpu_mxcsr 
fpu_mxcsrmask 
fpu_stmm0 
fpu_stmm1 
fpu_stmm2 
fpu_stmm3 
fpu_stmm4 
fpu_stmm5 
fpu_stmm6 
fpu_stmm7 
fpu_xmm0 
fpu_xmm1 
fpu_xmm2 
fpu_xmm3 
fpu_xmm4 
fpu_xmm5 
fpu_xmm6 
fpu_xmm7 
fpu_xmm8 
fpu_xmm9 
fpu_xmm10 
fpu_xmm11 
fpu_xmm12 
fpu_xmm13 
fpu_xmm14 
fpu_xmm15 
exc_trapno 
exc_err 
exc_faultvaddr 
k_num_registers 
fpu_fctrl 
fpu_fstat 
fpu_ftag 
fpu_fiseg 
fpu_fioff 
fpu_foseg 
fpu_fooff 

Definition at line 35 of file RegisterContextDarwin_x86_64.cpp.

◆ ehframe_dwarf_regnums

Enumerator
ehframe_dwarf_gpr_rax 
ehframe_dwarf_gpr_rdx 
ehframe_dwarf_gpr_rcx 
ehframe_dwarf_gpr_rbx 
ehframe_dwarf_gpr_rsi 
ehframe_dwarf_gpr_rdi 
ehframe_dwarf_gpr_rbp 
ehframe_dwarf_gpr_rsp 
ehframe_dwarf_gpr_r8 
ehframe_dwarf_gpr_r9 
ehframe_dwarf_gpr_r10 
ehframe_dwarf_gpr_r11 
ehframe_dwarf_gpr_r12 
ehframe_dwarf_gpr_r13 
ehframe_dwarf_gpr_r14 
ehframe_dwarf_gpr_r15 
ehframe_dwarf_gpr_rip 
ehframe_dwarf_fpu_xmm0 
ehframe_dwarf_fpu_xmm1 
ehframe_dwarf_fpu_xmm2 
ehframe_dwarf_fpu_xmm3 
ehframe_dwarf_fpu_xmm4 
ehframe_dwarf_fpu_xmm5 
ehframe_dwarf_fpu_xmm6 
ehframe_dwarf_fpu_xmm7 
ehframe_dwarf_fpu_xmm8 
ehframe_dwarf_fpu_xmm9 
ehframe_dwarf_fpu_xmm10 
ehframe_dwarf_fpu_xmm11 
ehframe_dwarf_fpu_xmm12 
ehframe_dwarf_fpu_xmm13 
ehframe_dwarf_fpu_xmm14 
ehframe_dwarf_fpu_xmm15 
ehframe_dwarf_fpu_stmm0 
ehframe_dwarf_fpu_stmm1 
ehframe_dwarf_fpu_stmm2 
ehframe_dwarf_fpu_stmm3 
ehframe_dwarf_fpu_stmm4 
ehframe_dwarf_fpu_stmm5 
ehframe_dwarf_fpu_stmm6 
ehframe_dwarf_fpu_stmm7 

Definition at line 109 of file RegisterContextDarwin_x86_64.cpp.

Variable Documentation

◆ g_exc_regnums

uint32_t g_exc_regnums[] = {exc_trapno, exc_err, exc_faultvaddr}
static

Definition at line 517 of file RegisterContextDarwin_x86_64.cpp.

◆ g_fpu_regnums

uint32_t g_fpu_regnums[]
static
Initial value:
= {

Definition at line 509 of file RegisterContextDarwin_x86_64.cpp.

◆ g_gpr_regnums

uint32_t g_gpr_regnums[]
static

◆ g_reg_sets

const RegisterSet g_reg_sets[]
static
Initial value:
= {
{
"General Purpose Registers", "gpr", k_num_gpr_registers, g_gpr_regnums,
},
{"Floating Point Registers", "fpu", k_num_fpu_registers, g_fpu_regnums},
{"Exception State Registers", "exc", k_num_exc_registers, g_exc_regnums}}
const size_t k_num_fpu_registers
const size_t k_num_gpr_registers
static uint32_t g_exc_regnums[]
const size_t k_num_exc_registers
static uint32_t g_gpr_regnums[]
static uint32_t g_fpu_regnums[]

Definition at line 527 of file RegisterContextDarwin_x86_64.cpp.

Referenced by RegisterContextDarwin_x86_64::GetRegisterSet().

◆ g_register_infos

RegisterInfo g_register_infos[]
static

◆ k_num_exc_registers

const size_t k_num_exc_registers = llvm::array_lengthof(g_exc_regnums)

Definition at line 522 of file RegisterContextDarwin_x86_64.cpp.

◆ k_num_fpu_registers

const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums)

Definition at line 521 of file RegisterContextDarwin_x86_64.cpp.

◆ k_num_gpr_registers

const size_t k_num_gpr_registers = llvm::array_lengthof(g_gpr_regnums)

◆ k_num_register_infos

size_t k_num_register_infos = llvm::array_lengthof(g_register_infos)
static

◆ k_num_regsets

const size_t k_num_regsets = llvm::array_lengthof(g_reg_sets)