GDBserver
|
#include "server.h"
#include "linux-low.h"
#include <elf.h>
#include <sys/ptrace.h>
#include <signal.h>
Go to the source code of this file.
Classes | |
struct | arm_linux_hw_breakpoint |
struct | arch_process_info |
struct | arch_lwp_info |
struct | update_registers_data |
Macros | |
#define | PTRACE_GET_THREAD_AREA 22 |
#define | PTRACE_GETWMMXREGS 18 |
#define | PTRACE_SETWMMXREGS 19 |
#define | PTRACE_GETVFPREGS 27 |
#define | PTRACE_SETVFPREGS 28 |
#define | PTRACE_GETHBPREGS 29 |
#define | PTRACE_SETHBPREGS 30 |
#define | MAX_BPTS 32 |
#define | MAX_WPTS 32 |
#define | HWCAP_VFP 64 |
#define | HWCAP_IWMMXT 512 |
#define | HWCAP_NEON 4096 |
#define | HWCAP_VFPv3 8192 |
#define | HWCAP_VFPv3D16 16384 |
#define | arm_num_regs 26 |
#define | arm_breakpoint_len 4 |
Typedefs | |
typedef unsigned int | arm_hwbp_control_t |
Enumerations | |
enum | arm_hwbp_type { arm_hwbp_break = 0, arm_hwbp_load = 1, arm_hwbp_store = 2, arm_hwbp_access = 3 } |
Variables | |
const struct target_desc * | tdesc_arm |
const struct target_desc * | tdesc_arm_with_iwmmxt |
const struct target_desc * | tdesc_arm_with_vfpv2 |
const struct target_desc * | tdesc_arm_with_vfpv3 |
const struct target_desc * | tdesc_arm_with_neon |
struct { | |
unsigned char arch | |
unsigned char max_wp_length | |
unsigned char wp_count | |
unsigned char bp_count | |
} | arm_linux_hwbp_cap |
static unsigned long | arm_hwcap |
static int | arm_regmap [] |
int | debug_threads |
static const unsigned long | arm_breakpoint = 0xef9f0001 |
static const unsigned short | thumb_breakpoint = 0xde01 |
static const unsigned short | thumb2_breakpoint [] = { 0xf7f0, 0xa000 } |
static const unsigned long | arm_eabi_breakpoint = 0xe7f001f0 |
static struct regset_info | arm_regsets [] |
static struct regsets_info | arm_regsets_info |
static struct usrregs_info | arm_usrregs_info |
static struct regs_info | regs_info |
struct linux_target_ops | the_low_target |
#define arm_breakpoint_len 4 |
Definition at line 272 of file linux-arm-low.c.
#define arm_num_regs 26 |
Definition at line 132 of file linux-arm-low.c.
Referenced by arm_cannot_fetch_register(), arm_cannot_store_register(), arm_fill_gregset(), arm_fill_wmmxregset(), arm_store_gregset(), and arm_store_wmmxregset().
#define HWCAP_IWMMXT 512 |
Definition at line 123 of file linux-arm-low.c.
Referenced by arm_fill_wmmxregset(), arm_read_description(), and arm_store_wmmxregset().
#define HWCAP_NEON 4096 |
Definition at line 124 of file linux-arm-low.c.
Referenced by arm_read_description().
#define HWCAP_VFP 64 |
Definition at line 122 of file linux-arm-low.c.
Referenced by arm_fill_vfpregset(), arm_read_description(), and arm_store_vfpregset().
#define HWCAP_VFPv3 8192 |
Definition at line 125 of file linux-arm-low.c.
Referenced by arm_fill_vfpregset(), arm_read_description(), and arm_store_vfpregset().
#define HWCAP_VFPv3D16 16384 |
Definition at line 126 of file linux-arm-low.c.
Referenced by arm_fill_vfpregset(), arm_read_description(), and arm_store_vfpregset().
#define MAX_BPTS 32 |
Definition at line 97 of file linux-arm-low.c.
Referenced by arm_linux_init_hwbp_cap(), arm_new_fork(), and arm_new_thread().
#define MAX_WPTS 32 |
Definition at line 98 of file linux-arm-low.c.
Referenced by arm_linux_init_hwbp_cap(), arm_new_fork(), and arm_new_thread().
#define PTRACE_GET_THREAD_AREA 22 |
Definition at line 47 of file linux-arm-low.c.
Referenced by ps_get_thread_area().
#define PTRACE_GETHBPREGS 29 |
Definition at line 61 of file linux-arm-low.c.
Referenced by arm_linux_init_hwbp_cap().
#define PTRACE_GETVFPREGS 27 |
Definition at line 56 of file linux-arm-low.c.
Referenced by arm_read_description().
#define PTRACE_GETWMMXREGS 18 |
Definition at line 51 of file linux-arm-low.c.
#define PTRACE_SETHBPREGS 30 |
Definition at line 62 of file linux-arm-low.c.
Referenced by arm_prepare_to_resume().
#define PTRACE_SETVFPREGS 28 |
Definition at line 57 of file linux-arm-low.c.
#define PTRACE_SETWMMXREGS 19 |
Definition at line 52 of file linux-arm-low.c.
typedef unsigned int arm_hwbp_control_t |
Definition at line 84 of file linux-arm-low.c.
enum arm_hwbp_type |
Enumerator | |
---|---|
arm_hwbp_break | |
arm_hwbp_load | |
arm_hwbp_store | |
arm_hwbp_access |
Definition at line 75 of file linux-arm-low.c.
|
static |
Definition at line 887 of file linux-arm-low.c.
References arm_read_description(), current_process(), and process_info::tdesc.
|
static |
Definition at line 283 of file linux-arm-low.c.
References arm_breakpoint, arm_eabi_breakpoint, collect_register_by_name(), current_thread, get_thread_regcache(), target_ops::read_memory, the_target, thumb2_breakpoint, and thumb_breakpoint.
|
static |
Definition at line 148 of file linux-arm-low.c.
References arm_num_regs.
|
static |
Definition at line 142 of file linux-arm-low.c.
References arm_num_regs.
|
static |
Definition at line 154 of file linux-arm-low.c.
References arm_num_regs, arm_regmap, and collect_register().
|
static |
Definition at line 212 of file linux-arm-low.c.
References arm_hwcap, collect_register(), collect_register_by_name(), find_regno(), HWCAP_VFP, HWCAP_VFPv3, HWCAP_VFPv3D16, and regcache::tdesc.
|
static |
Definition at line 178 of file linux-arm-low.c.
References arm_hwcap, arm_num_regs, collect_register(), and HWCAP_IWMMXT.
|
static |
Definition at line 816 of file linux-arm-low.c.
References alloca(), offset, target_ops::read_auxv, and the_target.
Referenced by arm_read_description().
Definition at line 254 of file linux-arm-low.c.
References collect_register_by_name(), debug_printf(), and debug_threads.
|
static |
Definition at line 429 of file linux-arm-low.c.
Referenced by arm_remove_point().
|
static |
Definition at line 402 of file linux-arm-low.c.
References arm_hwbp_break, and gdb_assert.
Referenced by arm_linux_hw_point_initialize().
|
static |
Definition at line 415 of file linux-arm-low.c.
Referenced by arm_insert_point(), and arm_prepare_to_resume().
|
static |
Definition at line 422 of file linux-arm-low.c.
Referenced by arm_prepare_to_resume().
|
static |
Definition at line 576 of file linux-arm-low.c.
References all_threads, process_info_private::arch_private, arm_hwbp_control_is_enabled(), arm_linux_get_hw_breakpoint_count(), arm_linux_get_hw_watchpoint_count(), arm_linux_hw_point_initialize(), arch_process_info::bpts, arm_linux_hw_breakpoint::control, current_process(), find_inferior(), update_registers_data::i, process_info::priv, update_registers_callback(), update_registers_data::watch, and arch_process_info::wpts.
|
static |
Definition at line 378 of file linux-arm-low.c.
References arm_linux_hwbp_cap.
Referenced by arm_insert_point(), arm_prepare_to_resume(), and arm_remove_point().
|
static |
Definition at line 385 of file linux-arm-low.c.
References arm_linux_hwbp_cap.
Referenced by arm_insert_point(), arm_prepare_to_resume(), arm_remove_point(), and arm_stopped_by_watchpoint().
|
static |
Definition at line 392 of file linux-arm-low.c.
References arm_linux_hwbp_cap.
Referenced by arm_linux_hw_point_initialize().
|
static |
Definition at line 436 of file linux-arm-low.c.
References arm_linux_hw_breakpoint::address, and arm_linux_hw_breakpoint::control.
Referenced by arm_remove_point().
|
static |
Definition at line 468 of file linux-arm-low.c.
References arm_linux_hw_breakpoint::address, arm_hwbp_break, arm_hwbp_control_initialize(), arm_linux_get_hw_watchpoint_max_length(), arm_linux_hw_breakpoint::control, max_wp_length, and raw_bkpt_type_to_arm_hwbp_type().
Referenced by arm_insert_point(), and arm_remove_point().
|
static |
Definition at line 355 of file linux-arm-low.c.
References arm_linux_hwbp_cap, internal_error(), MAX_BPTS, MAX_WPTS, and PTRACE_GETHBPREGS.
Referenced by arm_read_description().
|
static |
Definition at line 721 of file linux-arm-low.c.
References process_info_private::arch_private, lwp_info::arch_private, arch_lwp_info::bpts_changed, find_lwp_pid(), gdb_assert, MAX_BPTS, MAX_WPTS, process_info::priv, ptid_of, and arch_lwp_info::wpts_changed.
|
static |
Definition at line 699 of file linux-arm-low.c.
References xcalloc().
|
static |
Definition at line 707 of file linux-arm-low.c.
References lwp_info::arch_private, arch_lwp_info::bpts_changed, MAX_BPTS, MAX_WPTS, arch_lwp_info::wpts_changed, and xcalloc().
|
static |
Definition at line 764 of file linux-arm-low.c.
References arm_linux_hw_breakpoint::address, process_info_private::arch_private, lwp_info::arch_private, arm_hwbp_control_is_enabled(), arm_hwbp_control_is_initialized(), arm_linux_get_hw_breakpoint_count(), arm_linux_get_hw_watchpoint_count(), arch_process_info::bpts, arch_lwp_info::bpts_changed, arm_linux_hw_breakpoint::control, errno, find_process_pid(), get_lwp_thread, lwpid_of, perror_with_name(), pid_of, process_info::priv, PTRACE_SETHBPREGS, PTRACE_TYPE_ARG3, arch_process_info::wpts, and arch_lwp_info::wpts_changed.
|
static |
Definition at line 838 of file linux-arm-low.c.
References arm_get_hwcap(), arm_hwcap, arm_linux_init_hwbp_cap(), current_thread, errno, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFP, HWCAP_VFPv3, HWCAP_VFPv3D16, lwpid_of, PTRACE_GETVFPREGS, tdesc_arm, tdesc_arm_with_iwmmxt, tdesc_arm_with_neon, tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, and xmalloc().
Referenced by arm_arch_setup().
|
static |
Definition at line 926 of file linux-arm-low.c.
References regs_info.
|
static |
Definition at line 326 of file linux-arm-low.c.
References collect_register_by_name(), current_thread, and get_thread_regcache().
|
static |
Definition at line 616 of file linux-arm-low.c.
References all_threads, process_info_private::arch_private, arm_hwbp_control_disable(), arm_linux_get_hw_breakpoint_count(), arm_linux_get_hw_watchpoint_count(), arm_linux_hw_breakpoint_equal(), arm_linux_hw_point_initialize(), arch_process_info::bpts, arm_linux_hw_breakpoint::control, current_process(), find_inferior(), update_registers_data::i, process_info::priv, update_registers_callback(), update_registers_data::watch, and arch_process_info::wpts.
Definition at line 264 of file linux-arm-low.c.
References supply_register_by_name().
|
static |
Definition at line 656 of file linux-arm-low.c.
References lwp_info::arch_private, arm_linux_get_hw_watchpoint_count(), current_thread, errno, get_thread_lwp, lwpid_of, PTRACE_GETSIGINFO, and arch_lwp_info::stopped_data_address.
|
static |
Definition at line 691 of file linux-arm-low.c.
References lwp_info::arch_private, current_thread, get_thread_lwp, and arch_lwp_info::stopped_data_address.
|
static |
Definition at line 164 of file linux-arm-low.c.
References arm_num_regs, arm_regmap, and supply_register().
|
static |
Definition at line 232 of file linux-arm-low.c.
References arm_hwcap, find_regno(), HWCAP_VFP, HWCAP_VFPv3, HWCAP_VFPv3D16, supply_register(), supply_register_by_name(), and regcache::tdesc.
|
static |
Definition at line 195 of file linux-arm-low.c.
References arm_hwcap, arm_num_regs, HWCAP_IWMMXT, and supply_register().
|
static |
Definition at line 559 of file linux-arm-low.c.
References Z_PACKET_ACCESS_WP, Z_PACKET_HW_BP, Z_PACKET_READ_WP, and Z_PACKET_WRITE_WP.
void init_registers_arm | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_arm_with_iwmmxt | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_arm_with_neon | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_arm_with_vfpv2 | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_arm_with_vfpv3 | ( | void | ) |
Referenced by initialize_low_arch().
void initialize_low_arch | ( | void | ) |
Definition at line 969 of file linux-arm-low.c.
References arm_regsets_info, init_registers_arm(), init_registers_arm_with_iwmmxt(), init_registers_arm_with_neon(), init_registers_arm_with_vfpv2(), and init_registers_arm_with_vfpv3().
ps_err_e ps_get_thread_area | ( | const struct ps_prochandle * | ph, |
lwpid_t | lwpid, | ||
int | idx, | ||
void ** | base | ||
) |
Definition at line 337 of file linux-arm-low.c.
References PS_ERR, PS_OK, and PTRACE_GET_THREAD_AREA.
|
static |
Definition at line 445 of file linux-arm-low.c.
References arm_hwbp_access, arm_hwbp_break, arm_hwbp_load, arm_hwbp_store, gdb_assert_not_reached, raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_read_wp, and raw_bkpt_type_write_wp.
Referenced by arm_linux_hw_point_initialize().
|
static |
Definition at line 533 of file linux-arm-low.c.
References lwp_info::arch_private, arch_lwp_info::bpts_changed, current_thread, get_thread_lwp, update_registers_data::i, linux_stop_lwp(), pid_of, lwp_info::stopped, update_registers_data::watch, and arch_lwp_info::wpts_changed.
Referenced by arm_insert_point(), and arm_remove_point().
unsigned char arch |
Definition at line 68 of file linux-arm-low.c.
|
static |
Definition at line 271 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
|
static |
Definition at line 280 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
|
static |
Definition at line 119 of file linux-arm-low.c.
Referenced by arm_fill_vfpregset(), arm_fill_wmmxregset(), arm_read_description(), arm_store_vfpregset(), and arm_store_wmmxregset().
struct { ... } arm_linux_hwbp_cap |
|
static |
Definition at line 134 of file linux-arm-low.c.
Referenced by arm_fill_gregset(), and arm_store_gregset().
|
static |
Definition at line 892 of file linux-arm-low.c.
|
static |
Definition at line 905 of file linux-arm-low.c.
Referenced by initialize_low_arch().
|
static |
Definition at line 912 of file linux-arm-low.c.
unsigned char bp_count |
Definition at line 71 of file linux-arm-low.c.
int debug_threads |
Definition at line 24 of file debug.c.
Referenced by arm_get_pc().
unsigned char max_wp_length |
Definition at line 69 of file linux-arm-low.c.
Referenced by arm_linux_hw_point_initialize().
Definition at line 918 of file linux-arm-low.c.
Referenced by arm_regs_info().
const struct target_desc* tdesc_arm |
Referenced by arm_read_description().
const struct target_desc* tdesc_arm_with_iwmmxt |
Referenced by arm_read_description().
const struct target_desc* tdesc_arm_with_neon |
Referenced by arm_read_description().
const struct target_desc* tdesc_arm_with_vfpv2 |
Referenced by arm_read_description().
const struct target_desc* tdesc_arm_with_vfpv3 |
Referenced by arm_read_description().
struct linux_target_ops the_low_target |
Definition at line 931 of file linux-arm-low.c.
|
static |
Definition at line 274 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
|
static |
Definition at line 273 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
unsigned char wp_count |
Definition at line 70 of file linux-arm-low.c.