GDBserver

Macros | Functions | Variables
linux-s390-low.c File Reference
`#include "server.h"`
`#include "linux-low.h"`
`#include "elf/common.h"`
`#include "ax.h"`
`#include "tracepoint.h"`
`#include <asm/ptrace.h>`
`#include "nat/gdb_ptrace.h"`
`#include <sys/uio.h>`
`#include <elf.h>`
`#include <inttypes.h>`
`#include "linux-s390-tdesc.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 | HWCAP_S390_GS 16384
#define | s390_num_regs 52
#define | s390_num_regs_3264 68
#define | s390_breakpoint_len 2

## Functions
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_fill_gprs_high (struct regcache *regcache, void *buf)
static void | s390_store_gprs_high (struct regcache *regcache, const 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 void | s390_fill_gs (struct regcache *regcache, void *buf)
static void | s390_store_gs (struct regcache *regcache, const void *buf)
static void | s390_fill_gsbc (struct regcache *regcache, void *buf)
static void | s390_store_gsbc (struct regcache *regcache, const void *buf)
static const gdb_byte * | s390_sw_breakpoint_from_kind (int kind, int *size)
static CORE_ADDR | s390_get_pc (struct regcache *regcache)
static void | s390_set_pc (struct regcache *regcache, CORE_ADDR newpc)
static unsigned long | s390_get_hwcap (const struct target_desc *tdesc)
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 int | s390_supports_z_point_type (char z_type)
static int | s390_supports_hardware_single_step (void)
static const struct regs_info * | s390_regs_info (void)
static int | s390_supports_tracepoints (void)
static int | s390_get_thread_area (int lwpid, CORE_ADDR *addrp)
static void | append_insns (CORE_ADDR *to, size_t len, const unsigned char *buf)
static int | s390_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc, int is_64)
static int | s390_install_fast_tracepoint_jump_pad (CORE_ADDR tpoint, CORE_ADDR tpaddr, CORE_ADDR collector, CORE_ADDR lockaddr, ULONGEST orig_size, CORE_ADDR *jump_entry, CORE_ADDR *trampoline, ULONGEST *trampoline_size, unsigned char *jjump_pad_insn, ULONGEST *jjump_pad_insn_size, CORE_ADDR *adjusted_insn_addr, CORE_ADDR *adjusted_insn_addr_end, char *err)
static int | s390_get_min_fast_tracepoint_insn_len (void)
static int | s390_get_ipa_tdesc_idx (void)
static void | add_insns (const unsigned char *start, int len)
static void | s390_emit_prologue (void)
static void | s390_emit_epilogue (void)
static void | s390_emit_add (void)
static void | s390_emit_sub (void)
static void | s390_emit_mul (void)
static void | s390_emit_lsh (void)
static void | s390_emit_rsh_signed (void)
static void | s390_emit_rsh_unsigned (void)
static void | s390_emit_ext (int arg)
static void | s390_emit_log_not (void)
static void | s390_emit_bit_and (void)
static void | s390_emit_bit_or (void)
static void | s390_emit_bit_xor (void)
static void | s390_emit_bit_not (void)
static void | s390_emit_equal (void)
static void | s390_emit_less_signed (void)
static void | s390_emit_less_unsigned (void)
static void | s390_emit_ref (int size)
static void | s390_emit_if_goto (int *offset_p, int *size_p)
static void | s390_emit_goto (int *offset_p, int *size_p)
static void | s390_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
static void | s390_emit_litpool (int size)
static void | s390_emit_const (LONGEST num)
static void | s390_emit_call (CORE_ADDR fn)
static void | s390_emit_reg (int reg)
static void | s390_emit_pop (void)
static void | s390_emit_stack_flush (void)
static void | s390_emit_zero_ext (int arg)
static void | s390_emit_swap (void)
static void | s390_emit_stack_adjust (int n)
static void | s390_emit_set_r2 (int arg1)
static void | s390_emit_int_call_1 (CORE_ADDR fn, int arg1)
static void | s390_emit_void_call_2 (CORE_ADDR fn, int arg1)
static void | s390_emit_eq_goto (int *offset_p, int *size_p)
static void | s390_emit_ne_goto (int *offset_p, int *size_p)
static void | s390_emit_lt_goto (int *offset_p, int *size_p)
static void | s390_emit_le_goto (int *offset_p, int *size_p)
static void | s390_emit_gt_goto (int *offset_p, int *size_p)
static void | s390_emit_ge_goto (int *offset_p, int *size_p)
static struct emit_ops * | s390_emit_ops (void)
void | initialize_low_arch (void)

## Variables
static int | s390_regmap []
static int | s390_regmap_3264 []
static struct regset_info | s390_regsets []
static const gdb_byte | s390_breakpoint [] = { 0, 1 }
static int | have_hwcap_s390_high_gprs = 0
static int | have_hwcap_s390_vx = 0
static struct usrregs_info | s390_usrregs_info
static struct regsets_info | s390_regsets_info
static struct regs_info | regs_info
static struct usrregs_info | s390_usrregs_info_3264
static struct regsets_info | s390_regsets_info_3264
static struct regs_info | regs_info_3264
static const unsigned char | s390_ft_entry_gpr_esa []
static const unsigned char | s390_ft_entry_gpr_zarch []
static const unsigned char | s390_ft_entry_misc []
static const unsigned char | s390_ft_entry_fr []
static const unsigned char | s390_ft_entry_vr []
static const unsigned char | s390_ft_main_31 []
static const unsigned char | s390_ft_main_64 []
static const unsigned char | s390_ft_exit_fr []
static const unsigned char | s390_ft_exit_vr []
static const unsigned char | s390_ft_exit_misc []
static const unsigned char | s390_ft_exit_gpr_esa []
static const unsigned char | s390_ft_exit_gpr_zarch []
static struct emit_ops | s390_emit_ops_impl
struct linux_target_ops | the_low_target

## Macro Definition Documentation

## ◆ HWCAP_S390_GS

#define HWCAP_S390_GS 16384

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

Referenced by s390_arch_setup().

## ◆ HWCAP_S390_HIGH_GPRS

#define HWCAP_S390_HIGH_GPRS 512

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

Referenced by s390_arch_setup().

## ◆ HWCAP_S390_TE

#define HWCAP_S390_TE 1024

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

Referenced by s390_arch_setup().

## ◆ HWCAP_S390_VX

#define HWCAP_S390_VX 2048

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

Referenced by s390_arch_setup().

## ◆ s390_breakpoint_len

#define s390_breakpoint_len 2

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

Referenced by s390_breakpoint_at(), and s390_sw_breakpoint_from_kind().

## ◆ s390_num_regs

#define s390_num_regs 52

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

## ◆ s390_num_regs_3264

#define s390_num_regs_3264 68

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

## Function Documentation

## ◆ add_insns()

static void add_insns | ( | const unsigned char * | start,
|  | int | len
| ) |  |
| static

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

References append_insns(), current_insn_ptr, debug_printf(), debug_threads, and paddress().

Referenced by s390_emit_add(), s390_emit_bit_and(), s390_emit_bit_not(), s390_emit_bit_or(), s390_emit_bit_xor(), s390_emit_call(), s390_emit_const(), s390_emit_epilogue(), s390_emit_eq_goto(), s390_emit_ext(), s390_emit_ge_goto(), s390_emit_goto(), s390_emit_gt_goto(), s390_emit_if_goto(), s390_emit_le_goto(), s390_emit_less_signed(), s390_emit_less_unsigned(), s390_emit_litpool(), s390_emit_log_not(), s390_emit_lsh(), s390_emit_lt_goto(), s390_emit_ne_goto(), s390_emit_pop(), s390_emit_prologue(), s390_emit_ref(), s390_emit_reg(), s390_emit_rsh_signed(), s390_emit_rsh_unsigned(), s390_emit_set_r2(), s390_emit_stack_adjust(), s390_emit_stack_flush(), s390_emit_sub(), s390_emit_swap(), s390_emit_void_call_2(), and s390_emit_zero_ext().

## ◆ append_insns()

static void append_insns | ( | CORE_ADDR * | to,
|  | size_t | len,
|  | const unsigned char * | buf
| ) |  |
| static

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

References write_inferior_memory().

Referenced by add_insns(), s390_install_fast_tracepoint_jump_pad(), and s390_relocate_instruction().

## ◆ initialize_low_arch()

void initialize_low_arch | ( | void |  | ) |

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

References init_registers_s390_gs_linux64(), init_registers_s390_linux32(), init_registers_s390_linux32v1(), init_registers_s390_linux32v2(), init_registers_s390_linux64(), init_registers_s390_linux64v1(), init_registers_s390_linux64v2(), init_registers_s390_te_linux64(), init_registers_s390_tevx_linux64(), init_registers_s390_vx_linux64(), s390_regsets_info, and s390_regsets_info_3264.

## ◆ s390_arch_setup()

static void s390_arch_setup | ( | void |  | ) |
| static

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

References collect_register_by_name(), current_process(), current_thread, fetch_inferior_registers, find_regno(), free_register_cache(), have_hwcap_s390_high_gprs, have_hwcap_s390_vx, HWCAP_S390_GS, HWCAP_S390_HIGH_GPRS, HWCAP_S390_TE, HWCAP_S390_VX, new_register_cache(), pid_of(), PTRACE_GETREGSET, s390_check_regset(), s390_get_hwcap(), s390_regsets, regcache::tdesc, process_info::tdesc, tdesc_s390_gs_linux64, tdesc_s390_linux32, tdesc_s390_linux32v1, tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1, tdesc_s390_linux64v2, tdesc_s390_te_linux64, tdesc_s390_tevx_linux64, and tdesc_s390_vx_linux64.

## ◆ s390_breakpoint_at()

static int s390_breakpoint_at | ( | CORE_ADDR | pc | ) |
| static

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

References read_inferior_memory(), s390_breakpoint, and s390_breakpoint_len.

## ◆ s390_cannot_fetch_register()

static int s390_cannot_fetch_register | ( | int | regno | ) |
| static

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

## ◆ s390_cannot_store_register()

static int s390_cannot_store_register | ( | int | regno | ) |
| static

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

## ◆ s390_check_regset()

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

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

References alloca(), errno, ptrace(), and PTRACE_GETREGSET.

Referenced by s390_arch_setup().

## ◆ s390_collect_ptrace_register()

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

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

References alloca(), collect_register(), memset(), usrregs_info::num_regs, register_size(), usrregs_info::regmap, linux_target_ops::regs_info, regcache::tdesc, the_low_target, and regs_info::usrregs.

Referenced by s390_fill_gregset().

## ◆ s390_emit_add()

static void s390_emit_add | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_bit_and()

static void s390_emit_bit_and | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_bit_not()

static void s390_emit_bit_not | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_bit_or()

static void s390_emit_bit_or | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_bit_xor()

static void s390_emit_bit_xor | ( | void |  | ) |
| static

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

References add_insns().

Referenced by s390_emit_equal().

## ◆ s390_emit_call()

static void s390_emit_call | ( | CORE_ADDR | fn | ) |
| static

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

References add_insns(), and s390_emit_litpool().

Referenced by s390_emit_int_call_1(), s390_emit_reg(), and s390_emit_void_call_2().

## ◆ s390_emit_const()

static void s390_emit_const | ( | LONGEST | num | ) |
| static

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

References add_insns(), and s390_emit_litpool().

## ◆ s390_emit_epilogue()

static void s390_emit_epilogue | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_eq_goto()

static void s390_emit_eq_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_equal()

static void s390_emit_equal | ( | void |  | ) |
| static

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

References s390_emit_bit_xor(), and s390_emit_log_not().

## ◆ s390_emit_ext()

static void s390_emit_ext | ( | int | arg | ) |
| static

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

References add_insns().

## ◆ s390_emit_ge_goto()

static void s390_emit_ge_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_goto()

static void s390_emit_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_gt_goto()

static void s390_emit_gt_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_if_goto()

static void s390_emit_if_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_int_call_1()

static void s390_emit_int_call_1 | ( | CORE_ADDR | fn,
|  | int | arg1
| ) |  |
| static

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

References s390_emit_call(), and s390_emit_set_r2().

## ◆ s390_emit_le_goto()

static void s390_emit_le_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_less_signed()

static void s390_emit_less_signed | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_less_unsigned()

static void s390_emit_less_unsigned | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_litpool()

static void s390_emit_litpool | ( | int | size | ) |
| static

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

References add_insns(), and current_insn_ptr.

Referenced by s390_emit_call(), s390_emit_const(), and s390_emit_set_r2().

## ◆ s390_emit_log_not()

static void s390_emit_log_not | ( | void |  | ) |
| static

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

References add_insns().

Referenced by s390_emit_equal().

## ◆ s390_emit_lsh()

static void s390_emit_lsh | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_lt_goto()

static void s390_emit_lt_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_mul()

static void s390_emit_mul | ( | void |  | ) |
| static

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

References emit_error.

## ◆ s390_emit_ne_goto()

static void s390_emit_ne_goto | ( | int * | offset_p,
|  | int * | size_p
| ) |  |
| static

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

References add_insns().

## ◆ s390_emit_ops()

static struct emit_ops* s390_emit_ops | ( | void |  | ) |
| static

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

References current_thread, get_thread_regcache(), register_size(), s390_emit_ops_impl, and regcache::tdesc.

## ◆ s390_emit_pop()

static void s390_emit_pop | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_prologue()

static void s390_emit_prologue | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_ref()

static void s390_emit_ref | ( | int | size | ) |
| static

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

References add_insns(), and emit_error.

## ◆ s390_emit_reg()

static void s390_emit_reg | ( | int | reg | ) |
| static

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

References add_insns(), get_raw_reg_func_addr(), and s390_emit_call().

## ◆ s390_emit_rsh_signed()

static void s390_emit_rsh_signed | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_rsh_unsigned()

static void s390_emit_rsh_unsigned | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_set_r2()

static void s390_emit_set_r2 | ( | int | arg1 | ) |
| static

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

References add_insns(), and s390_emit_litpool().

Referenced by s390_emit_int_call_1(), and s390_emit_void_call_2().

## ◆ s390_emit_stack_adjust()

static void s390_emit_stack_adjust | ( | int | n | ) |
| static

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

References add_insns().

## ◆ s390_emit_stack_flush()

static void s390_emit_stack_flush | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_sub()

static void s390_emit_sub | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_swap()

static void s390_emit_swap | ( | void |  | ) |
| static

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

References add_insns().

## ◆ s390_emit_void_call_2()

static void s390_emit_void_call_2 | ( | CORE_ADDR | fn,
|  | int | arg1
| ) |  |
| static

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

References add_insns(), s390_emit_call(), and s390_emit_set_r2().

## ◆ s390_emit_zero_ext()

static void s390_emit_zero_ext | ( | int | arg | ) |
| static

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

References add_insns().

## ◆ s390_fill_gprs_high()

static void s390_fill_gprs_high | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

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

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

## ◆ s390_fill_gregset()

static void s390_fill_gregset | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

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

References usrregs_info::num_regs, usrregs_info::regmap, linux_target_ops::regs_info, s390_collect_ptrace_register(), the_low_target, and regs_info::usrregs.

## ◆ s390_fill_gs()

static void s390_fill_gs | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

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

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

## ◆ s390_fill_gsbc()

static void s390_fill_gsbc | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

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

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

## ◆ s390_fill_system_call()

static void s390_fill_system_call | ( | struct regcache * | regcache,
|  | void * | buf
| ) |  |
| static

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

References collect_register_by_name().

## ◆ s390_fill_vxrs_high()

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

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

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

## ◆ s390_fill_vxrs_low()

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

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

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

## ◆ s390_get_hwcap()

static unsigned long s390_get_hwcap | ( | const struct target_desc * | tdesc | ) |
| static

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

References alloca(), offset, target_ops::read_auxv, register_size(), and the_target.

Referenced by s390_arch_setup().

## ◆ s390_get_ipa_tdesc_idx()

static int s390_get_ipa_tdesc_idx | ( | void |  | ) |
| static

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

References current_thread, get_thread_regcache(), S390_TDESC_32, S390_TDESC_32V1, S390_TDESC_32V2, S390_TDESC_64, S390_TDESC_64V1, S390_TDESC_64V2, S390_TDESC_TE, S390_TDESC_TEVX, S390_TDESC_VX, regcache::tdesc, tdesc_s390_linux32, tdesc_s390_linux32v1, tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1, tdesc_s390_linux64v2, tdesc_s390_te_linux64, tdesc_s390_tevx_linux64, and tdesc_s390_vx_linux64.

## ◆ s390_get_min_fast_tracepoint_insn_len()

static int s390_get_min_fast_tracepoint_insn_len | ( | void |  | ) |
| static

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

## ◆ s390_get_pc()

static CORE_ADDR s390_get_pc | ( | struct regcache * | regcache | ) |
| static

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

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

## ◆ s390_get_thread_area()

static int s390_get_thread_area | ( | int | lwpid,
|  | CORE_ADDR * | addrp
| ) |  |
| static

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

References current_thread, get_thread_regcache(), ptrace(), register_size(), and regcache::tdesc.

## ◆ s390_install_fast_tracepoint_jump_pad()

static int s390_install_fast_tracepoint_jump_pad | ( | CORE_ADDR | tpoint,
|  | CORE_ADDR | tpaddr,
|  | CORE_ADDR | collector,
|  | CORE_ADDR | lockaddr,
|  | ULONGEST | orig_size,
|  | CORE_ADDR * | jump_entry,
|  | CORE_ADDR * | trampoline,
|  | ULONGEST * | trampoline_size,
|  | unsigned char * | jjump_pad_insn,
|  | ULONGEST * | jjump_pad_insn_size,
|  | CORE_ADDR * | adjusted_insn_addr,
|  | CORE_ADDR * | adjusted_insn_addr_end,
|  | char * | err
| ) |  |
| static

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

References append_insns(), current_thread, get_thread_regcache(), have_hwcap_s390_high_gprs, have_hwcap_s390_vx, offset, register_size(), s390_ft_entry_fr, s390_ft_entry_gpr_esa, s390_ft_entry_gpr_zarch, s390_ft_entry_misc, s390_ft_entry_vr, s390_ft_exit_fr, s390_ft_exit_gpr_esa, s390_ft_exit_gpr_zarch, s390_ft_exit_misc, s390_ft_exit_vr, s390_ft_main_31, s390_ft_main_64, s390_relocate_instruction(), and regcache::tdesc.

## ◆ s390_regs_info()

static const struct regs_info* s390_regs_info | ( | void |  | ) |
| static

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

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

## ◆ s390_relocate_instruction()

static int s390_relocate_instruction | ( | CORE_ADDR * | to,
|  | CORE_ADDR | oldloc,
|  | int | is_64
| ) |  |
| static

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

References append_insns(), and read_inferior_memory().

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_set_pc()

static void s390_set_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | newpc
| ) |  |
| static

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

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

## ◆ s390_store_gprs_high()

static void s390_store_gprs_high | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

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

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

## ◆ s390_store_gs()

static void s390_store_gs | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

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

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

## ◆ s390_store_gsbc()

static void s390_store_gsbc | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

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

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

## ◆ s390_store_last_break()

static void s390_store_last_break | ( | struct regcache * | regcache,
|  | const void * | buf
| ) |  |
| static

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

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

## ◆ s390_store_system_call()

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

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

References supply_register_by_name().

## ◆ s390_store_tdb()

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

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

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

## ◆ s390_store_vxrs_high()

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

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

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

## ◆ s390_store_vxrs_low()

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

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

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

## ◆ s390_supply_ptrace_register()

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

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

References alloca(), collect_register(), usrregs_info::num_regs, register_size(), usrregs_info::regmap, linux_target_ops::regs_info, supply_register(), regcache::tdesc, the_low_target, and regs_info::usrregs.

## ◆ s390_supports_hardware_single_step()

static int s390_supports_hardware_single_step | ( | void |  | ) |
| static

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

## ◆ s390_supports_tracepoints()

static int s390_supports_tracepoints | ( | void |  | ) |
| static

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

## ◆ s390_supports_z_point_type()

static int s390_supports_z_point_type | ( | char | z_type | ) |
| static

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

References Z_PACKET_SW_BP.

## ◆ s390_sw_breakpoint_from_kind()

static const gdb_byte* s390_sw_breakpoint_from_kind | ( | int | kind,
|  | int * | size
| ) |  |
| static

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

References s390_breakpoint, and s390_breakpoint_len.

## ◆ s390_write_goto_address()

static void s390_write_goto_address | ( | CORE_ADDR | from,
|  | CORE_ADDR | to,
|  | int | size
| ) |  |
| static

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

References emit_error, and write_inferior_memory().

## Variable Documentation

## ◆ have_hwcap_s390_high_gprs

int have_hwcap_s390_high_gprs = 0
| static

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

Referenced by s390_arch_setup(), s390_install_fast_tracepoint_jump_pad(), and s390_regs_info().

## ◆ have_hwcap_s390_vx

int have_hwcap_s390_vx = 0
| static

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

Referenced by s390_arch_setup(), and s390_install_fast_tracepoint_jump_pad().

## ◆ regs_info

struct regs_info regs_info
| static

Initial value:
=
{
NULL,
&s390_usrregs_info,
&s390_regsets_info
}
s390_regsets_info
static struct regsets_info s390_regsets_info
Definition: linux-s390-low.c:707
s390_usrregs_info
static struct usrregs_info s390_usrregs_info
Definition: linux-s390-low.c:701

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

Referenced by s390_regs_info().

## ◆ regs_info_3264

struct regs_info regs_info_3264
| static

Initial value:
=
{
NULL,
&s390_usrregs_info_3264,
&s390_regsets_info_3264
}
s390_usrregs_info_3264
static struct usrregs_info s390_usrregs_info_3264
Definition: linux-s390-low.c:721
s390_regsets_info_3264
static struct regsets_info s390_regsets_info_3264
Definition: linux-s390-low.c:727

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

Referenced by s390_regs_info().

## ◆ s390_breakpoint

const gdb_byte s390_breakpoint[] = { 0, 1 }
| static

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

Referenced by s390_breakpoint_at(), and s390_sw_breakpoint_from_kind().

## ◆ s390_emit_ops_impl

struct emit_ops s390_emit_ops_impl
| static

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

Referenced by s390_emit_ops().

## ◆ s390_ft_entry_fr

const unsigned char s390_ft_entry_fr[]
| static

Initial value:
= {
0x60, 0x00, 0xf0, 0x00,
0x60, 0x10, 0xf0, 0x10,
0x60, 0x20, 0xf0, 0x20,
0x60, 0x30, 0xf0, 0x30,
0x60, 0x40, 0xf0, 0x40,
0x60, 0x50, 0xf0, 0x50,
0x60, 0x60, 0xf0, 0x60,
0x60, 0x70, 0xf0, 0x70,
0x60, 0x80, 0xf0, 0x80,
0x60, 0x90, 0xf0, 0x90,
0x60, 0xa0, 0xf0, 0xa0,
0x60, 0xb0, 0xf0, 0xb0,
0x60, 0xc0, 0xf0, 0xc0,
0x60, 0xd0, 0xf0, 0xd0,
0x60, 0xe0, 0xf0, 0xe0,
0x60, 0xf0, 0xf0, 0xf0,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_entry_gpr_esa

const unsigned char s390_ft_entry_gpr_esa[]
| static

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_entry_gpr_zarch

const unsigned char s390_ft_entry_gpr_zarch[]
| static

Initial value:
= {
0xa7, 0x14, 0x00, 0x21,
0xa7, 0x24, 0x00, 0x16,
0xa7, 0x44, 0x00, 0x0b,
0xa7, 0xfb, 0xfd, 0x00,
0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
0xa7, 0x08, 0x00, 0x00,
0xa7, 0xf4, 0x00, 0x1b,
0xa7, 0xfb, 0xfd, 0x00,
0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
0xa7, 0x08, 0x10, 0x00,
0xa7, 0xf4, 0x00, 0x12,
0xa7, 0xfb, 0xfd, 0x00,
0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
0xa7, 0x08, 0x20, 0x00,
0xa7, 0xf4, 0x00, 0x09,
0xa7, 0xfb, 0xfd, 0x00,
0xeb, 0x0e, 0xf2, 0x00, 0x00, 0x24,
0xa7, 0x08, 0x30, 0x00,
0xb9, 0x04, 0x00, 0x1f,
0xa7, 0x1b, 0x03, 0x00,
0xe3, 0x10, 0xf2, 0x78, 0x00, 0x24,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_entry_misc

const unsigned char s390_ft_entry_misc[]
| static

Initial value:
= {
0x9b, 0x0f, 0xf2, 0x80,
0xb9, 0x8d, 0x00, 0x23,
0xa7, 0x18, 0xcf, 0xff,
0x14, 0x21,
0x16, 0x20,
0x50, 0x20, 0xf2, 0xc0,
0x50, 0x30, 0xf2, 0xc4,
0xb2, 0x9c, 0xf2, 0xd0,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_entry_vr

const unsigned char s390_ft_entry_vr[]
| static

Initial value:
= {
0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x3e,
0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x3e,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_exit_fr

const unsigned char s390_ft_exit_fr[]
| static

Initial value:
= {
0x68, 0x00, 0xf0, 0x00,
0x68, 0x10, 0xf0, 0x10,
0x68, 0x20, 0xf0, 0x20,
0x68, 0x30, 0xf0, 0x30,
0x68, 0x40, 0xf0, 0x40,
0x68, 0x50, 0xf0, 0x50,
0x68, 0x60, 0xf0, 0x60,
0x68, 0x70, 0xf0, 0x70,
0x68, 0x80, 0xf0, 0x80,
0x68, 0x90, 0xf0, 0x90,
0x68, 0xa0, 0xf0, 0xa0,
0x68, 0xb0, 0xf0, 0xb0,
0x68, 0xc0, 0xf0, 0xc0,
0x68, 0xd0, 0xf0, 0xd0,
0x68, 0xe0, 0xf0, 0xe0,
0x68, 0xf0, 0xf0, 0xf0,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_exit_gpr_esa

const unsigned char s390_ft_exit_gpr_esa[]
| static

Initial value:
= {
0x58, 0x00, 0xf2, 0x04,
0x58, 0x10, 0xf2, 0x0c,
0x58, 0x20, 0xf2, 0x14,
0x58, 0x30, 0xf2, 0x1c,
0x58, 0x40, 0xf2, 0x24,
0x58, 0x50, 0xf2, 0x2c,
0x58, 0x60, 0xf2, 0x34,
0x58, 0x70, 0xf2, 0x3c,
0x58, 0x80, 0xf2, 0x44,
0x58, 0x90, 0xf2, 0x4c,
0x58, 0xa0, 0xf2, 0x54,
0x58, 0xb0, 0xf2, 0x5c,
0x58, 0xc0, 0xf2, 0x64,
0x58, 0xd0, 0xf2, 0x6c,
0x58, 0xe0, 0xf2, 0x74,
0x58, 0xf0, 0xf2, 0x7c,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_exit_gpr_zarch

const unsigned char s390_ft_exit_gpr_zarch[]
| static

Initial value:
= {
0xeb, 0x0f, 0xf2, 0x00, 0x00, 0x04,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_exit_misc

const unsigned char s390_ft_exit_misc[]
| static

Initial value:
= {
0xb2, 0x9d, 0xf2, 0xd0,
0x58, 0x00, 0xf2, 0xc0,
0x88, 0x00, 0x00, 0x0c,
0x89, 0x00, 0x00, 0x1e,
0x1e, 0x00,
0x9a, 0x0f, 0xf2, 0x80,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_exit_vr

const unsigned char s390_ft_exit_vr[]
| static

Initial value:
= {
0xe7, 0x0f, 0xf0, 0x00, 0x00, 0x36,
0xe7, 0x0f, 0xf1, 0x00, 0x0c, 0x36,
}

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_main_31

const unsigned char s390_ft_main_31[]
| static

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_ft_main_64

const unsigned char s390_ft_main_64[]
| static

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

Referenced by s390_install_fast_tracepoint_jump_pad().

## ◆ s390_regmap

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 54 of file linux-s390-low.c.

## ◆ s390_regmap_3264

int s390_regmap_3264[]
| static

Initial value:
= {
PT_PSWMASK, PT_PSWADDR,
-1, PT_GPR0, -1, PT_GPR1,
-1, PT_GPR2, -1, PT_GPR3,
-1, PT_GPR4, -1, PT_GPR5,
-1, PT_GPR6, -1, PT_GPR7,
-1, PT_GPR8, -1, PT_GPR9,
-1, PT_GPR10, -1, PT_GPR11,
-1, PT_GPR12, -1, PT_GPR13,
-1, PT_GPR14, -1, 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 114 of file linux-s390-low.c.

## ◆ s390_regsets

struct regset_info s390_regsets[]
| static

Initial value:
= {
{ 0, 0, 0, 0, GENERAL_REGS, s390_fill_gregset, NULL },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_HIGH_GPRS, 0,
EXTENDED_REGS, s390_fill_gprs_high, s390_store_gprs_high },
{ PTRACE_GETREGSET, -1, NT_S390_LAST_BREAK, 0, EXTENDED_REGS,
NULL, s390_store_last_break },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_SYSTEM_CALL, 0,
EXTENDED_REGS, s390_fill_system_call, s390_store_system_call },
{ PTRACE_GETREGSET, -1, NT_S390_TDB, 0, EXTENDED_REGS,
NULL, s390_store_tdb },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_LOW, 0,
EXTENDED_REGS, s390_fill_vxrs_low, s390_store_vxrs_low },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_VXRS_HIGH, 0,
EXTENDED_REGS, s390_fill_vxrs_high, s390_store_vxrs_high },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_GS_CB, 0,
EXTENDED_REGS, s390_fill_gs, s390_store_gs },
{ PTRACE_GETREGSET, PTRACE_SETREGSET, NT_S390_GS_BC, 0,
EXTENDED_REGS, s390_fill_gsbc, s390_store_gsbc },
NULL_REGSET
}
s390_store_system_call
static void s390_store_system_call(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:318
s390_store_gsbc
static void s390_store_gsbc(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:408
s390_fill_gprs_high
static void s390_fill_gprs_high(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:282
s390_store_tdb
static void s390_store_tdb(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:324
s390_fill_vxrs_high
static void s390_fill_vxrs_high(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:358
s390_fill_system_call
static void s390_fill_system_call(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:312
s390_store_gprs_high
static void s390_store_gprs_high(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:292
s390_store_vxrs_high
static void s390_store_vxrs_high(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:368
PTRACE_SETREGSET
#define PTRACE_SETREGSET
Definition: linux-ptrace.h:51
PTRACE_GETREGSET
#define PTRACE_GETREGSET
Definition: linux-ptrace.h:47
s390_fill_gsbc
static void s390_fill_gsbc(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:398
s390_store_last_break
static void s390_store_last_break(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:303
s390_store_vxrs_low
static void s390_store_vxrs_low(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:348
s390_fill_vxrs_low
static void s390_fill_vxrs_low(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:338
s390_fill_gs
static void s390_fill_gs(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:378
s390_fill_gregset
static void s390_fill_gregset(struct regcache *regcache, void *buf)
Definition: linux-s390-low.c:261
s390_store_gs
static void s390_store_gs(struct regcache *regcache, const void *buf)
Definition: linux-s390-low.c:388

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

Referenced by s390_arch_setup().

## ◆ s390_regsets_info

struct regsets_info s390_regsets_info
| static

Initial value:
=
{
s390_regsets,
0,
NULL,
}
s390_regsets
static struct regset_info s390_regsets[]
Definition: linux-s390-low.c:417

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

Referenced by initialize_low_arch().

## ◆ s390_regsets_info_3264

struct regsets_info s390_regsets_info_3264
| static

Initial value:
=
{
s390_regsets,
0,
NULL,
}
s390_regsets
static struct regset_info s390_regsets[]
Definition: linux-s390-low.c:417

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

Referenced by initialize_low_arch().

## ◆ s390_usrregs_info

struct usrregs_info s390_usrregs_info
| static

Initial value:
=
{
s390_num_regs,
s390_regmap,
}
s390_regmap
static int s390_regmap[]
Definition: linux-s390-low.c:54
s390_num_regs
#define s390_num_regs
Definition: linux-s390-low.c:52

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

## ◆ s390_usrregs_info_3264

struct usrregs_info s390_usrregs_info_3264
| static

Initial value:
=
{
s390_num_regs_3264,
s390_regmap_3264
}
s390_num_regs_3264
#define s390_num_regs_3264
Definition: linux-s390-low.c:84
s390_regmap_3264
static int s390_regmap_3264[]
Definition: linux-s390-low.c:114

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

## ◆ the_low_target

struct linux_target_ops the_low_target

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

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