GDBserver
Classes | Macros | Typedefs | Functions | Variables
aarch64-linux-hw-point.h File Reference
#include "break-common.h"

Go to the source code of this file.

Classes

struct  aarch64_debug_reg_state
 
struct  arch_lwp_info
 

Macros

#define AARCH64_HBP_MAX_NUM   16
 
#define AARCH64_HWP_MAX_NUM   16
 
#define AARCH64_HBP_ALIGNMENT   4
 
#define AARCH64_HWP_ALIGNMENT   8
 
#define AARCH64_HWP_MAX_LEN_PER_REG   8
 
#define AARCH64_DEBUG_NUM_SLOTS(x)   ((x) & 0xff)
 
#define AARCH64_DEBUG_ARCH(x)   (((x) >> 8) & 0xff)
 
#define AARCH64_DEBUG_ARCH_V8   0x6
 
#define AARCH64_DEBUG_ARCH_V8_1   0x7
 
#define AARCH64_DEBUG_ARCH_V8_2   0x8
 
#define DR_CONTROL_ENABLED(ctrl)   (((ctrl) & 0x1) == 1)
 
#define DR_CONTROL_LENGTH(ctrl)   (((ctrl) >> 5) & 0xff)
 
#define DR_MARK_ALL_CHANGED(x, m)
 
#define DR_MARK_N_CHANGED(x, n)
 
#define DR_CLEAR_CHANGED(x)
 
#define DR_HAS_CHANGED(x)   ((x) != 0)
 
#define DR_N_HAS_CHANGED(x, n)   ((x) & ((dr_changed_t)1 << (n)))
 

Typedefs

typedef ULONGEST dr_changed_t
 

Functions

unsigned int aarch64_watchpoint_length (unsigned int ctrl)
 
int aarch64_handle_breakpoint (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)
 
struct aarch64_debug_reg_stateaarch64_get_debug_reg_state (pid_t pid)
 
int aarch64_linux_region_ok_for_watchpoint (CORE_ADDR addr, int len)
 

Variables

int aarch64_num_bp_regs
 
int aarch64_num_wp_regs
 

Macro Definition Documentation

◆ AARCH64_DEBUG_ARCH

#define AARCH64_DEBUG_ARCH (   x)    (((x) >> 8) & 0xff)

Definition at line 69 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_get_debug_reg_capacity().

◆ AARCH64_DEBUG_ARCH_V8

#define AARCH64_DEBUG_ARCH_V8   0x6

Definition at line 72 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_get_debug_reg_capacity().

◆ AARCH64_DEBUG_ARCH_V8_1

#define AARCH64_DEBUG_ARCH_V8_1   0x7

Definition at line 73 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_get_debug_reg_capacity().

◆ AARCH64_DEBUG_ARCH_V8_2

#define AARCH64_DEBUG_ARCH_V8_2   0x8

Definition at line 74 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_get_debug_reg_capacity().

◆ AARCH64_DEBUG_NUM_SLOTS

#define AARCH64_DEBUG_NUM_SLOTS (   x)    ((x) & 0xff)

Definition at line 68 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_get_debug_reg_capacity().

◆ AARCH64_HBP_ALIGNMENT

#define AARCH64_HBP_ALIGNMENT   4

Definition at line 51 of file aarch64-linux-hw-point.h.

Referenced by aarch64_point_is_aligned().

◆ AARCH64_HBP_MAX_NUM

#define AARCH64_HBP_MAX_NUM   16

◆ AARCH64_HWP_ALIGNMENT

#define AARCH64_HWP_ALIGNMENT   8

Definition at line 52 of file aarch64-linux-hw-point.h.

Referenced by aarch64_align_watchpoint(), and aarch64_point_is_aligned().

◆ AARCH64_HWP_MAX_LEN_PER_REG

#define AARCH64_HWP_MAX_LEN_PER_REG   8

◆ AARCH64_HWP_MAX_NUM

#define AARCH64_HWP_MAX_NUM   16

◆ DR_CLEAR_CHANGED

#define DR_CLEAR_CHANGED (   x)
Value:
do \
{ \
(x) = 0; \
} while (0)

Definition at line 126 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_prepare_to_resume().

◆ DR_CONTROL_ENABLED

#define DR_CONTROL_ENABLED (   ctrl)    (((ctrl) & 0x1) == 1)

Definition at line 85 of file aarch64-linux-hw-point.h.

Referenced by aarch64_stopped_data_address().

◆ DR_CONTROL_LENGTH

#define DR_CONTROL_LENGTH (   ctrl)    (((ctrl) >> 5) & 0xff)

Definition at line 86 of file aarch64-linux-hw-point.h.

Referenced by aarch64_watchpoint_length().

◆ DR_HAS_CHANGED

#define DR_HAS_CHANGED (   x)    ((x) != 0)

Definition at line 132 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_prepare_to_resume().

◆ DR_MARK_ALL_CHANGED

#define DR_MARK_ALL_CHANGED (   x,
 
)
Value:
do \
{ \
gdb_assert (sizeof ((x)) * 8 >= (m)); \
(x) = (((dr_changed_t)1 << (m)) - 1); \
} while (0)
ULONGEST dr_changed_t

Definition at line 113 of file aarch64-linux-hw-point.h.

Referenced by aarch64_linux_new_thread().

◆ DR_MARK_N_CHANGED

#define DR_MARK_N_CHANGED (   x,
 
)
Value:
do \
{ \
(x) |= ((dr_changed_t)1 << (n)); \
} while (0)
ULONGEST dr_changed_t

Definition at line 120 of file aarch64-linux-hw-point.h.

Referenced by debug_reg_change_callback().

◆ DR_N_HAS_CHANGED

#define DR_N_HAS_CHANGED (   x,
 
)    ((x) & ((dr_changed_t)1 << (n)))

Definition at line 133 of file aarch64-linux-hw-point.h.

Typedef Documentation

◆ dr_changed_t

Definition at line 109 of file aarch64-linux-hw-point.h.

Function Documentation

◆ aarch64_get_debug_reg_state()

struct aarch64_debug_reg_state* aarch64_get_debug_reg_state ( pid_t  pid)

◆ 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_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_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().

Variable Documentation

◆ aarch64_num_bp_regs

int aarch64_num_bp_regs

◆ aarch64_num_wp_regs

int aarch64_num_wp_regs