GDBserver
Classes | Functions | Variables
aarch64-linux-hw-point.c File Reference
#include "common-defs.h"
#include "break-common.h"
#include "common-regcache.h"
#include "nat/linux-nat.h"
#include "aarch64-linux-hw-point.h"
#include <sys/uio.h>
#include <asm/ptrace.h>
#include <sys/ptrace.h>
#include <elf.h>

Go to the source code of this file.

Classes

struct  aarch64_dr_update_callback_param
 

Functions

unsigned int aarch64_watchpoint_length (unsigned int ctrl)
 
static unsigned int aarch64_point_encode_ctrl_reg (enum target_hw_bp_type type, int len)
 
static int aarch64_point_is_aligned (int is_watchpoint, CORE_ADDR addr, int len)
 
static void aarch64_align_watchpoint (CORE_ADDR addr, int len, CORE_ADDR *aligned_addr_p, int *aligned_len_p, CORE_ADDR *next_addr_p, int *next_len_p)
 
static int debug_reg_change_callback (struct lwp_info *lwp, void *ptr)
 
static void aarch64_notify_debug_reg_change (const struct aarch64_debug_reg_state *state, int is_watchpoint, unsigned int idx)
 
static int aarch64_dr_state_insert_one_point (struct aarch64_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
 
static int aarch64_dr_state_remove_one_point (struct aarch64_debug_reg_state *state, enum target_hw_bp_type type, CORE_ADDR addr, int len)
 
int aarch64_handle_breakpoint (enum target_hw_bp_type type, CORE_ADDR addr, int len, int is_insert, struct aarch64_debug_reg_state *state)
 
static int aarch64_handle_aligned_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, int len, int is_insert, struct aarch64_debug_reg_state *state)
 
static int aarch64_handle_unaligned_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, int len, int is_insert, struct aarch64_debug_reg_state *state)
 
int aarch64_handle_watchpoint (enum target_hw_bp_type type, CORE_ADDR addr, int len, int is_insert, struct aarch64_debug_reg_state *state)
 
void aarch64_linux_set_debug_regs (const struct aarch64_debug_reg_state *state, int tid, int watchpoint)
 
void aarch64_show_debug_reg_state (struct aarch64_debug_reg_state *state, const char *func, CORE_ADDR addr, int len, enum target_hw_bp_type type)
 
void aarch64_linux_get_debug_reg_capacity (int tid)
 
int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len)
 

Variables

int aarch64_num_bp_regs
 
int aarch64_num_wp_regs
 

Function Documentation

◆ aarch64_align_watchpoint()

static void aarch64_align_watchpoint ( CORE_ADDR  addr,
int  len,
CORE_ADDR aligned_addr_p,
int *  aligned_len_p,
CORE_ADDR next_addr_p,
int *  next_len_p 
)
static

◆ aarch64_dr_state_insert_one_point()

static int aarch64_dr_state_insert_one_point ( struct aarch64_debug_reg_state state,
enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len 
)
static

◆ aarch64_dr_state_remove_one_point()

static int aarch64_dr_state_remove_one_point ( struct aarch64_debug_reg_state state,
enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len 
)
static

◆ aarch64_handle_aligned_watchpoint()

static int aarch64_handle_aligned_watchpoint ( enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len,
int  is_insert,
struct aarch64_debug_reg_state state 
)
static

◆ aarch64_handle_breakpoint()

int aarch64_handle_breakpoint ( enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len,
int  is_insert,
struct aarch64_debug_reg_state state 
)

◆ aarch64_handle_unaligned_watchpoint()

static int aarch64_handle_unaligned_watchpoint ( enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len,
int  is_insert,
struct aarch64_debug_reg_state state 
)
static

◆ aarch64_handle_watchpoint()

int aarch64_handle_watchpoint ( enum target_hw_bp_type  type,
CORE_ADDR  addr,
int  len,
int  is_insert,
struct aarch64_debug_reg_state state 
)

◆ aarch64_linux_get_debug_reg_capacity()

void aarch64_linux_get_debug_reg_capacity ( int  tid)

◆ aarch64_linux_region_ok_for_watchpoint()

int aarch64_linux_region_ok_for_watchpoint ( CORE_ADDR  addr,
int  len 
)

Definition at line 680 of file aarch64-linux-hw-point.c.

References AARCH64_HWP_MAX_LEN_PER_REG, and aarch64_num_wp_regs.

Referenced by aarch64_insert_point().

◆ aarch64_linux_set_debug_regs()

void aarch64_linux_set_debug_regs ( const struct aarch64_debug_reg_state state,
int  tid,
int  watchpoint 
)

◆ aarch64_notify_debug_reg_change()

static void aarch64_notify_debug_reg_change ( const struct aarch64_debug_reg_state state,
int  is_watchpoint,
unsigned int  idx 
)
static

◆ aarch64_point_encode_ctrl_reg()

static unsigned int aarch64_point_encode_ctrl_reg ( enum target_hw_bp_type  type,
int  len 
)
static

◆ aarch64_point_is_aligned()

static int aarch64_point_is_aligned ( int  is_watchpoint,
CORE_ADDR  addr,
int  len 
)
static

◆ aarch64_show_debug_reg_state()

void aarch64_show_debug_reg_state ( struct aarch64_debug_reg_state state,
const char *  func,
CORE_ADDR  addr,
int  len,
enum target_hw_bp_type  type 
)

◆ aarch64_watchpoint_length()

unsigned int aarch64_watchpoint_length ( unsigned int  ctrl)

Definition at line 45 of file aarch64-linux-hw-point.c.

References DR_CONTROL_LENGTH.

Referenced by aarch64_stopped_data_address().

◆ debug_reg_change_callback()

static int debug_reg_change_callback ( struct lwp_info lwp,
void *  ptr 
)
static

Variable Documentation

◆ aarch64_num_bp_regs

int aarch64_num_bp_regs

◆ aarch64_num_wp_regs

int aarch64_num_wp_regs