GDBserver
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/gdbserver/linux-mips-low.c File Reference
#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.

Classes

union  mips_register
struct  arch_process_info
struct  arch_lwp_info

Defines

#define PTRACE_GET_THREAD_AREA   25
#define mips_num_regs   73
#define mips_dsp_num_regs   80
#define DSP_BASE   71
#define DSP_CONTROL   77
#define mips_base_regs
#define mips_dsp_regs
#define mips_breakpoint_len   4

Functions

void init_registers_mips_linux (void)
void init_registers_mips_dsp_linux (void)
void init_registers_mips64_linux (void)
void init_registers_mips64_dsp_linux (void)
static struct target_descmips_read_description (void)
static void mips_arch_setup (void)
static struct usrregs_infoget_usrregs_info (void)
static int mips_cannot_fetch_register (int regno)
static int mips_cannot_store_register (int regno)
static CORE_ADDR mips_get_pc (struct regcache *regcache)
static void mips_set_pc (struct regcache *regcache, CORE_ADDR pc)
static CORE_ADDR mips_reinsert_addr (void)
static int mips_breakpoint_at (CORE_ADDR where)
static int update_watch_registers_callback (struct inferior_list_entry *entry, void *pid_p)
static struct arch_process_infomips_linux_new_process (void)
static struct arch_lwp_infomips_linux_new_thread (void)
static void mips_linux_prepare_to_resume (struct lwp_info *lwp)
static enum target_hw_bp_type rsp_bp_type_to_target_hw_bp_type (char type)
static int mips_insert_point (char type, CORE_ADDR addr, int len)
static int mips_remove_point (char type, CORE_ADDR addr, int len)
static int mips_stopped_by_watchpoint (void)
static CORE_ADDR mips_stopped_data_address (void)
ps_err_e ps_get_thread_area (const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static struct regs_infomips_regs_info (void)
void initialize_low_arch (void)

Variables

struct target_desctdesc_mips_linux
struct target_desctdesc_mips_dsp_linux
struct target_desctdesc_mips64_linux
struct target_desctdesc_mips64_dsp_linux
static int mips_regmap [mips_num_regs]
static int mips_dsp_regmap [mips_dsp_num_regs]
static unsigned char mips_dsp_regset_bitmap [(mips_dsp_num_regs+7)/8]
static int have_dsp = -1
static const unsigned int mips_breakpoint = 0x0005000d
static struct regset_info mips_regsets []
static struct regsets_info mips_regsets_info
static struct usrregs_info mips_dsp_usrregs_info
static struct usrregs_info mips_usrregs_info
static struct regs_info dsp_regs_info
static struct regs_info regs_info
struct linux_target_ops the_low_target

Define Documentation

#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
Value:
-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
Value:
DSP_BASE,      DSP_BASE + 1,  DSP_BASE + 2,  DSP_BASE + 3,              \
  DSP_BASE + 4,  DSP_BASE + 5,                                          \
  DSP_CONTROL

Definition at line 96 of file linux-mips-low.c.

#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().


Function Documentation

static struct usrregs_info* get_usrregs_info ( void  ) [static, read]

Referenced by initialize_low_arch().

void init_registers_mips64_linux ( void  )

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

void init_registers_mips_linux ( void  )

Referenced by initialize_low_arch().

void initialize_low_arch ( void  )
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]
static int mips_cannot_store_register ( int  regno) [static]
static CORE_ADDR mips_get_pc ( struct regcache regcache) [static]
static int mips_insert_point ( char  type,
CORE_ADDR  addr,
int  len 
) [static]
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]
static struct target_desc* mips_read_description ( void  ) [static, read]
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]
static int mips_remove_point ( char  type,
CORE_ADDR  addr,
int  len 
) [static]
static void mips_set_pc ( struct regcache regcache,
CORE_ADDR  pc 
) [static]
static int mips_stopped_by_watchpoint ( void  ) [static]
static CORE_ADDR mips_stopped_data_address ( void  ) [static]
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]

Variable Documentation

struct regs_info dsp_regs_info [static]
Initial value:

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

Initial value:

Definition at line 106 of file linux-mips-low.c.

unsigned char mips_dsp_regset_bitmap[(mips_dsp_num_regs+7)/8] [static]
Initial value:
 {
  0xfe, 0xff, 0xff, 0xff, 0xfe, 0xff, 0xff, 0xff, 0xff, 0x80
}

Definition at line 115 of file linux-mips-low.c.

Initial value:

Definition at line 816 of file linux-mips-low.c.

int mips_regmap[mips_num_regs] [static]
Initial value:

Definition at line 101 of file linux-mips-low.c.

struct regset_info mips_regsets[] [static]
Initial value:
 {





 
  { 0, 0, 0, -1, -1, NULL, NULL }
}

Definition at line 799 of file linux-mips-low.c.

struct regsets_info mips_regsets_info [static]
Initial value:
  {
    mips_regsets, 
    0, 
    NULL, 
  }

Definition at line 809 of file linux-mips-low.c.

Initial value:

Definition at line 822 of file linux-mips-low.c.

struct regs_info regs_info [static]
Initial value:

Definition at line 835 of file linux-mips-low.c.

Referenced by mips_regs_info().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines