|
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.
| #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(), 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(), 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 |
Definition at line 75 of file linux-arm-low.c.
| static void arm_arch_setup | ( | void | ) | [static] |
Definition at line 830 of file linux-arm-low.c.
References arm_read_description(), current_process(), and process_info::tdesc.
| static int arm_breakpoint_at | ( | CORE_ADDR | where | ) | [static] |
Definition at line 283 of file linux-arm-low.c.
References arm_breakpoint, arm_eabi_breakpoint, collect_register_by_name(), current_inferior, get_thread_regcache(), target_ops::read_memory, the_target, thumb2_breakpoint, and thumb_breakpoint.
| static int arm_cannot_fetch_register | ( | int | regno | ) | [static] |
Definition at line 148 of file linux-arm-low.c.
References arm_num_regs.
| static int arm_cannot_store_register | ( | int | regno | ) | [static] |
Definition at line 142 of file linux-arm-low.c.
References arm_num_regs.
| static void arm_fill_gregset | ( | struct regcache * | regcache, |
| void * | buf | ||
| ) | [static] |
Definition at line 154 of file linux-arm-low.c.
References arm_num_regs, arm_regmap, and collect_register().
| static void arm_fill_vfpregset | ( | struct regcache * | regcache, |
| void * | buf | ||
| ) | [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 void arm_fill_wmmxregset | ( | struct regcache * | regcache, |
| void * | buf | ||
| ) | [static] |
Definition at line 178 of file linux-arm-low.c.
References arm_hwcap, arm_num_regs, collect_register(), and HWCAP_IWMMXT.
| static int arm_get_hwcap | ( | unsigned long * | valp | ) | [static] |
Definition at line 759 of file linux-arm-low.c.
References offset, target_ops::read_auxv, and the_target.
Referenced by arm_read_description().
| static CORE_ADDR arm_get_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 254 of file linux-arm-low.c.
References collect_register_by_name(), and debug_threads.
| static arm_hwbp_control_t arm_hwbp_control_disable | ( | arm_hwbp_control_t | control | ) | [static] |
Definition at line 429 of file linux-arm-low.c.
Referenced by arm_remove_point().
| static arm_hwbp_control_t arm_hwbp_control_initialize | ( | unsigned | byte_address_select, |
| arm_hwbp_type | hwbp_type, | ||
| int | enable | ||
| ) | [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 int arm_hwbp_control_is_enabled | ( | arm_hwbp_control_t | control | ) | [static] |
Definition at line 415 of file linux-arm-low.c.
Referenced by arm_insert_point(), and arm_prepare_to_resume().
| static int arm_hwbp_control_is_initialized | ( | arm_hwbp_control_t | control | ) | [static] |
Definition at line 422 of file linux-arm-low.c.
Referenced by arm_prepare_to_resume().
| static int arm_insert_point | ( | char | type, |
| CORE_ADDR | addr, | ||
| int | len | ||
| ) | [static] |
Definition at line 563 of file linux-arm-low.c.
References all_lwps, 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::private, update_registers_callback(), update_registers_data::watch, and arch_process_info::wpts.
| static int arm_linux_get_hw_breakpoint_count | ( | void | ) | [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 int arm_linux_get_hw_watchpoint_count | ( | void | ) | [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 int arm_linux_get_hw_watchpoint_max_length | ( | void | ) | [static] |
Definition at line 392 of file linux-arm-low.c.
References arm_linux_hwbp_cap.
Referenced by arm_linux_hw_point_initialize().
| static int arm_linux_hw_breakpoint_equal | ( | const struct arm_linux_hw_breakpoint * | p1, |
| const struct arm_linux_hw_breakpoint * | p2 | ||
| ) | [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 int arm_linux_hw_point_initialize | ( | char | type, |
| CORE_ADDR | addr, | ||
| int | len, | ||
| struct arm_linux_hw_breakpoint * | p | ||
| ) | [static] |
Definition at line 448 of file linux-arm-low.c.
References arm_linux_hw_breakpoint::address, arm_hwbp_access, arm_hwbp_break, arm_hwbp_control_initialize(), arm_hwbp_load, arm_hwbp_store, arm_linux_get_hw_watchpoint_max_length(), arm_linux_hw_breakpoint::control, and max_wp_length.
Referenced by arm_insert_point(), and arm_remove_point().
| static void arm_linux_init_hwbp_cap | ( | int | pid | ) | [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 struct arch_process_info* arm_new_process | ( | void | ) | [static, read] |
Definition at line 684 of file linux-arm-low.c.
References xcalloc().
| static struct arch_lwp_info* arm_new_thread | ( | void | ) | [static, read] |
Definition at line 692 of file linux-arm-low.c.
References arch_lwp_info::bpts_changed, MAX_BPTS, MAX_WPTS, arch_lwp_info::wpts_changed, and xcalloc().
| static void arm_prepare_to_resume | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 708 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(), lwpid_of, perror_with_name(), pid_of, process_info::private, PTRACE_SETHBPREGS, PTRACE_TYPE_ARG3, arch_process_info::wpts, and arch_lwp_info::wpts_changed.
| static struct target_desc* arm_read_description | ( | void | ) | [static, read] |
Definition at line 781 of file linux-arm-low.c.
References arm_get_hwcap(), arm_hwcap, arm_linux_init_hwbp_cap(), current_inferior, errno, get_thread_lwp, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFP, HWCAP_VFPv3, HWCAP_VFPv3D16, lwpid_of, PTRACE_GETVFPREGS, and xmalloc().
Referenced by arm_arch_setup().
| static struct regs_info* arm_regs_info | ( | void | ) | [static, read] |
Definition at line 869 of file linux-arm-low.c.
References regs_info.
| static CORE_ADDR arm_reinsert_addr | ( | void | ) | [static] |
Definition at line 326 of file linux-arm-low.c.
References collect_register_by_name(), current_inferior, and get_thread_regcache().
| static int arm_remove_point | ( | char | type, |
| CORE_ADDR | addr, | ||
| int | len | ||
| ) | [static] |
Definition at line 602 of file linux-arm-low.c.
References all_lwps, 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::private, update_registers_callback(), update_registers_data::watch, and arch_process_info::wpts.
| static void arm_set_pc | ( | struct regcache * | regcache, |
| CORE_ADDR | pc | ||
| ) | [static] |
Definition at line 264 of file linux-arm-low.c.
References supply_register_by_name().
| static int arm_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 641 of file linux-arm-low.c.
References lwp_info::arch_private, arm_linux_get_hw_watchpoint_count(), current_inferior, errno, get_thread_lwp, lwpid_of, and arch_lwp_info::stopped_data_address.
| static CORE_ADDR arm_stopped_data_address | ( | void | ) | [static] |
Definition at line 676 of file linux-arm-low.c.
References lwp_info::arch_private, current_inferior, get_thread_lwp, and arch_lwp_info::stopped_data_address.
| static void arm_store_gregset | ( | struct regcache * | regcache, |
| const void * | buf | ||
| ) | [static] |
Definition at line 164 of file linux-arm-low.c.
References arm_num_regs, arm_regmap, memset(), and supply_register().
| static void arm_store_vfpregset | ( | struct regcache * | regcache, |
| const void * | buf | ||
| ) | [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 void arm_store_wmmxregset | ( | struct regcache * | regcache, |
| const void * | buf | ||
| ) | [static] |
Definition at line 195 of file linux-arm-low.c.
References arm_hwcap, arm_num_regs, HWCAP_IWMMXT, and supply_register().
| void init_registers_arm | ( | void | ) |
Referenced by arm_arch_setup(), and 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 910 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 int update_registers_callback | ( | struct inferior_list_entry * | entry, |
| void * | arg | ||
| ) | [static] |
Definition at line 537 of file linux-arm-low.c.
References lwp_info::arch_private, arch_lwp_info::bpts_changed, current_inferior, 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.
const unsigned long arm_breakpoint = 0xef9f0001 [static] |
Definition at line 271 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
const unsigned long arm_eabi_breakpoint = 0xe7f001f0 [static] |
Definition at line 280 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
unsigned long arm_hwcap [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] |
int arm_regmap[] [static] |
{
0, 4, 8, 12, 16, 20, 24, 28,
32, 36, 40, 44, 48, 52, 56, 60,
-1, -1, -1, -1, -1, -1, -1, -1, -1,
64
}
Definition at line 134 of file linux-arm-low.c.
Referenced by arm_fill_gregset(), and arm_store_gregset().
struct regset_info arm_regsets[] [static] |
{
{ PTRACE_GETREGS, PTRACE_SETREGS, 0, 18 * 4,
GENERAL_REGS,
arm_fill_gregset, arm_store_gregset },
{ PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS, 0, 16 * 8 + 6 * 4,
EXTENDED_REGS,
arm_fill_wmmxregset, arm_store_wmmxregset },
{ PTRACE_GETVFPREGS, PTRACE_SETVFPREGS, 0, 32 * 8 + 4,
EXTENDED_REGS,
arm_fill_vfpregset, arm_store_vfpregset },
{ 0, 0, 0, -1, -1, NULL, NULL }
}
Definition at line 835 of file linux-arm-low.c.
struct regsets_info arm_regsets_info [static] |
{
arm_regsets,
0,
NULL,
}
Definition at line 848 of file linux-arm-low.c.
Referenced by initialize_low_arch().
struct usrregs_info arm_usrregs_info [static] |
{
arm_num_regs,
arm_regmap,
}
Definition at line 855 of file linux-arm-low.c.
| unsigned char bp_count |
Definition at line 71 of file linux-arm-low.c.
| int debug_threads |
| unsigned char max_wp_length |
Definition at line 69 of file linux-arm-low.c.
Referenced by arm_linux_hw_point_initialize().
{
NULL,
&arm_usrregs_info,
&arm_regsets_info
}
Definition at line 861 of file linux-arm-low.c.
Referenced by arm_regs_info().
| struct target_desc* tdesc_arm |
| struct target_desc* tdesc_arm_with_iwmmxt |
| struct target_desc* tdesc_arm_with_neon |
| struct target_desc* tdesc_arm_with_vfpv2 |
| struct target_desc* tdesc_arm_with_vfpv3 |
| struct linux_target_ops the_low_target |
{
arm_arch_setup,
arm_regs_info,
arm_cannot_fetch_register,
arm_cannot_store_register,
NULL,
arm_get_pc,
arm_set_pc,
(const unsigned char *) &arm_breakpoint,
arm_breakpoint_len,
arm_reinsert_addr,
0,
arm_breakpoint_at,
arm_insert_point,
arm_remove_point,
arm_stopped_by_watchpoint,
arm_stopped_data_address,
NULL,
NULL,
NULL,
arm_new_process,
arm_new_thread,
arm_prepare_to_resume,
}
Definition at line 874 of file linux-arm-low.c.
const unsigned short thumb2_breakpoint[] = { 0xf7f0, 0xa000 } [static] |
Definition at line 274 of file linux-arm-low.c.
Referenced by arm_breakpoint_at().
const unsigned short thumb_breakpoint = 0xde01 [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.
1.7.6.1