GDB (xrefs)
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
s390-linux-nat.c File Reference
#include "defs.h"
#include "regcache.h"
#include "inferior.h"
#include "target.h"
#include "linux-nat.h"
#include "auxv.h"
#include "gregset.h"
#include "regset.h"
#include "nat/linux-ptrace.h"
#include "gdbcmd.h"
#include "gdbarch.h"
#include "s390-tdep.h"
#include "s390-linux-tdep.h"
#include "elf/common.h"
#include <asm/ptrace.h>
#include "nat/gdb_ptrace.h"
#include <asm/types.h>
#include <sys/procfs.h>
#include <sys/ucontext.h>
#include <elf.h>
#include <algorithm>
#include "inf-ptrace.h"
#include "linux-tdep.h"

Go to the source code of this file.

Classes

struct  arch_lwp_info
 
class  s390_linux_nat_target
 
struct  watch_area
 
struct  s390_debug_reg_state
 
struct  s390_process_info
 

Macros

#define PER_BIT(n)   (1UL << (63 - (n)))
 
#define PER_EVENT_BRANCH   PER_BIT (32)
 
#define PER_EVENT_IFETCH   PER_BIT (33)
 
#define PER_EVENT_STORE   PER_BIT (34)
 
#define PER_EVENT_NULLIFICATION   PER_BIT (39)
 
#define PER_CONTROL_BRANCH_ADDRESS   PER_BIT (40)
 
#define PER_CONTROL_SUSPENSION   PER_BIT (41)
 
#define PER_CONTROL_ALTERATION   PER_BIT (42)
 

Functions

void supply_gregset (struct regcache *regcache, const gregset_t *regp)
 
void fill_gregset (const struct regcache *regcache, gregset_t *regp, int regno)
 
void supply_fpregset (struct regcache *regcache, const fpregset_t *regp)
 
void fill_fpregset (const struct regcache *regcache, fpregset_t *regp, int regno)
 
static int s390_inferior_tid (void)
 
static void fetch_regs (struct regcache *regcache, int tid)
 
static void store_regs (const struct regcache *regcache, int tid, int regnum)
 
static void fetch_fpregs (struct regcache *regcache, int tid)
 
static void store_fpregs (const struct regcache *regcache, int tid, int regnum)
 
static void fetch_regset (struct regcache *regcache, int tid, int regset_id, int regsize, const struct regset *regset)
 
static void store_regset (struct regcache *regcache, int tid, int regset_id, int regsize, const struct regset *regset)
 
static int check_regset (int tid, int regset, int regsize)
 
static struct s390_process_infos390_find_process_pid (pid_t pid)
 
static struct s390_process_infos390_add_process (pid_t pid)
 
static struct s390_process_infos390_process_info_get (pid_t pid)
 
static struct s390_debug_reg_states390_get_debug_reg_state (pid_t pid)
 
static void s390_show_debug_regs (int tid, const char *where)
 
static void s390_mark_per_info_changed (struct lwp_info *lp)
 
static int s390_refresh_per_info_cb (struct lwp_info *lp)
 
static int s390_refresh_per_info (void)
 
static int s390_target_wordsize (void)
 
void _initialize_s390_nat ()
 

Variables

static int have_regset_last_break = 0
 
static int have_regset_system_call = 0
 
static int have_regset_tdb = 0
 
static int have_regset_vxrs = 0
 
static int have_regset_gs = 0
 
static s390_linux_nat_target the_s390_linux_nat_target
 
static struct s390_process_infos390_process_list = NULL
 

Macro Definition Documentation

◆ PER_BIT

#define PER_BIT ( n)    (1UL << (63 - (n)))

Definition at line 104 of file s390-linux-nat.c.

◆ PER_CONTROL_ALTERATION

#define PER_CONTROL_ALTERATION   PER_BIT (42)

Definition at line 111 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ PER_CONTROL_BRANCH_ADDRESS

#define PER_CONTROL_BRANCH_ADDRESS   PER_BIT (40)

Definition at line 109 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ PER_CONTROL_SUSPENSION

#define PER_CONTROL_SUSPENSION   PER_BIT (41)

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

◆ PER_EVENT_BRANCH

#define PER_EVENT_BRANCH   PER_BIT (32)

Definition at line 105 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ PER_EVENT_IFETCH

#define PER_EVENT_IFETCH   PER_BIT (33)

Definition at line 106 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ PER_EVENT_NULLIFICATION

#define PER_EVENT_NULLIFICATION   PER_BIT (39)

Definition at line 108 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

◆ PER_EVENT_STORE

#define PER_EVENT_STORE   PER_BIT (34)

Definition at line 107 of file s390-linux-nat.c.

Referenced by s390_linux_nat_target::low_prepare_to_resume().

Function Documentation

◆ _initialize_s390_nat()

void _initialize_s390_nat ( )

◆ check_regset()

static int check_regset ( int tid,
int regset,
int regsize )
static

Definition at line 393 of file s390-linux-nat.c.

References ptrace, and PTRACE_GETREGSET.

Referenced by s390_linux_nat_target::read_description().

◆ fetch_fpregs()

static void fetch_fpregs ( struct regcache * regcache,
int tid )
static

Definition at line 309 of file s390-linux-nat.c.

References ptrace, and supply_fpregset().

Referenced by s390_linux_nat_target::fetch_registers().

◆ fetch_regs()

static void fetch_regs ( struct regcache * regcache,
int tid )
static

Definition at line 272 of file s390-linux-nat.c.

References ptrace, and supply_gregset().

Referenced by s390_linux_nat_target::fetch_registers().

◆ fetch_regset()

static void fetch_regset ( struct regcache * regcache,
int tid,
int regset_id,
int regsize,
const struct regset * regset )
static

◆ fill_fpregset()

void fill_fpregset ( const struct regcache * regcache,
fpregset_t * regp,
int regno )

Definition at line 251 of file s390-linux-nat.c.

References regcache_collect_regset(), and s390_fpregset.

Referenced by store_fpregs().

◆ fill_gregset()

void fill_gregset ( const struct regcache * regcache,
gregset_t * regp,
int regno )

◆ s390_add_process()

static struct s390_process_info * s390_add_process ( pid_t pid)
static

Definition at line 546 of file s390-linux-nat.c.

References proc::next, pid, and s390_process_list.

Referenced by s390_process_info_get().

◆ s390_find_process_pid()

static struct s390_process_info * s390_find_process_pid ( pid_t pid)
static

Definition at line 531 of file s390-linux-nat.c.

References proc::next, pid, and s390_process_list.

Referenced by s390_process_info_get().

◆ s390_get_debug_reg_state()

static struct s390_debug_reg_state * s390_get_debug_reg_state ( pid_t pid)
static

◆ s390_inferior_tid()

static int s390_inferior_tid ( void )
static

◆ s390_mark_per_info_changed()

static void s390_mark_per_info_changed ( struct lwp_info * lp)
static

◆ s390_process_info_get()

static struct s390_process_info * s390_process_info_get ( pid_t pid)
static

Definition at line 561 of file s390-linux-nat.c.

References pid, s390_add_process(), and s390_find_process_pid().

Referenced by s390_get_debug_reg_state().

◆ s390_refresh_per_info()

static int s390_refresh_per_info ( void )
static

◆ s390_refresh_per_info_cb()

static int s390_refresh_per_info_cb ( struct lwp_info * lp)
static

Definition at line 825 of file s390-linux-nat.c.

References linux_stop_lwp(), lwp_is_stopped(), and s390_mark_per_info_changed().

Referenced by s390_refresh_per_info().

◆ s390_show_debug_regs()

static void s390_show_debug_regs ( int tid,
const char * where )
static

◆ s390_target_wordsize()

static int s390_target_wordsize ( void )
static

◆ store_fpregs()

static void store_fpregs ( const struct regcache * regcache,
int tid,
int regnum )
static

Definition at line 326 of file s390-linux-nat.c.

References fill_fpregset(), ptrace, and regnum.

Referenced by s390_linux_nat_target::store_registers().

◆ store_regs()

static void store_regs ( const struct regcache * regcache,
int tid,
int regnum )
static

Definition at line 289 of file s390-linux-nat.c.

References fill_gregset(), ptrace, and regnum.

Referenced by s390_linux_nat_target::store_registers().

◆ store_regset()

static void store_regset ( struct regcache * regcache,
int tid,
int regset_id,
int regsize,
const struct regset * regset )
static

◆ supply_fpregset()

void supply_fpregset ( struct regcache * regcache,
const fpregset_t * regp )

Definition at line 241 of file s390-linux-nat.c.

References regcache_supply_regset(), and s390_fpregset.

Referenced by fetch_fpregs().

◆ supply_gregset()

void supply_gregset ( struct regcache * regcache,
const gregset_t * regp )

Variable Documentation

◆ have_regset_gs

int have_regset_gs = 0
static

◆ have_regset_last_break

int have_regset_last_break = 0
static

◆ have_regset_system_call

int have_regset_system_call = 0
static

◆ have_regset_tdb

int have_regset_tdb = 0
static

◆ have_regset_vxrs

int have_regset_vxrs = 0
static

◆ s390_process_list

struct s390_process_info* s390_process_list = NULL
static

◆ the_s390_linux_nat_target

s390_linux_nat_target the_s390_linux_nat_target
static

Definition at line 147 of file s390-linux-nat.c.

Referenced by _initialize_s390_nat().