GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Typedefs | Enumerations | Functions | Variables
arm-linux-nat.c File Reference
#include "defs.h"
#include "inferior.h"
#include "gdbcore.h"
#include "regcache.h"
#include "target.h"
#include "linux-nat.h"
#include "target-descriptions.h"
#include "auxv.h"
#include "observable.h"
#include "gdbthread.h"
#include "aarch32-tdep.h"
#include "arm-tdep.h"
#include "arm-linux-tdep.h"
#include "aarch32-linux-nat.h"
#include <elf/common.h>
#include <sys/user.h>
#include "nat/gdb_ptrace.h"
#include <sys/utsname.h>
#include <sys/procfs.h>
#include "nat/linux-ptrace.h"
#include "linux-tdep.h"
#include "gregset.h"
#include "gdb_proc_service.h"

Go to the source code of this file.

Classes

class  arm_linux_nat_target
 
struct  arm_linux_hwbp_cap
 
struct  arm_linux_hw_breakpoint
 
struct  arm_linux_debug_reg_state
 
struct  arm_linux_process_info
 
struct  arch_lwp_info
 

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   16
 
#define MAX_WPTS   16
 

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 }
 

Functions

static void fetch_fpregs (struct regcache *regcache)
 
static void store_fpregs (const struct regcache *regcache)
 
static void fetch_regs (struct regcache *regcache)
 
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)
 
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 (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
 
static const 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 struct arm_linux_process_infoarm_linux_find_process_pid (pid_t pid)
 
static struct arm_linux_process_infoarm_linux_add_process (pid_t pid)
 
static struct arm_linux_process_infoarm_linux_process_info_get (pid_t pid)
 
static struct arm_linux_debug_reg_statearm_linux_get_debug_reg_state (pid_t pid)
 
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 (enum target_hw_bp_type type)
 
static void arm_linux_hw_watchpoint_initialize (CORE_ADDR addr, int len, enum target_hw_bp_type type, 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 int update_registers_callback (struct lwp_info *lwp, int watch, int index)
 
static void arm_linux_insert_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, int watchpoint)
 
static void arm_linux_remove_hw_breakpoint1 (const struct arm_linux_hw_breakpoint *bpt, int watchpoint)
 
void _initialize_arm_linux_nat ()
 

Variables

static arm_linux_nat_target the_arm_linux_nat_target
 
static struct arm_linux_process_infoarm_linux_process_list = NULL
 

Macro Definition Documentation

◆ MAX_BPTS

#define MAX_BPTS   16

◆ MAX_WPTS

#define MAX_WPTS   16

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

Referenced by arm_linux_get_hwbp_cap().

◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA   22

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

Referenced by ps_get_thread_area().

◆ PTRACE_GETHBPREGS

#define PTRACE_GETHBPREGS   29

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

Referenced by arm_linux_get_hwbp_cap().

◆ PTRACE_GETVFPREGS

#define PTRACE_GETVFPREGS   27

◆ PTRACE_GETWMMXREGS

#define PTRACE_GETWMMXREGS   18

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

Referenced by fetch_wmmx_regs(), and store_wmmx_regs().

◆ PTRACE_SETHBPREGS

#define PTRACE_SETHBPREGS   30

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

Referenced by arm_linux_nat_target::low_prepare_to_resume().

◆ PTRACE_SETVFPREGS

#define PTRACE_SETVFPREGS   28

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

Referenced by store_vfp_regs().

◆ PTRACE_SETWMMXREGS

#define PTRACE_SETWMMXREGS   19

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

Referenced by store_wmmx_regs().

Typedef Documentation

◆ arm_hwbp_control_t

typedef unsigned int arm_hwbp_control_t

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

Enumeration Type Documentation

◆ arm_hwbp_type

Enumerator
arm_hwbp_break 
arm_hwbp_load 
arm_hwbp_store 
arm_hwbp_access 

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

Function Documentation

◆ _initialize_arm_linux_nat()

void _initialize_arm_linux_nat ( )

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

References add_inf_child_target(), linux_target, and the_arm_linux_nat_target.

◆ arm_hwbp_control_disable()

static arm_hwbp_control_t arm_hwbp_control_disable ( arm_hwbp_control_t control)
static

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

Referenced by arm_linux_remove_hw_breakpoint1().

◆ arm_hwbp_control_initialize()

static arm_hwbp_control_t arm_hwbp_control_initialize ( unsigned byte_address_select,
arm_hwbp_type hwbp_type,
int enable )
static

◆ arm_hwbp_control_is_enabled()

static int arm_hwbp_control_is_enabled ( arm_hwbp_control_t control)
static

◆ arm_linux_add_process()

static struct arm_linux_process_info * arm_linux_add_process ( pid_t pid)
static

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

References arm_linux_process_list, proc::next, and pid.

Referenced by arm_linux_process_info_get().

◆ arm_linux_find_process_pid()

static struct arm_linux_process_info * arm_linux_find_process_pid ( pid_t pid)
static

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

References arm_linux_process_list, proc::next, and pid.

Referenced by arm_linux_process_info_get().

◆ arm_linux_get_debug_reg_state()

static struct arm_linux_debug_reg_state * arm_linux_get_debug_reg_state ( pid_t pid)
static

◆ arm_linux_get_hw_breakpoint_count()

static int arm_linux_get_hw_breakpoint_count ( void )
static

◆ arm_linux_get_hw_watchpoint_count()

static int arm_linux_get_hw_watchpoint_count ( void )
static

◆ arm_linux_get_hwbp_cap()

static const struct arm_linux_hwbp_cap * arm_linux_get_hwbp_cap ( void )
static

◆ arm_linux_get_hwbp_type()

static arm_hwbp_type arm_linux_get_hwbp_type ( enum target_hw_bp_type type)
static

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

References arm_hwbp_access, arm_hwbp_load, and arm_hwbp_store.

Referenced by arm_linux_hw_watchpoint_initialize().

◆ arm_linux_hw_breakpoint_equal()

static int arm_linux_hw_breakpoint_equal ( const struct arm_linux_hw_breakpoint * p1,
const struct arm_linux_hw_breakpoint * p2 )
static

◆ arm_linux_hw_breakpoint_initialize()

static void arm_linux_hw_breakpoint_initialize ( struct gdbarch * gdbarch,
struct bp_target_info * bp_tgt,
struct arm_linux_hw_breakpoint * p )
static

◆ arm_linux_hw_watchpoint_initialize()

static void arm_linux_hw_watchpoint_initialize ( CORE_ADDR addr,
int len,
enum target_hw_bp_type type,
struct arm_linux_hw_breakpoint * p )
static

◆ arm_linux_insert_hw_breakpoint1()

static void arm_linux_insert_hw_breakpoint1 ( const struct arm_linux_hw_breakpoint * bpt,
int watchpoint )
static

◆ arm_linux_process_info_get()

static struct arm_linux_process_info * arm_linux_process_info_get ( pid_t pid)
static

◆ arm_linux_remove_hw_breakpoint1()

static void arm_linux_remove_hw_breakpoint1 ( const struct arm_linux_hw_breakpoint * bpt,
int watchpoint )
static

◆ fetch_fpregs()

static void fetch_fpregs ( struct regcache * regcache)
static

◆ fetch_regs()

static void fetch_regs ( struct regcache * regcache)
static

◆ fetch_vfp_regs()

static void fetch_vfp_regs ( struct regcache * regcache)
static

◆ fetch_wmmx_regs()

static void fetch_wmmx_regs ( struct regcache * regcache)
static

◆ fill_fpregset()

void fill_fpregset ( const struct regcache * regcache,
gdb_fpregset_t * fpregsetp,
int regno )

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

References arm_linux_collect_nwfpe().

◆ fill_gregset()

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

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

References arm_linux_collect_gregset().

◆ ps_get_thread_area()

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

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

References ptrace, and PTRACE_GET_THREAD_AREA.

◆ store_fpregs()

static void store_fpregs ( const struct regcache * regcache)
static

◆ store_regs()

static void store_regs ( const struct regcache * regcache)
static

◆ store_vfp_regs()

static void store_vfp_regs ( const struct regcache * regcache)
static

◆ store_wmmx_regs()

static void store_wmmx_regs ( const struct regcache * regcache)
static

◆ supply_fpregset()

void supply_fpregset ( struct regcache * regcache,
const gdb_fpregset_t * fpregsetp )

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

References arm_linux_supply_nwfpe().

◆ supply_gregset()

void supply_gregset ( struct regcache * regcache,
const gdb_gregset_t * gregsetp )

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

References arm_linux_supply_gregset().

◆ update_registers_callback()

static int update_registers_callback ( struct lwp_info * lwp,
int watch,
int index )
static

Variable Documentation

◆ arm_linux_process_list

struct arm_linux_process_info* arm_linux_process_list = NULL
static

◆ the_arm_linux_nat_target

arm_linux_nat_target the_arm_linux_nat_target
static

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

Referenced by _initialize_arm_linux_nat().