GDB (xrefs)
Classes | Defines | Typedefs | Enumerations | Functions | Variables
/home/stan/gdb/src/gdb/arm-linux-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
#include "gdb_string.h"
#include "regcache.h"
#include "target.h"
#include "linux-nat.h"
#include "target-descriptions.h"
#include "auxv.h"
#include "observer.h"
#include "gdbthread.h"
#include "arm-tdep.h"
#include "arm-linux-tdep.h"
#include <elf/common.h>
#include <sys/user.h>
#include <sys/ptrace.h>
#include <sys/utsname.h>
#include <sys/procfs.h>
#include "gregset.h"
#include "gdb_proc_service.h"

Go to the source code of this file.

Classes

struct  arm_linux_hwbp_cap
struct  arm_linux_hw_breakpoint
struct  arm_linux_thread_points

Defines

#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 GET_THREAD_ID(PTID)   get_thread_id (PTID)
#define IWMMXT_REGS_SIZE   (16 * 8 + 6 * 4)
#define VFP_REGS_SIZE   (32 * 8 + 4)

Typedefs

typedef unsigned int arm_hwbp_control_t
typedef struct
arm_linux_thread_points
arm_linux_thread_points_p

Enumerations

enum  arm_hwbp_type { arm_hwbp_break = 0, arm_hwbp_load = 1, arm_hwbp_store = 2, arm_hwbp_access = 3 }

Functions

static int get_thread_id (ptid_t ptid)
static void fetch_fpregister (struct regcache *regcache, int regno)
static void fetch_fpregs (struct regcache *regcache)
static void store_fpregister (const struct regcache *regcache, int regno)
static void store_fpregs (const struct regcache *regcache)
static void fetch_register (struct regcache *regcache, int regno)
static void fetch_regs (struct regcache *regcache)
static void store_register (const struct regcache *regcache, int regno)
static void store_regs (const struct regcache *regcache)
static void fetch_wmmx_regs (struct regcache *regcache)
static void store_wmmx_regs (const struct regcache *regcache)
static void fetch_vfp_regs (struct regcache *regcache)
static void store_vfp_regs (const struct regcache *regcache)
static void arm_linux_fetch_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
static void arm_linux_store_inferior_registers (struct target_ops *ops, struct regcache *regcache, int regno)
void fill_gregset (const struct regcache *regcache, gdb_gregset_t *gregsetp, int regno)
void supply_gregset (struct regcache *regcache, const gdb_gregset_t *gregsetp)
void fill_fpregset (const struct regcache *regcache, gdb_fpregset_t *fpregsetp, int regno)
void supply_fpregset (struct regcache *regcache, const gdb_fpregset_t *fpregsetp)
ps_err_e ps_get_thread_area (const struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static struct target_descarm_linux_read_description (struct target_ops *ops)
static struct arm_linux_hwbp_caparm_linux_get_hwbp_cap (void)
static int arm_linux_get_hw_breakpoint_count (void)
static int arm_linux_get_hw_watchpoint_count (void)
static int arm_linux_can_use_hw_breakpoint (int type, int cnt, int ot)
 DEF_VEC_P (arm_linux_thread_points_p)
 VEC (arm_linux_thread_points_p)
static arm_hwbp_control_t arm_hwbp_control_initialize (unsigned byte_address_select, arm_hwbp_type hwbp_type, int enable)
static int arm_hwbp_control_is_enabled (arm_hwbp_control_t control)
static arm_hwbp_control_t arm_hwbp_control_disable (arm_hwbp_control_t control)
static void arm_linux_hw_breakpoint_initialize (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt, struct arm_linux_hw_breakpoint *p)
static arm_hwbp_type arm_linux_get_hwbp_type (int rw)
static void arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len, int rw, struct arm_linux_hw_breakpoint *p)
static int arm_linux_hw_breakpoint_equal (const struct arm_linux_hw_breakpoint *p1, const struct arm_linux_hw_breakpoint *p2)
static void arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, int tid, int watchpoint)
static void arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, int tid, int watchpoint)
static int arm_linux_insert_hw_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static int arm_linux_remove_hw_breakpoint (struct gdbarch *gdbarch, struct bp_target_info *bp_tgt)
static int arm_linux_region_ok_for_hw_watchpoint (CORE_ADDR addr, int len)
static int arm_linux_insert_watchpoint (CORE_ADDR addr, int len, int rw, struct expression *cond)
static int arm_linux_remove_watchpoint (CORE_ADDR addr, int len, int rw, struct expression *cond)
static int arm_linux_stopped_data_address (struct target_ops *target, CORE_ADDR *addr_p)
static int arm_linux_stopped_by_watchpoint (void)
static int arm_linux_watchpoint_addr_within_range (struct target_ops *target, CORE_ADDR addr, CORE_ADDR start, int length)
static void arm_linux_new_thread (struct lwp_info *lp)
static void arm_linux_thread_exit (struct thread_info *tp, int silent)
void _initialize_arm_linux_nat (void)

Variables

static int arm_linux_has_wmmx_registers
static int arm_linux_vfp_register_count
int arm_apcs_32

Define Documentation

#define GET_THREAD_ID (   PTID)    get_thread_id (PTID)
#define IWMMXT_REGS_SIZE   (16 * 8 + 6 * 4)

Definition at line 380 of file arm-linux-nat.c.

Referenced by fetch_wmmx_regs(), and store_wmmx_regs().

#define PTRACE_GET_THREAD_AREA   22

Definition at line 47 of file arm-linux-nat.c.

Referenced by ps_get_thread_area().

#define PTRACE_GETHBPREGS   29

Definition at line 61 of file arm-linux-nat.c.

Referenced by arm_linux_get_hwbp_cap().

#define PTRACE_GETVFPREGS   27

Definition at line 56 of file arm-linux-nat.c.

Referenced by arm_linux_read_description(), fetch_vfp_regs(), and store_vfp_regs().

#define PTRACE_GETWMMXREGS   18

Definition at line 51 of file arm-linux-nat.c.

Referenced by fetch_wmmx_regs(), and store_wmmx_regs().

#define PTRACE_SETHBPREGS   30
#define PTRACE_SETVFPREGS   28

Definition at line 57 of file arm-linux-nat.c.

Referenced by store_vfp_regs().

#define PTRACE_SETWMMXREGS   19

Definition at line 52 of file arm-linux-nat.c.

Referenced by store_wmmx_regs().

#define VFP_REGS_SIZE   (32 * 8 + 4)

Definition at line 457 of file arm-linux-nat.c.

Referenced by arm_linux_read_description(), fetch_vfp_regs(), and store_vfp_regs().


Typedef Documentation

typedef unsigned int arm_hwbp_control_t

Definition at line 779 of file arm-linux-nat.c.


Enumeration Type Documentation

Enumerator:
arm_hwbp_break 
arm_hwbp_load 
arm_hwbp_store 
arm_hwbp_access 

Definition at line 770 of file arm-linux-nat.c.


Function Documentation

void _initialize_arm_linux_nat ( void  )

Definition at line 881 of file arm-linux-nat.c.

Referenced by arm_linux_remove_hw_breakpoint1().

static arm_hwbp_control_t arm_hwbp_control_initialize ( unsigned  byte_address_select,
arm_hwbp_type  hwbp_type,
int  enable 
) [static]
static int arm_hwbp_control_is_enabled ( arm_hwbp_control_t  control) [static]

Definition at line 874 of file arm-linux-nat.c.

Referenced by arm_linux_insert_hw_breakpoint1(), and arm_linux_new_thread().

static int arm_linux_can_use_hw_breakpoint ( int  type,
int  cnt,
int  ot 
) [static]
static void arm_linux_fetch_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
) [static]
static int arm_linux_get_hw_breakpoint_count ( void  ) [static]
static int arm_linux_get_hw_watchpoint_count ( void  ) [static]
static struct arm_linux_hwbp_cap* arm_linux_get_hwbp_cap ( void  ) [static, read]
static arm_hwbp_type arm_linux_get_hwbp_type ( int  rw) [static]
static void arm_linux_hw_breakpoint_initialize ( struct gdbarch gdbarch,
struct bp_target_info bp_tgt,
struct arm_linux_hw_breakpoint p 
) [static]
static void arm_linux_hw_watchpoint_initialize ( CORE_ADDR  addr,
int  len,
int  rw,
struct arm_linux_hw_breakpoint p 
) [static]
static int arm_linux_insert_hw_breakpoint ( struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
) [static]
static void arm_linux_insert_hw_breakpoint1 ( const struct arm_linux_hw_breakpoint bpt,
int  tid,
int  watchpoint 
) [static]
static int arm_linux_insert_watchpoint ( CORE_ADDR  addr,
int  len,
int  rw,
struct expression cond 
) [static]
static void arm_linux_new_thread ( struct lwp_info lp) [static]
static struct target_desc* arm_linux_read_description ( struct target_ops ops) [static, read]
static int arm_linux_region_ok_for_hw_watchpoint ( CORE_ADDR  addr,
int  len 
) [static]
static int arm_linux_remove_hw_breakpoint ( struct gdbarch gdbarch,
struct bp_target_info bp_tgt 
) [static]
static void arm_linux_remove_hw_breakpoint1 ( const struct arm_linux_hw_breakpoint bpt,
int  tid,
int  watchpoint 
) [static]
static int arm_linux_remove_watchpoint ( CORE_ADDR  addr,
int  len,
int  rw,
struct expression cond 
) [static]
static int arm_linux_stopped_by_watchpoint ( void  ) [static]

Definition at line 1174 of file arm-linux-nat.c.

References arm_linux_stopped_data_address(), and current_target.

Referenced by _initialize_arm_linux_nat().

static int arm_linux_stopped_data_address ( struct target_ops target,
CORE_ADDR addr_p 
) [static]
static void arm_linux_store_inferior_registers ( struct target_ops ops,
struct regcache regcache,
int  regno 
) [static]
static void arm_linux_thread_exit ( struct thread_info tp,
int  silent 
) [static]
static int arm_linux_watchpoint_addr_within_range ( struct target_ops target,
CORE_ADDR  addr,
CORE_ADDR  start,
int  length 
) [static]

Definition at line 1181 of file arm-linux-nat.c.

Referenced by _initialize_arm_linux_nat().

static void fetch_fpregister ( struct regcache regcache,
int  regno 
) [static]
static void fetch_fpregs ( struct regcache regcache) [static]
static void fetch_register ( struct regcache regcache,
int  regno 
) [static]
static void fetch_regs ( struct regcache regcache) [static]
static void fetch_vfp_regs ( struct regcache regcache) [static]
static void fetch_wmmx_regs ( struct regcache regcache) [static]
void fill_fpregset ( const struct regcache regcache,
gdb_fpregset_t fpregsetp,
int  regno 
)

Definition at line 598 of file arm-linux-nat.c.

References arm_linux_collect_nwfpe().

void fill_gregset ( const struct regcache regcache,
gdb_gregset_t gregsetp,
int  regno 
)

Definition at line 585 of file arm-linux-nat.c.

References arm_linux_collect_gregset().

static int get_thread_id ( ptid_t  ptid) [static]

Definition at line 81 of file arm-linux-nat.c.

References ptid_get_lwp(), and ptid_get_pid().

ps_err_e ps_get_thread_area ( const struct ps_prochandle ph,
lwpid_t  lwpid,
int  idx,
void **  base 
)

Definition at line 616 of file arm-linux-nat.c.

References PS_ERR, PS_OK, ptrace(), and PTRACE_GET_THREAD_AREA.

static void store_fpregister ( const struct regcache regcache,
int  regno 
) [static]
static void store_fpregs ( const struct regcache regcache) [static]
static void store_register ( const struct regcache regcache,
int  regno 
) [static]
static void store_regs ( const struct regcache regcache) [static]
static void store_vfp_regs ( const struct regcache regcache) [static]
static void store_wmmx_regs ( const struct regcache regcache) [static]
void supply_fpregset ( struct regcache regcache,
const gdb_fpregset_t fpregsetp 
)

Definition at line 608 of file arm-linux-nat.c.

References arm_linux_supply_nwfpe().

void supply_gregset ( struct regcache regcache,
const gdb_gregset_t gregsetp 
)

Definition at line 592 of file arm-linux-nat.c.

References arm_linux_supply_gregset().


Variable Documentation

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines