GDBserver
Macros | Functions | Variables
linux-s390-low.c File Reference
#include "server.h"
#include "linux-low.h"
#include "elf/common.h"
#include <asm/ptrace.h>
#include <sys/ptrace.h>
#include <sys/uio.h>
#include <elf.h>

Go to the source code of this file.

Macros

#define HWCAP_S390_HIGH_GPRS   512
 
#define HWCAP_S390_TE   1024
 
#define HWCAP_S390_VX   2048
 
#define s390_num_regs   52
 
#define s390_breakpoint_len   2
 

Functions

void init_registers_s390_linux32 (void)
 
void init_registers_s390_linux32v1 (void)
 
void init_registers_s390_linux32v2 (void)
 
void init_registers_s390_linux64 (void)
 
void init_registers_s390_linux64v1 (void)
 
void init_registers_s390_linux64v2 (void)
 
void init_registers_s390_te_linux64 (void)
 
void init_registers_s390_vx_linux64 (void)
 
void init_registers_s390_tevx_linux64 (void)
 
void init_registers_s390x_linux64 (void)
 
void init_registers_s390x_linux64v1 (void)
 
void init_registers_s390x_linux64v2 (void)
 
void init_registers_s390x_te_linux64 (void)
 
void init_registers_s390x_vx_linux64 (void)
 
void init_registers_s390x_tevx_linux64 (void)
 
static int s390_cannot_fetch_register (int regno)
 
static int s390_cannot_store_register (int regno)
 
static void s390_collect_ptrace_register (struct regcache *regcache, int regno, char *buf)
 
static void s390_supply_ptrace_register (struct regcache *regcache, int regno, const char *buf)
 
static void s390_fill_gregset (struct regcache *regcache, void *buf)
 
static void s390_store_last_break (struct regcache *regcache, const void *buf)
 
static void s390_fill_system_call (struct regcache *regcache, void *buf)
 
static void s390_store_system_call (struct regcache *regcache, const void *buf)
 
static void s390_store_tdb (struct regcache *regcache, const void *buf)
 
static void s390_fill_vxrs_low (struct regcache *regcache, void *buf)
 
static void s390_store_vxrs_low (struct regcache *regcache, const void *buf)
 
static void s390_fill_vxrs_high (struct regcache *regcache, void *buf)
 
static void s390_store_vxrs_high (struct regcache *regcache, const void *buf)
 
static CORE_ADDR s390_get_pc (struct regcache *regcache)
 
static void s390_set_pc (struct regcache *regcache, CORE_ADDR newpc)
 
static int s390_check_regset (int pid, int regset, int regsize)
 
static void s390_arch_setup (void)
 
static int s390_breakpoint_at (CORE_ADDR pc)
 
static const struct regs_infos390_regs_info (void)
 
void initialize_low_arch (void)
 

Variables

const struct target_desctdesc_s390_linux32
 
const struct target_desctdesc_s390_linux32v1
 
const struct target_desctdesc_s390_linux32v2
 
const struct target_desctdesc_s390_linux64
 
const struct target_desctdesc_s390_linux64v1
 
const struct target_desctdesc_s390_linux64v2
 
const struct target_desctdesc_s390_te_linux64
 
const struct target_desctdesc_s390_vx_linux64
 
const struct target_desctdesc_s390_tevx_linux64
 
const struct target_desctdesc_s390x_linux64
 
const struct target_desctdesc_s390x_linux64v1
 
const struct target_desctdesc_s390x_linux64v2
 
const struct target_desctdesc_s390x_te_linux64
 
const struct target_desctdesc_s390x_vx_linux64
 
const struct target_desctdesc_s390x_tevx_linux64
 
static int s390_regmap []
 
static struct regset_info s390_regsets []
 
static const unsigned char s390_breakpoint [] = { 0, 1 }
 
static struct usrregs_info s390_usrregs_info
 
static struct regsets_info s390_regsets_info
 
static struct regs_info regs_info
 
struct linux_target_ops the_low_target
 

Macro Definition Documentation

#define HWCAP_S390_HIGH_GPRS   512

Definition at line 32 of file linux-s390-low.c.

Referenced by s390_arch_setup().

#define HWCAP_S390_TE   1024

Definition at line 36 of file linux-s390-low.c.

Referenced by s390_arch_setup().

#define HWCAP_S390_VX   2048

Definition at line 40 of file linux-s390-low.c.

Referenced by s390_arch_setup().

#define s390_breakpoint_len   2

Definition at line 398 of file linux-s390-low.c.

Referenced by s390_breakpoint_at().

#define s390_num_regs   52

Definition at line 103 of file linux-s390-low.c.

Function Documentation

void init_registers_s390_linux32 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_linux32v1 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_linux32v2 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_linux64v1 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_linux64v2 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_te_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_tevx_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390_vx_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_linux64v1 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_linux64v2 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_te_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_tevx_linux64 ( void  )

Referenced by initialize_low_arch().

void init_registers_s390x_vx_linux64 ( void  )

Referenced by initialize_low_arch().

void initialize_low_arch ( void  )
static void s390_arch_setup ( void  )
static
static int s390_breakpoint_at ( CORE_ADDR  pc)
static

Definition at line 596 of file linux-s390-low.c.

References read_inferior_memory(), s390_breakpoint, and s390_breakpoint_len.

static int s390_cannot_fetch_register ( int  regno)
static

Definition at line 168 of file linux-s390-low.c.

static int s390_cannot_store_register ( int  regno)
static

Definition at line 174 of file linux-s390-low.c.

static int s390_check_regset ( int  pid,
int  regset,
int  regsize 
)
static

Definition at line 465 of file linux-s390-low.c.

References alloca(), errno, and PTRACE_GETREGSET.

Referenced by s390_arch_setup().

static void s390_collect_ptrace_register ( struct regcache regcache,
int  regno,
char *  buf 
)
static
static void s390_fill_gregset ( struct regcache regcache,
void *  buf 
)
static
static void s390_fill_system_call ( struct regcache regcache,
void *  buf 
)
static

Definition at line 314 of file linux-s390-low.c.

References collect_register_by_name().

static void s390_fill_vxrs_high ( struct regcache regcache,
void *  buf 
)
static

Definition at line 360 of file linux-s390-low.c.

References collect_register(), find_regno(), and regcache::tdesc.

static void s390_fill_vxrs_low ( struct regcache regcache,
void *  buf 
)
static

Definition at line 340 of file linux-s390-low.c.

References collect_register(), find_regno(), and regcache::tdesc.

static CORE_ADDR s390_get_pc ( struct regcache regcache)
static

Definition at line 401 of file linux-s390-low.c.

References collect_register_by_name(), register_size(), and regcache::tdesc.

static const struct regs_info* s390_regs_info ( void  )
static

Definition at line 646 of file linux-s390-low.c.

References current_process(), register_size(), regs_info, and process_info::tdesc.

static void s390_set_pc ( struct regcache regcache,
CORE_ADDR  newpc 
)
static
static void s390_store_last_break ( struct regcache regcache,
const void *  buf 
)
static

Definition at line 305 of file linux-s390-low.c.

References register_size(), supply_register_by_name(), and regcache::tdesc.

static void s390_store_system_call ( struct regcache regcache,
const void *  buf 
)
static

Definition at line 320 of file linux-s390-low.c.

References supply_register_by_name().

static void s390_store_tdb ( struct regcache regcache,
const void *  buf 
)
static

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

References find_regno(), supply_register(), and regcache::tdesc.

static void s390_store_vxrs_high ( struct regcache regcache,
const void *  buf 
)
static

Definition at line 370 of file linux-s390-low.c.

References find_regno(), supply_register(), and regcache::tdesc.

static void s390_store_vxrs_low ( struct regcache regcache,
const void *  buf 
)
static

Definition at line 350 of file linux-s390-low.c.

References find_regno(), supply_register(), and regcache::tdesc.

static void s390_supply_ptrace_register ( struct regcache regcache,
int  regno,
const char *  buf 
)
static

Variable Documentation

struct regs_info regs_info
static
Initial value:
=
{
NULL,
}
static struct regsets_info s390_regsets_info
static struct usrregs_info s390_usrregs_info

Definition at line 616 of file linux-s390-low.c.

Referenced by s390_regs_info().

const unsigned char s390_breakpoint[] = { 0, 1 }
static

Definition at line 397 of file linux-s390-low.c.

Referenced by s390_breakpoint_at().

int s390_regmap[]
static
Initial value:
= {
PT_PSWMASK, PT_PSWADDR,
PT_GPR0, PT_GPR1, PT_GPR2, PT_GPR3,
PT_GPR4, PT_GPR5, PT_GPR6, PT_GPR7,
PT_GPR8, PT_GPR9, PT_GPR10, PT_GPR11,
PT_GPR12, PT_GPR13, PT_GPR14, PT_GPR15,
PT_ACR0, PT_ACR1, PT_ACR2, PT_ACR3,
PT_ACR4, PT_ACR5, PT_ACR6, PT_ACR7,
PT_ACR8, PT_ACR9, PT_ACR10, PT_ACR11,
PT_ACR12, PT_ACR13, PT_ACR14, PT_ACR15,
PT_FPC,
PT_FPR0_HI, PT_FPR1_HI, PT_FPR2_HI, PT_FPR3_HI,
PT_FPR4_HI, PT_FPR5_HI, PT_FPR6_HI, PT_FPR7_HI,
PT_FPR8_HI, PT_FPR9_HI, PT_FPR10_HI, PT_FPR11_HI,
PT_FPR12_HI, PT_FPR13_HI, PT_FPR14_HI, PT_FPR15_HI,
PT_ORIGGPR2,
}

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

struct regset_info s390_regsets[]
static
Initial value:
= {
{ 0, 0, 0, 0, GENERAL_REGS, s390_fill_gregset, NULL },
{ PTRACE_GETREGSET, -1, NT_S390_LAST_BREAK, 0, EXTENDED_REGS,
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_SYSTEM_CALL, 0,
{ PTRACE_GETREGSET, -1, NT_S390_TDB, 0, EXTENDED_REGS,
NULL, s390_store_tdb },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_LOW, 0,
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_HIGH, 0,
{ 0, 0, 0, -1, -1, NULL, NULL }
}
static void s390_store_system_call(struct regcache *regcache, const void *buf)
static void s390_store_tdb(struct regcache *regcache, const void *buf)
static void s390_fill_vxrs_high(struct regcache *regcache, void *buf)
static void s390_fill_system_call(struct regcache *regcache, void *buf)
static void s390_store_vxrs_high(struct regcache *regcache, const void *buf)
#define PTRACE_SETREGSET
Definition: linux-ptrace.h:51
#define PTRACE_GETREGSET
Definition: linux-ptrace.h:47
static void s390_store_last_break(struct regcache *regcache, const void *buf)
static void s390_store_vxrs_low(struct regcache *regcache, const void *buf)
static void s390_fill_vxrs_low(struct regcache *regcache, void *buf)
static void s390_fill_gregset(struct regcache *regcache, void *buf)

Definition at line 379 of file linux-s390-low.c.

Referenced by s390_arch_setup().

struct regsets_info s390_regsets_info
static
Initial value:
=
{
0,
NULL,
}
static struct regset_info s390_regsets[]

Definition at line 609 of file linux-s390-low.c.

struct usrregs_info s390_usrregs_info
static
Initial value:
=
{
}
static int s390_regmap[]
#define s390_num_regs

Definition at line 603 of file linux-s390-low.c.

const struct target_desc* tdesc_s390_linux32

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_linux32v1

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_linux32v2

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_linux64

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_linux64v1

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_linux64v2

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_te_linux64

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390_tevx_linux64
const struct target_desc* tdesc_s390_vx_linux64

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390x_linux64

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390x_linux64v1

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390x_linux64v2

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390x_te_linux64

Referenced by s390_arch_setup().

const struct target_desc* tdesc_s390x_tevx_linux64
const struct target_desc* tdesc_s390x_vx_linux64

Referenced by s390_arch_setup().

struct linux_target_ops the_low_target
Initial value:
= {
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
}
static CORE_ADDR s390_get_pc(struct regcache *regcache)
static void s390_arch_setup(void)
static int s390_cannot_fetch_register(int regno)
static void s390_supply_ptrace_register(struct regcache *regcache, int regno, const char *buf)
static const unsigned char s390_breakpoint[]
static void s390_set_pc(struct regcache *regcache, CORE_ADDR newpc)
static int s390_breakpoint_at(CORE_ADDR pc)
static const struct regs_info * s390_regs_info(void)
#define s390_breakpoint_len
static void s390_collect_ptrace_register(struct regcache *regcache, int regno, char *buf)
static int s390_cannot_store_register(int regno)

Definition at line 660 of file linux-s390-low.c.

Referenced by s390_collect_ptrace_register(), s390_fill_gregset(), and s390_supply_ptrace_register().