GDBserver
|
#include "server.h"
#include "linux-low.h"
#include <sys/ptrace.h>
#include <endian.h>
#include "mips-linux-watch.h"
#include "gdb_proc_service.h"
#include <asm/ptrace.h>
Go to the source code of this file.
#define DSP_BASE 71 |
Definition at line 63 of file linux-mips-low.c.
#define DSP_CONTROL 77 |
Definition at line 64 of file linux-mips-low.c.
Referenced by mips_read_description().
#define mips_base_regs |
-1, 1, 2, 3, 4, 5, 6, 7, \ 8, 9, 10, 11, 12, 13, 14, 15, \ 16, 17, 18, 19, 20, 21, 22, 23, \ 24, 25, 26, 27, 28, 29, 30, 31, \ \ -1, MMLO, MMHI, BADVADDR, CAUSE, PC, \ \ FPR_BASE, FPR_BASE + 1, FPR_BASE + 2, FPR_BASE + 3, \ FPR_BASE + 4, FPR_BASE + 5, FPR_BASE + 6, FPR_BASE + 7, \ FPR_BASE + 8, FPR_BASE + 9, FPR_BASE + 10, FPR_BASE + 11, \ FPR_BASE + 12, FPR_BASE + 13, FPR_BASE + 14, FPR_BASE + 15, \ FPR_BASE + 16, FPR_BASE + 17, FPR_BASE + 18, FPR_BASE + 19, \ FPR_BASE + 20, FPR_BASE + 21, FPR_BASE + 22, FPR_BASE + 23, \ FPR_BASE + 24, FPR_BASE + 25, FPR_BASE + 26, FPR_BASE + 27, \ FPR_BASE + 28, FPR_BASE + 29, FPR_BASE + 30, FPR_BASE + 31, \ FPC_CSR, FPC_EIR
Definition at line 78 of file linux-mips-low.c.
#define mips_breakpoint_len 4 |
Definition at line 266 of file linux-mips-low.c.
#define mips_dsp_num_regs 80 |
Definition at line 58 of file linux-mips-low.c.
#define mips_dsp_regs |
#define mips_num_regs 73 |
Definition at line 57 of file linux-mips-low.c.
#define PTRACE_GET_THREAD_AREA 25 |
Definition at line 50 of file linux-mips-low.c.
Referenced by ps_get_thread_area().
static struct usrregs_info* get_usrregs_info | ( | void | ) | [static, read] |
Definition at line 156 of file linux-mips-low.c.
References linux_target_ops::regs_info, the_low_target, and regs_info::usrregs.
Referenced by mips_cannot_fetch_register(), and mips_cannot_store_register().
void init_registers_mips64_dsp_linux | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_mips64_linux | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_mips_dsp_linux | ( | void | ) |
Referenced by initialize_low_arch().
void init_registers_mips_linux | ( | void | ) |
Referenced by initialize_low_arch().
void initialize_low_arch | ( | void | ) |
Definition at line 877 of file linux-mips-low.c.
References init_registers_mips64_dsp_linux(), init_registers_mips64_linux(), init_registers_mips_dsp_linux(), and init_registers_mips_linux().
static void mips_arch_setup | ( | void | ) | [static] |
Definition at line 150 of file linux-mips-low.c.
References current_process(), mips_read_description(), and process_info::tdesc.
static int mips_breakpoint_at | ( | CORE_ADDR | where | ) | [static] |
Definition at line 281 of file linux-mips-low.c.
References mips_breakpoint, target_ops::read_memory, and the_target.
static int mips_cannot_fetch_register | ( | int | regno | ) | [static] |
Definition at line 204 of file linux-mips-low.c.
References current_process(), find_regno(), get_usrregs_info(), and process_info::tdesc.
static int mips_cannot_store_register | ( | int | regno | ) | [static] |
Definition at line 220 of file linux-mips-low.c.
References current_process(), find_regno(), get_usrregs_info(), and process_info::tdesc.
static CORE_ADDR mips_get_pc | ( | struct regcache * | regcache | ) | [static] |
Definition at line 245 of file linux-mips-low.c.
References mips_register::buf, collect_register_by_name(), mips_register::reg32, mips_register::reg64, register_size(), and regcache::tdesc.
static int mips_insert_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 396 of file linux-mips-low.c.
References mips_watchpoint::addr, all_lwps, process_info_private::arch_private, current_inferior, current_process(), find_inferior(), get_thread_lwp, mips_watchpoint::len, lwpid_of, mips_linux_read_watch_registers(), mips_linux_watch_populate_regs(), mips_linux_watch_try_one_watch(), mips_linux_watch_type_to_irw(), mips_watchpoint::next, pid_of, process_info::private, rsp_bp_type_to_target_hw_bp_type(), mips_watchpoint::type, update_watch_registers_callback(), and xmalloc().
static struct arch_process_info* mips_linux_new_process | ( | void | ) | [static, read] |
Definition at line 324 of file linux-mips-low.c.
References xcalloc().
static struct arch_lwp_info* mips_linux_new_thread | ( | void | ) | [static, read] |
Definition at line 336 of file linux-mips-low.c.
References arch_lwp_info::watch_registers_changed, and xcalloc().
static void mips_linux_prepare_to_resume | ( | struct lwp_info * | lwp | ) | [static] |
Definition at line 350 of file linux-mips-low.c.
References process_info_private::arch_private, lwp_info::arch_private, find_process_pid(), mips_linux_watch_get_num_valid(), perror_with_name(), process_info::private, ptid_get_lwp(), ptid_get_pid(), ptid_of, and arch_lwp_info::watch_registers_changed.
static struct target_desc* mips_read_description | ( | void | ) | [static, read] |
Definition at line 125 of file linux-mips-low.c.
References current_inferior, DSP_CONTROL, errno, get_thread_lwp, have_dsp, lwpid_of, and perror_with_name().
Referenced by mips_arch_setup().
static struct regs_info* mips_regs_info | ( | void | ) | [static, read] |
Definition at line 843 of file linux-mips-low.c.
References dsp_regs_info, have_dsp, and regs_info.
static CORE_ADDR mips_reinsert_addr | ( | void | ) | [static] |
Definition at line 272 of file linux-mips-low.c.
References mips_register::buf, collect_register_by_name(), current_inferior, get_thread_regcache(), mips_register::reg32, mips_register::reg64, register_size(), and regcache::tdesc.
static int mips_remove_point | ( | char | type, |
CORE_ADDR | addr, | ||
int | len | ||
) | [static] |
Definition at line 466 of file linux-mips-low.c.
References mips_watchpoint::addr, all_lwps, process_info_private::arch_private, current_process(), find_inferior(), gdb_assert, mips_watchpoint::len, mips_linux_watch_populate_regs(), mips_watchpoint::next, pid_of, process_info::private, rsp_bp_type_to_target_hw_bp_type(), mips_watchpoint::type, and update_watch_registers_callback().
static void mips_set_pc | ( | struct regcache * | regcache, |
CORE_ADDR | pc | ||
) | [static] |
Definition at line 253 of file linux-mips-low.c.
References mips_register::buf, mips_register::reg32, mips_register::reg64, register_size(), supply_register_by_name(), and regcache::tdesc.
static int mips_stopped_by_watchpoint | ( | void | ) | [static] |
Definition at line 529 of file linux-mips-low.c.
References process_info_private::arch_private, current_inferior, current_process(), get_thread_lwp, lwpid_of, MAX_DEBUG_REGISTER, mips_linux_read_watch_registers(), mips_linux_watch_get_num_valid(), mips_linux_watch_get_watchhi(), process_info::private, R_MASK, and W_MASK.
static CORE_ADDR mips_stopped_data_address | ( | void | ) | [static] |
Definition at line 557 of file linux-mips-low.c.
References mips_watchpoint::addr, process_info_private::arch_private, current_inferior, current_process(), get_thread_lwp, IRW_MASK, mips_watchpoint::len, lwpid_of, MAX_DEBUG_REGISTER, mips_linux_read_watch_registers(), mips_linux_watch_get_num_valid(), mips_linux_watch_get_watchhi(), mips_linux_watch_get_watchlo(), mips_linux_watch_type_to_irw(), mips_watchpoint::next, process_info::private, R_MASK, mips_watchpoint::type, and W_MASK.
ps_err_e ps_get_thread_area | ( | const struct ps_prochandle * | ph, |
lwpid_t | lwpid, | ||
int | idx, | ||
void ** | base | ||
) |
Definition at line 618 of file linux-mips-low.c.
References PS_ERR, PS_OK, and PTRACE_GET_THREAD_AREA.
static enum target_hw_bp_type rsp_bp_type_to_target_hw_bp_type | ( | char | type | ) | [static] |
Definition at line 377 of file linux-mips-low.c.
References gdb_assert_not_reached, hw_access, hw_read, and hw_write.
Referenced by mips_insert_point(), and mips_remove_point().
static int update_watch_registers_callback | ( | struct inferior_list_entry * | entry, |
void * | pid_p | ||
) | [static] |
Definition at line 298 of file linux-mips-low.c.
References lwp_info::arch_private, linux_stop_lwp(), pid_of, lwp_info::stopped, and arch_lwp_info::watch_registers_changed.
Referenced by mips_insert_point(), and mips_remove_point().
struct regs_info dsp_regs_info [static] |
Definition at line 828 of file linux-mips-low.c.
Referenced by mips_regs_info().
int have_dsp = -1 [static] |
Definition at line 119 of file linux-mips-low.c.
Referenced by mips_read_description(), and mips_regs_info().
const unsigned int mips_breakpoint = 0x0005000d [static] |
Definition at line 265 of file linux-mips-low.c.
Referenced by mips_breakpoint_at().
int mips_dsp_regmap[mips_dsp_num_regs] [static] |
{ mips_base_regs, mips_dsp_regs, 0 }
Definition at line 106 of file linux-mips-low.c.
unsigned char mips_dsp_regset_bitmap[(mips_dsp_num_regs+7)/8] [static] |
{ 0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x80 }
Definition at line 115 of file linux-mips-low.c.
struct usrregs_info mips_dsp_usrregs_info [static] |
Definition at line 816 of file linux-mips-low.c.
int mips_regmap[mips_num_regs] [static] |
{ mips_base_regs, 0 }
Definition at line 101 of file linux-mips-low.c.
struct regset_info mips_regsets[] [static] |
{ { 0, 0, 0, -1, -1, NULL, NULL } }
Definition at line 799 of file linux-mips-low.c.
struct regsets_info mips_regsets_info [static] |
{ mips_regsets, 0, NULL, }
Definition at line 809 of file linux-mips-low.c.
struct usrregs_info mips_usrregs_info [static] |
{ mips_num_regs, mips_regmap, }
Definition at line 822 of file linux-mips-low.c.
{ NULL, &mips_usrregs_info, &mips_regsets_info }
Definition at line 835 of file linux-mips-low.c.
Referenced by mips_regs_info().
struct target_desc* tdesc_mips64_dsp_linux |
struct target_desc* tdesc_mips64_linux |
struct target_desc* tdesc_mips_dsp_linux |
struct target_desc* tdesc_mips_linux |
struct linux_target_ops the_low_target |
{ mips_arch_setup, mips_regs_info, mips_cannot_fetch_register, mips_cannot_store_register, NULL, mips_get_pc, mips_set_pc, (const unsigned char *) &mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr, 0, mips_breakpoint_at, mips_insert_point, mips_remove_point, mips_stopped_by_watchpoint, mips_stopped_data_address, NULL, NULL, NULL, mips_linux_new_process, mips_linux_new_thread, mips_linux_prepare_to_resume }
Definition at line 851 of file linux-mips-low.c.