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

Go to the source code of this file.

Macros

#define LLVM_EXTENSION
 
#define GPR_OFFSET(reg)   (LLVM_EXTENSION offsetof(RegisterContextDarwin_i386::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_eax = 0, gpr_ebx, gpr_ecx, gpr_edx,
  gpr_edi, gpr_esi, gpr_ebp, gpr_esp,
  gpr_ss, gpr_eflags, gpr_eip, gpr_cs,
  gpr_ds, gpr_es, 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, 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_eax = 0, ehframe_ecx, ehframe_edx, ehframe_ebx,
  ehframe_ebp, ehframe_esp, ehframe_esi, ehframe_edi,
  ehframe_eip, ehframe_eflags
}
 
enum  {
  dwarf_eax = 0, dwarf_ecx, dwarf_edx, dwarf_ebx,
  dwarf_esp, dwarf_ebp, dwarf_esi, dwarf_edi,
  dwarf_eip, dwarf_eflags, dwarf_stmm0 = 11, dwarf_stmm1,
  dwarf_stmm2, dwarf_stmm3, dwarf_stmm4, dwarf_stmm5,
  dwarf_stmm6, dwarf_stmm7, dwarf_xmm0 = 21, dwarf_xmm1,
  dwarf_xmm2, dwarf_xmm3, dwarf_xmm4, dwarf_xmm5,
  dwarf_xmm6, dwarf_xmm7
}
 

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_i386::EXC *) NULL)->reg), \
EXC_OFFSET(reg), eEncodingUint, eFormatHex

Definition at line 165 of file RegisterContextDarwin_i386.cpp.

◆ DEFINE_FPU_UINT

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

Definition at line 153 of file RegisterContextDarwin_i386.cpp.

◆ DEFINE_FPU_VECT

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

Definition at line 156 of file RegisterContextDarwin_i386.cpp.

◆ DEFINE_GPR

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

Definition at line 150 of file RegisterContextDarwin_i386.cpp.

◆ EXC_OFFSET

#define EXC_OFFSET (   reg)

◆ FPU_OFFSET

#define FPU_OFFSET (   reg)

◆ GPR_OFFSET

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

Definition at line 136 of file RegisterContextDarwin_i386.cpp.

◆ LLVM_EXTENSION

#define LLVM_EXTENSION

Definition at line 25 of file RegisterContextDarwin_i386.cpp.

◆ REG_CONTEXT_SIZE

#define REG_CONTEXT_SIZE

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
gpr_eax 
gpr_ebx 
gpr_ecx 
gpr_edx 
gpr_edi 
gpr_esi 
gpr_ebp 
gpr_esp 
gpr_ss 
gpr_eflags 
gpr_eip 
gpr_cs 
gpr_ds 
gpr_es 
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 
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 33 of file RegisterContextDarwin_i386.cpp.

◆ anonymous enum

anonymous enum
Enumerator
ehframe_eax 
ehframe_ecx 
ehframe_edx 
ehframe_ebx 
ehframe_ebp 
ehframe_esp 
ehframe_esi 
ehframe_edi 
ehframe_eip 
ehframe_eflags 

Definition at line 94 of file RegisterContextDarwin_i386.cpp.

◆ anonymous enum

anonymous enum
Enumerator
dwarf_eax 
dwarf_ecx 
dwarf_edx 
dwarf_ebx 
dwarf_esp 
dwarf_ebp 
dwarf_esi 
dwarf_edi 
dwarf_eip 
dwarf_eflags 
dwarf_stmm0 
dwarf_stmm1 
dwarf_stmm2 
dwarf_stmm3 
dwarf_stmm4 
dwarf_stmm5 
dwarf_stmm6 
dwarf_stmm7 
dwarf_xmm0 
dwarf_xmm1 
dwarf_xmm2 
dwarf_xmm3 
dwarf_xmm4 
dwarf_xmm5 
dwarf_xmm6 
dwarf_xmm7 

Definition at line 107 of file RegisterContextDarwin_i386.cpp.

Variable Documentation

◆ g_exc_regnums

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

Definition at line 456 of file RegisterContextDarwin_i386.cpp.

◆ g_fpu_regnums

uint32_t g_fpu_regnums[]
static
Initial value:
= {

Definition at line 447 of file RegisterContextDarwin_i386.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_gpr_registers
static uint32_t g_fpu_regnums[]
const size_t k_num_exc_registers
static uint32_t g_exc_regnums[]
const size_t k_num_fpu_registers
static uint32_t g_gpr_regnums[]

Definition at line 466 of file RegisterContextDarwin_i386.cpp.

Referenced by RegisterContextDarwin_i386::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 461 of file RegisterContextDarwin_i386.cpp.

◆ k_num_fpu_registers

const size_t k_num_fpu_registers = llvm::array_lengthof(g_fpu_regnums)

Definition at line 460 of file RegisterContextDarwin_i386.cpp.

◆ k_num_gpr_registers

const size_t k_num_gpr_registers = llvm::array_lengthof(g_gpr_regnums)

Definition at line 459 of file RegisterContextDarwin_i386.cpp.

Referenced by RegisterContextDarwin_i386::LogGPR().

◆ 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)