GDBserver

Classes | Macros | Functions | Variables
linux-ppc-low.c File Reference
`#include "server.h"`
`#include "linux-low.h"`
`#include <elf.h>`
`#include <asm/ptrace.h>`
`#include "nat/ppc-linux.h"`
`#include "linux-ppc-tdesc.h"`
`#include "ax.h"`
`#include "tracepoint.h"`

Go to the source code of this file.

## Classes
struct | gdb_evrregset_t

## Macros
#define | PPC_FIELD(value, from, len) (((value) >> (32 - (from) - (len))) & ((1 << (len)) - 1))
#define | PPC_SEXT(v, bs)
#define | PPC_OP6(insn) PPC_FIELD (insn, 0, 6)
#define | PPC_BO(insn) PPC_FIELD (insn, 6, 5)
#define | PPC_LI(insn) (PPC_SEXT (PPC_FIELD (insn, 6, 24), 24) << 2)
#define | PPC_BD(insn) (PPC_SEXT (PPC_FIELD (insn, 16, 14), 14) << 2)
#define | ppc_num_regs 73
#define | INSTR_SC 0x44000002
#define | NR_spu_run 0x0116
#define | ppc_breakpoint_len 4
#define | SIZEOF_VSXREGS 32*8
#define | SIZEOF_VRREGS 33*16+4
#define | GEN_STD(buf, rs, ra, offset) gen_ds_form (buf, 62, rs, ra, offset, 0)
#define | GEN_STDU(buf, rs, ra, offset) gen_ds_form (buf, 62, rs, ra, offset, 1)
#define | GEN_LD(buf, rt, ra, offset) gen_ds_form (buf, 58, rt, ra, offset, 0)
#define | GEN_LDU(buf, rt, ra, offset) gen_ds_form (buf, 58, rt, ra, offset, 1)
#define | GEN_ADDI(buf, rt, ra, si) gen_d_form (buf, 14, rt, ra, si)
#define | GEN_ADDIS(buf, rt, ra, si) gen_d_form (buf, 15, rt, ra, si)
#define | GEN_LI(buf, rt, si) GEN_ADDI (buf, rt, 0, si)
#define | GEN_LIS(buf, rt, si) GEN_ADDIS (buf, rt, 0, si)
#define | GEN_ORI(buf, rt, ra, si) gen_d_form (buf, 24, rt, ra, si)
#define | GEN_ORIS(buf, rt, ra, si) gen_d_form (buf, 25, rt, ra, si)
#define | GEN_LWZ(buf, rt, ra, si) gen_d_form (buf, 32, rt, ra, si)
#define | GEN_STW(buf, rt, ra, si) gen_d_form (buf, 36, rt, ra, si)
#define | GEN_STWU(buf, rt, ra, si) gen_d_form (buf, 37, rt, ra, si)
#define | GEN_MFSPR(buf, rt, spr) gen_xfx_form (buf, 31, rt, spr, 339)
#define | GEN_MTSPR(buf, rt, spr) gen_xfx_form (buf, 31, rt, spr, 467)
#define | GEN_MFCR(buf, rt) gen_xfx_form (buf, 31, rt, 0, 19)
#define | GEN_MTCR(buf, rt) gen_xfx_form (buf, 31, rt, 0x3cf, 144)
#define | GEN_SYNC(buf, L, E)
#define | GEN_LWSYNC(buf) GEN_SYNC (buf, 1, 0)
#define | GEN_OR(buf, ra, rs, rb) gen_x_form (buf, 31, rs, ra, rb, 444, 0)
#define | GEN_MR(buf, ra, rs) GEN_OR (buf, ra, rs, rs)
#define | GEN_LWARX(buf, rt, ra, rb) gen_x_form (buf, 31, rt, ra, rb, 20, 0)
#define | GEN_STWCX(buf, rs, ra, rb) gen_x_form (buf, 31, rs, ra, rb, 150, 1)
#define | GEN_CMPW(buf, ra, rb) gen_x_form (buf, 31, 28, ra, rb, 0, 0)
#define | GEN_RLDICL(buf, ra, rs, sh, mb) gen_md_form (buf, 30, rs, ra, sh, mb, 0, 0)
#define | GEN_RLDICR(buf, ra, rs, sh, mb) gen_md_form (buf, 30, rs, ra, sh, mb, 1, 0)
#define | GEN_B(buf, li) gen_i_form (buf, 18, li, 0, 0)
#define | GEN_BL(buf, li) gen_i_form (buf, 18, li, 0, 1)
#define | GEN_BNE(buf, bd) gen_b_form (buf, 16, 0x4, (7 << 2) | 2, bd, 0 ,0)
#define | GEN_LOAD(buf, rt, ra, si, is_64) GEN_LWZ (buf, rt, ra, si)
#define | GEN_STORE(buf, rt, ra, si, is_64) GEN_STW (buf, rt, ra, si)
#define | __EMIT_ASM(NAME, INSNS)
#define | _EMIT_ASM(NAME, INSNS) __EMIT_ASM (NAME, INSNS)
#define | EMIT_ASM(INSNS) _EMIT_ASM (__LINE__, INSNS)
#define | TOP_FIRST "4"
#define | TOP_SECOND "3"
#define | TMP_FIRST "6"
#define | TMP_SECOND "5"

## Functions
static int | ppc_cannot_store_register (int regno)
static int | ppc_cannot_fetch_register (int regno)
static void | ppc_collect_ptrace_register (struct regcache *regcache, int regno, char *buf)
static void | ppc_supply_ptrace_register (struct regcache *regcache, int regno, const char *buf)
static int | parse_spufs_run (struct regcache *regcache, int *fd, CORE_ADDR *addr)
static CORE_ADDR | ppc_get_pc (struct regcache *regcache)
static void | ppc_set_pc (struct regcache *regcache, CORE_ADDR pc)
static int | ppc_get_auxv (unsigned long type, unsigned long *valp)
static const gdb_byte * | ppc_sw_breakpoint_from_kind (int kind, int *size)
static int | ppc_breakpoint_at (CORE_ADDR where)
static int | ppc_supports_z_point_type (char z_type)
static int | ppc_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static int | ppc_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int size, struct raw_breakpoint *bp)
static void | ppc_fill_gregset (struct regcache *regcache, void *buf)
static void | ppc_fill_vsxregset (struct regcache *regcache, void *buf)
static void | ppc_store_vsxregset (struct regcache *regcache, const void *buf)
static void | ppc_fill_vrregset (struct regcache *regcache, void *buf)
static void | ppc_store_vrregset (struct regcache *regcache, const void *buf)
static void | ppc_fill_evrregset (struct regcache *regcache, void *buf)
static void | ppc_store_evrregset (struct regcache *regcache, const void *buf)
static int | ppc_supports_hardware_single_step (void)
static const struct regs_info * | ppc_regs_info (void)
static void | ppc_arch_setup (void)
static int | ppc_supports_tracepoints (void)
static int | ppc_get_thread_area (int lwpid, CORE_ADDR *addr)
| __attribute__ ((unused))
static int | gen_d_form (uint32_t *buf, int opcd, int rst, int ra, int si)
static int | gen_xfx_form (uint32_t *buf, int opcd, int rst, int ri, int xo)
static int | gen_x_form (uint32_t *buf, int opcd, int rst, int ra, int rb, int xo, int rc)
static int | gen_md_form (uint32_t *buf, int opcd, int rs, int ra, int sh, int mb, int xo, int rc)
static int | gen_i_form (uint32_t *buf, int opcd, int li, int aa, int lk)
static int | gen_b_form (uint32_t *buf, int opcd, int bo, int bi, int bd, int aa, int lk)
static int | gen_limm (uint32_t *buf, int reg, uint64_t imm, int is_64)
static int | gen_atomic_xchg (uint32_t *buf, CORE_ADDR lock, int old_value, int r_new, int is_64)
static int | gen_call (uint32_t *buf, CORE_ADDR fn, int is_64, int is_opd)
static void | ppc_relocate_instruction (CORE_ADDR *to, CORE_ADDR oldloc)
static int | ppc_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 | ppc_get_min_fast_tracepoint_insn_len (void)
static void | emit_insns (uint32_t *buf, int n)
static void | ppc_emit_prologue (void)
static void | ppc_emit_epilogue (void)
static void | ppc_emit_add (void)
static void | ppc_emit_sub (void)
static void | ppc_emit_mul (void)
static void | ppc_emit_lsh (void)
static void | ppc_emit_rsh_signed (void)
static void | ppc_emit_rsh_unsigned (void)
static void | ppc_emit_ext (int arg)
static void | ppc_emit_zero_ext (int arg)
static void | ppc_emit_log_not (void)
static void | ppc_emit_bit_and (void)
static void | ppc_emit_bit_or (void)
static void | ppc_emit_bit_xor (void)
static void | ppc_emit_bit_not (void)
static void | ppc_emit_equal (void)
static void | ppc_emit_less_signed (void)
static void | ppc_emit_less_unsigned (void)
static void | ppc_emit_ref (int size)
static void | ppc_emit_const (LONGEST num)
static void | ppc_emit_reg (int reg)
static void | ppc_emit_pop (void)
static void | ppc_emit_stack_flush (void)
static void | ppc_emit_swap (void)
static void | ppc_emit_stack_adjust (int n)
static void | ppc_emit_call (CORE_ADDR fn)
static void | ppc_emit_int_call_1 (CORE_ADDR fn, int arg1)
static void | ppc_emit_void_call_2 (CORE_ADDR fn, int arg1)
static void | ppc_emit_if_goto (int *offset_p, int *size_p)
static void | ppc_emit_goto (int *offset_p, int *size_p)
static void | ppc_emit_eq_goto (int *offset_p, int *size_p)
static void | ppc_emit_ne_goto (int *offset_p, int *size_p)
static void | ppc_emit_lt_goto (int *offset_p, int *size_p)
static void | ppc_emit_le_goto (int *offset_p, int *size_p)
static void | ppc_emit_gt_goto (int *offset_p, int *size_p)
static void | ppc_emit_ge_goto (int *offset_p, int *size_p)
static void | ppc_write_goto_address (CORE_ADDR from, CORE_ADDR to, int size)
static struct emit_ops * | ppc_emit_ops (void)
static int | ppc_get_ipa_tdesc_idx (void)
void | initialize_low_arch (void)

## Variables
static unsigned long | ppc_hwcap
static int | ppc_regmap []
static int | ppc_regmap_e500 []
static int | ppc_regmap_adjusted
static const unsigned int | ppc_breakpoint = 0x7d821008
static struct regset_info | ppc_regsets []
static struct usrregs_info | ppc_usrregs_info
static struct regsets_info | ppc_regsets_info
static struct regs_info | regs_info
static struct emit_ops | ppc_emit_ops_impl
struct linux_target_ops | the_low_target

## Macro Definition Documentation

## ◆ __EMIT_ASM

#define __EMIT_ASM | ( |  | NAME,
|  |  | INSNS
| ) |  |

Value:
do \
{ \
extern uint32_t start_bcax_ ## NAME []; \
extern uint32_t end_bcax_ ## NAME []; \
emit_insns (start_bcax_ ## NAME, \
end_bcax_ ## NAME - start_bcax_ ## NAME); \
__asm__ (".section .text.__ppcbcax\n\t" \
"start_bcax_" #NAME ":\n\t" \
INSNS "\n\t" \
"end_bcax_" #NAME ":\n\t" \
".previous\n\t"); \
} while (0)

Definition at line 1477 of file linux-ppc-low.c.

## ◆ _EMIT_ASM

#define _EMIT_ASM | ( |  | NAME,
|  |  | INSNS
| ) |  | __EMIT_ASM (NAME, INSNS)

Definition at line 1491 of file linux-ppc-low.c.

## ◆ EMIT_ASM

#define EMIT_ASM | ( |  | INSNS | ) | _EMIT_ASM (__LINE__, INSNS)

Definition at line 1492 of file linux-ppc-low.c.

Referenced by ppc_emit_add(), ppc_emit_bit_and(), ppc_emit_bit_not(), ppc_emit_bit_or(), ppc_emit_bit_xor(), ppc_emit_epilogue(), ppc_emit_eq_goto(), ppc_emit_equal(), ppc_emit_ext(), ppc_emit_ge_goto(), ppc_emit_goto(), ppc_emit_gt_goto(), ppc_emit_if_goto(), ppc_emit_int_call_1(), ppc_emit_le_goto(), ppc_emit_less_signed(), ppc_emit_less_unsigned(), ppc_emit_log_not(), ppc_emit_lsh(), ppc_emit_lt_goto(), ppc_emit_mul(), ppc_emit_ne_goto(), ppc_emit_pop(), ppc_emit_prologue(), ppc_emit_ref(), ppc_emit_reg(), ppc_emit_rsh_signed(), ppc_emit_rsh_unsigned(), ppc_emit_stack_flush(), ppc_emit_sub(), ppc_emit_swap(), and ppc_emit_zero_ext().

## ◆ GEN_ADDI

#define GEN_ADDI | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 14, rt, ra, si)

Definition at line 834 of file linux-ppc-low.c.

Referenced by ppc_emit_stack_adjust(), and ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_ADDIS

#define GEN_ADDIS | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 15, rt, ra, si)

Definition at line 835 of file linux-ppc-low.c.

## ◆ GEN_B

#define GEN_B | ( |  | buf,
|  |  | li
| ) |  | gen_i_form (buf, 18, li, 0, 0)

Definition at line 962 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_BL

#define GEN_BL | ( |  | buf,
|  |  | li
| ) |  | gen_i_form (buf, 18, li, 0, 1)

Definition at line 963 of file linux-ppc-low.c.

## ◆ GEN_BNE

#define GEN_BNE | ( |  | buf,
|  |  | bd
| ) |  | gen_b_form (buf, 16, 0x4, (7 << 2) | 2, bd, 0 ,0)

Definition at line 987 of file linux-ppc-low.c.

Referenced by gen_atomic_xchg().

## ◆ GEN_CMPW

#define GEN_CMPW | ( |  | buf,
|  |  | ra,
|  |  | rb
| ) |  | gen_x_form (buf, 31, 28, ra, rb, 0, 0)

Definition at line 905 of file linux-ppc-low.c.

Referenced by gen_atomic_xchg().

## ◆ GEN_LD

#define GEN_LD | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | offset
| ) |  | gen_ds_form (buf, 58, rt, ra, offset, 0)

Definition at line 810 of file linux-ppc-low.c.

## ◆ GEN_LDU

#define GEN_LDU | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | offset
| ) |  | gen_ds_form (buf, 58, rt, ra, offset, 1)

Definition at line 811 of file linux-ppc-low.c.

## ◆ GEN_LI

#define GEN_LI | ( |  | buf,
|  |  | rt,
|  |  | si
| ) |  | GEN_ADDI (buf, rt, 0, si)

Definition at line 836 of file linux-ppc-low.c.

Referenced by gen_limm(), and ppc_emit_reg().

## ◆ GEN_LIS

#define GEN_LIS | ( |  | buf,
|  |  | rt,
|  |  | si
| ) |  | GEN_ADDIS (buf, rt, 0, si)

Definition at line 837 of file linux-ppc-low.c.

Referenced by gen_limm().

## ◆ GEN_LOAD

#define GEN_LOAD | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si,
|  |  | is_64
| ) |  | GEN_LWZ (buf, rt, ra, si)

Definition at line 1001 of file linux-ppc-low.c.

Referenced by gen_call(), and ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_LWARX

#define GEN_LWARX | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | rb
| ) |  | gen_x_form (buf, 31, rt, ra, rb, 20, 0)

Definition at line 902 of file linux-ppc-low.c.

Referenced by gen_atomic_xchg().

## ◆ GEN_LWSYNC

#define GEN_LWSYNC | ( |  | buf | ) | GEN_SYNC (buf, 1, 0)

Definition at line 873 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_LWZ

#define GEN_LWZ | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 32, rt, ra, si)

Definition at line 840 of file linux-ppc-low.c.

Referenced by ppc_emit_reg(), and ppc_emit_void_call_2().

## ◆ GEN_MFCR

#define GEN_MFCR | ( |  | buf,
|  |  | rt
| ) |  | gen_xfx_form (buf, 31, rt, 0, 19)

Definition at line 869 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_MFSPR

#define GEN_MFSPR | ( |  | buf,
|  |  | rt,
|  |  | spr
| ) |  | gen_xfx_form (buf, 31, rt, spr, 339)

Definition at line 867 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_MR

#define GEN_MR | ( |  | buf,
|  |  | ra,
|  |  | rs
| ) |  | GEN_OR (buf, ra, rs, rs)

Definition at line 901 of file linux-ppc-low.c.

Referenced by ppc_emit_void_call_2().

## ◆ GEN_MTCR

#define GEN_MTCR | ( |  | buf,
|  |  | rt
| ) |  | gen_xfx_form (buf, 31, rt, 0x3cf, 144)

Definition at line 870 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_MTSPR

#define GEN_MTSPR | ( |  | buf,
|  |  | rt,
|  |  | spr
| ) |  | gen_xfx_form (buf, 31, rt, spr, 467)

Definition at line 868 of file linux-ppc-low.c.

Referenced by gen_call(), and ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_OR

#define GEN_OR | ( |  | buf,
|  |  | ra,
|  |  | rs,
|  |  | rb
| ) |  | gen_x_form (buf, 31, rs, ra, rb, 444, 0)

Definition at line 900 of file linux-ppc-low.c.

## ◆ GEN_ORI

#define GEN_ORI | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 24, rt, ra, si)

Definition at line 838 of file linux-ppc-low.c.

Referenced by gen_limm().

## ◆ GEN_ORIS

#define GEN_ORIS | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 25, rt, ra, si)

Definition at line 839 of file linux-ppc-low.c.

Referenced by gen_limm().

## ◆ GEN_RLDICL

#define GEN_RLDICL | ( |  | buf,
|  |  | ra,
|  |  | rs,
|  |  | sh,
|  |  | mb
| ) |  | gen_md_form (buf, 30, rs, ra, sh, mb, 0, 0)

Definition at line 938 of file linux-ppc-low.c.

Referenced by gen_limm().

## ◆ GEN_RLDICR

#define GEN_RLDICR | ( |  | buf,
|  |  | ra,
|  |  | rs,
|  |  | sh,
|  |  | mb
| ) |  | gen_md_form (buf, 30, rs, ra, sh, mb, 1, 0)

Definition at line 940 of file linux-ppc-low.c.

Referenced by gen_limm().

## ◆ GEN_STD

#define GEN_STD | ( |  | buf,
|  |  | rs,
|  |  | ra,
|  |  | offset
| ) |  | gen_ds_form (buf, 62, rs, ra, offset, 0)

Definition at line 808 of file linux-ppc-low.c.

## ◆ GEN_STDU

#define GEN_STDU | ( |  | buf,
|  |  | rs,
|  |  | ra,
|  |  | offset
| ) |  | gen_ds_form (buf, 62, rs, ra, offset, 1)

Definition at line 809 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_STORE

#define GEN_STORE | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si,
|  |  | is_64
| ) |  | GEN_STW (buf, rt, ra, si)

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

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_STW

#define GEN_STW | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 36, rt, ra, si)

Definition at line 841 of file linux-ppc-low.c.

Referenced by ppc_emit_void_call_2().

## ◆ GEN_STWCX

#define GEN_STWCX | ( |  | buf,
|  |  | rs,
|  |  | ra,
|  |  | rb
| ) |  | gen_x_form (buf, 31, rs, ra, rb, 150, 1)

Definition at line 903 of file linux-ppc-low.c.

Referenced by gen_atomic_xchg().

## ◆ GEN_STWU

#define GEN_STWU | ( |  | buf,
|  |  | rt,
|  |  | ra,
|  |  | si
| ) |  | gen_d_form (buf, 37, rt, ra, si)

Definition at line 842 of file linux-ppc-low.c.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ GEN_SYNC

#define GEN_SYNC | ( |  | buf,
|  |  | L,
|  |  | E
| ) |  |

Value:
gen_xfx_form (buf, 31, L & 0x3, \
E & 0xf, 598)
x3
static const struct aarch64_register x3
Definition: linux-aarch64-low.c:618
gen_xfx_form
static int gen_xfx_form(uint32_t *buf, int opcd, int rst, int ri, int xo)
Definition: linux-ppc-low.c:851

Definition at line 871 of file linux-ppc-low.c.

## ◆ INSTR_SC

#define INSTR_SC 0x44000002

Definition at line 195 of file linux-ppc-low.c.

Referenced by parse_spufs_run().

## ◆ NR_spu_run

#define NR_spu_run 0x0116

Definition at line 196 of file linux-ppc-low.c.

Referenced by parse_spufs_run().

## ◆ PPC_BD

#define PPC_BD | ( |  | insn | ) | (PPC_SEXT (PPC_FIELD (insn, 16, 14), 14) << 2)

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

Referenced by ppc_relocate_instruction().

## ◆ PPC_BO

#define PPC_BO | ( |  | insn | ) | PPC_FIELD (insn, 6, 5)

Definition at line 38 of file linux-ppc-low.c.

Referenced by ppc_relocate_instruction().

## ◆ ppc_breakpoint_len

#define ppc_breakpoint_len 4

Definition at line 343 of file linux-ppc-low.c.

Referenced by ppc_sw_breakpoint_from_kind().

## ◆ PPC_FIELD

#define PPC_FIELD | ( |  | value,
|  |  | from,
|  |  | len
| ) |  | (((value) >> (32 - (from) - (len))) & ((1 << (len)) - 1))

Definition at line 31 of file linux-ppc-low.c.

## ◆ PPC_LI

#define PPC_LI | ( |  | insn | ) | (PPC_SEXT (PPC_FIELD (insn, 6, 24), 24) << 2)

Definition at line 39 of file linux-ppc-low.c.

Referenced by ppc_relocate_instruction().

## ◆ ppc_num_regs

#define ppc_num_regs 73

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

## ◆ PPC_OP6

#define PPC_OP6 | ( |  | insn | ) | PPC_FIELD (insn, 0, 6)

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

Referenced by ppc_relocate_instruction().

## ◆ PPC_SEXT

#define PPC_SEXT | ( |  | v,
|  |  | bs
| ) |  |

Value:
((((CORE_ADDR) (v) & (((CORE_ADDR) 1 << (bs)) - 1)) \
^ ((CORE_ADDR) 1 << ((bs) - 1))) \
- ((CORE_ADDR) 1 << ((bs) - 1)))
CORE_ADDR
bfd_vma CORE_ADDR
Definition: common-types.h:41

Definition at line 33 of file linux-ppc-low.c.

## ◆ SIZEOF_VRREGS

#define SIZEOF_VRREGS 33*16+4

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

## ◆ SIZEOF_VSXREGS

#define SIZEOF_VSXREGS 32*8

Definition at line 460 of file linux-ppc-low.c.

## ◆ TMP_FIRST

#define TMP_FIRST "6"

Definition at line 1543 of file linux-ppc-low.c.

Referenced by ppc_emit_add(), ppc_emit_bit_and(), ppc_emit_bit_or(), ppc_emit_bit_xor(), ppc_emit_eq_goto(), ppc_emit_equal(), ppc_emit_ge_goto(), ppc_emit_gt_goto(), ppc_emit_le_goto(), ppc_emit_less_signed(), ppc_emit_less_unsigned(), ppc_emit_lsh(), ppc_emit_lt_goto(), ppc_emit_mul(), ppc_emit_ne_goto(), ppc_emit_rsh_signed(), ppc_emit_rsh_unsigned(), ppc_emit_sub(), and ppc_emit_swap().

## ◆ TMP_SECOND

#define TMP_SECOND "5"

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

Referenced by ppc_emit_add(), ppc_emit_bit_and(), ppc_emit_bit_or(), ppc_emit_bit_xor(), ppc_emit_eq_goto(), ppc_emit_equal(), ppc_emit_ge_goto(), ppc_emit_gt_goto(), ppc_emit_le_goto(), ppc_emit_less_signed(), ppc_emit_less_unsigned(), ppc_emit_lsh(), ppc_emit_lt_goto(), ppc_emit_mul(), ppc_emit_ne_goto(), ppc_emit_rsh_signed(), ppc_emit_rsh_unsigned(), ppc_emit_sub(), and ppc_emit_swap().

## ◆ TOP_FIRST

#define TOP_FIRST "4"

Definition at line 1541 of file linux-ppc-low.c.

Referenced by ppc_emit_epilogue(), ppc_emit_eq_goto(), ppc_emit_ge_goto(), ppc_emit_gt_goto(), ppc_emit_if_goto(), ppc_emit_le_goto(), ppc_emit_lt_goto(), ppc_emit_ne_goto(), ppc_emit_pop(), ppc_emit_stack_flush(), and ppc_emit_swap().

## ◆ TOP_SECOND

#define TOP_SECOND "3"

Definition at line 1542 of file linux-ppc-low.c.

Referenced by ppc_emit_epilogue(), ppc_emit_eq_goto(), ppc_emit_ge_goto(), ppc_emit_gt_goto(), ppc_emit_if_goto(), ppc_emit_le_goto(), ppc_emit_lt_goto(), ppc_emit_ne_goto(), ppc_emit_pop(), ppc_emit_stack_flush(), and ppc_emit_swap().

## Function Documentation

## ◆ __attribute__()

__attribute__ | ( | (unused) |  | ) |

Definition at line 790 of file linux-ppc-low.c.

References gdb_assert, and x3.

## ◆ emit_insns()

static void emit_insns | ( | uint32_t * | buf,
|  | int | n
| ) |  |
| static

Definition at line 1470 of file linux-ppc-low.c.

References current_insn_ptr, and write_inferior_memory().

Referenced by ppc_emit_call(), ppc_emit_const(), ppc_emit_int_call_1(), ppc_emit_reg(), ppc_emit_stack_adjust(), and ppc_emit_void_call_2().

## ◆ gen_atomic_xchg()

static int gen_atomic_xchg | ( | uint32_t * | buf,
|  | CORE_ADDR | lock,
|  | int | old_value,
|  | int | r_new,
|  | int | is_64
| ) |  |
| static

Definition at line 1057 of file linux-ppc-low.c.

References GEN_BNE, GEN_CMPW, gen_limm(), GEN_LWARX, and GEN_STWCX.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ gen_b_form()

static int gen_b_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | bo,
|  | int | bi,
|  | int | bd,
|  | int | aa,
|  | int | lk
| ) |  |
| static

Definition at line 971 of file linux-ppc-low.c.

References gdb_assert.

## ◆ gen_call()

static int gen_call | ( | uint32_t * | buf,
|  | CORE_ADDR | fn,
|  | int | is_64,
|  | int | is_opd
| ) |  |
| static

Definition at line 1088 of file linux-ppc-low.c.

References gen_limm(), GEN_LOAD, and GEN_MTSPR.

Referenced by ppc_emit_call(), ppc_emit_int_call_1(), ppc_emit_reg(), ppc_emit_void_call_2(), and ppc_install_fast_tracepoint_jump_pad().

## ◆ gen_d_form()

static int gen_d_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | rst,
|  | int | ra,
|  | int | si
| ) |  |
| static

Definition at line 819 of file linux-ppc-low.c.

References gdb_assert.

## ◆ gen_i_form()

static int gen_i_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | li,
|  | int | aa,
|  | int | lk
| ) |  |
| static

Definition at line 949 of file linux-ppc-low.c.

References gdb_assert.

## ◆ gen_limm()

static int gen_limm | ( | uint32_t * | buf,
|  | int | reg,
|  | uint64_t | imm,
|  | int | is_64
| ) |  |
| static

Definition at line 1009 of file linux-ppc-low.c.

References gdb_assert, GEN_LI, GEN_LIS, GEN_ORI, GEN_ORIS, GEN_RLDICL, and GEN_RLDICR.

Referenced by gen_atomic_xchg(), gen_call(), ppc_emit_const(), ppc_emit_int_call_1(), ppc_emit_void_call_2(), and ppc_install_fast_tracepoint_jump_pad().

## ◆ gen_md_form()

static int gen_md_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | rs,
|  | int | ra,
|  | int | sh,
|  | int | mb,
|  | int | xo,
|  | int | rc
| ) |  |
| static

Definition at line 914 of file linux-ppc-low.c.

References gdb_assert, and x1.

## ◆ gen_x_form()

static int gen_x_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | rst,
|  | int | ra,
|  | int | rb,
|  | int | xo,
|  | int | rc
| ) |  |
| static

Definition at line 882 of file linux-ppc-low.c.

References gdb_assert.

## ◆ gen_xfx_form()

static int gen_xfx_form | ( | uint32_t * | buf,
|  | int | opcd,
|  | int | rst,
|  | int | ri,
|  | int | xo
| ) |  |
| static

Definition at line 851 of file linux-ppc-low.c.

References gdb_assert.

## ◆ initialize_low_arch()

void initialize_low_arch | ( | void |  | ) |

Definition at line 3146 of file linux-ppc-low.c.

References init_registers_powerpc_32l(), init_registers_powerpc_altivec32l(), init_registers_powerpc_cell32l(), init_registers_powerpc_e500l(), init_registers_powerpc_isa205_32l(), init_registers_powerpc_isa205_altivec32l(), init_registers_powerpc_isa205_vsx32l(), init_registers_powerpc_vsx32l(), and ppc_regsets_info.

## ◆ parse_spufs_run()

static int parse_spufs_run | ( | struct regcache * | regcache,
|  | int * | fd,
|  | CORE_ADDR * | addr
| ) |  |
| static

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

References collect_register_by_name(), INSTR_SC, NR_spu_run, target_ops::read_memory, register_size(), regcache::tdesc, and the_target.

Referenced by ppc_get_pc(), and ppc_set_pc().

## ◆ ppc_arch_setup()

static void ppc_arch_setup | ( | void |  | ) |
| static

Definition at line 617 of file linux-ppc-low.c.

References collect_register_by_name(), current_process(), fetch_inferior_registers, find_regno(), free_register_cache(), new_register_cache(), PPC_FEATURE_CELL, PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_DFP, PPC_FEATURE_HAS_SPE, PPC_FEATURE_HAS_VSX, ppc_get_auxv(), ppc_hwcap, ppc_regmap, ppc_regmap_adjusted, ppc_regmap_e500, ppc_usrregs_info, register_size(), usrregs_info::regmap, regcache::tdesc, process_info::tdesc, tdesc_powerpc_32l, tdesc_powerpc_altivec32l, tdesc_powerpc_cell32l, tdesc_powerpc_e500l, tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_vsx32l, and tdesc_powerpc_vsx32l.

## ◆ ppc_breakpoint_at()

static int ppc_breakpoint_at | ( | CORE_ADDR | where | ) |
| static

Definition at line 355 of file linux-ppc-low.c.

References ppc_breakpoint, target_ops::qxfer_spu, target_ops::read_memory, and the_target.

## ◆ ppc_cannot_fetch_register()

static int ppc_cannot_fetch_register | ( | int | regno | ) |
| static

Definition at line 138 of file linux-ppc-low.c.

## ◆ ppc_cannot_store_register()

static int ppc_cannot_store_register | ( | int | regno | ) |
| static

Definition at line 118 of file linux-ppc-low.c.

References current_process(), find_regno(), PPC_FEATURE_HAS_SPE, ppc_hwcap, and process_info::tdesc.

## ◆ ppc_collect_ptrace_register()

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

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

References collect_register(), memset(), perror_with_name(), register_size(), and regcache::tdesc.

Referenced by ppc_fill_gregset().

## ◆ ppc_emit_add()

static void ppc_emit_add | ( | void |  | ) |
| static

Definition at line 1601 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_bit_and()

static void ppc_emit_bit_and | ( | void |  | ) |
| static

Definition at line 1753 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_bit_not()

static void ppc_emit_bit_not | ( | void |  | ) |
| static

Definition at line 1787 of file linux-ppc-low.c.

References EMIT_ASM.

## ◆ ppc_emit_bit_or()

static void ppc_emit_bit_or | ( | void |  | ) |
| static

Definition at line 1764 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_bit_xor()

static void ppc_emit_bit_xor | ( | void |  | ) |
| static

Definition at line 1775 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_call()

static void ppc_emit_call | ( | CORE_ADDR | fn | ) |
| static

Definition at line 1983 of file linux-ppc-low.c.

References emit_insns(), gdb_assert, and gen_call().

## ◆ ppc_emit_const()

static void ppc_emit_const | ( | LONGEST | num | ) |
| static

Definition at line 1880 of file linux-ppc-low.c.

References emit_insns(), gdb_assert, and gen_limm().

## ◆ ppc_emit_epilogue()

static void ppc_emit_epilogue | ( | void |  | ) |
| static

Definition at line 1579 of file linux-ppc-low.c.

References EMIT_ASM, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_eq_goto()

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

Definition at line 2097 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_equal()

static void ppc_emit_equal | ( | void |  | ) |
| static

Definition at line 1796 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_ext()

static void ppc_emit_ext | ( | int | arg | ) |
| static

Definition at line 1695 of file linux-ppc-low.c.

References EMIT_ASM, and emit_error.

## ◆ ppc_emit_ge_goto()

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

Definition at line 2206 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_goto()

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

Definition at line 2084 of file linux-ppc-low.c.

References EMIT_ASM.

## ◆ ppc_emit_gt_goto()

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

Definition at line 2183 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_if_goto()

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

Definition at line 2068 of file linux-ppc-low.c.

References EMIT_ASM, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_int_call_1()

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

Definition at line 1999 of file linux-ppc-low.c.

References EMIT_ASM, emit_insns(), gdb_assert, gen_call(), and gen_limm().

## ◆ ppc_emit_le_goto()

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

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

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_less_signed()

static void ppc_emit_less_signed | ( | void |  | ) |
| static

Definition at line 1812 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_less_unsigned()

static void ppc_emit_less_unsigned | ( | void |  | ) |
| static

Definition at line 1831 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_log_not()

static void ppc_emit_log_not | ( | void |  | ) |
| static

Definition at line 1742 of file linux-ppc-low.c.

References EMIT_ASM.

## ◆ ppc_emit_lsh()

static void ppc_emit_lsh | ( | void |  | ) |
| static

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

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_lt_goto()

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

Definition at line 2137 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_mul()

static void ppc_emit_mul | ( | void |  | ) |
| static

Definition at line 1623 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_ne_goto()

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

Definition at line 2117 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_ops()

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

Definition at line 3044 of file linux-ppc-low.c.

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

## ◆ ppc_emit_pop()

static void ppc_emit_pop | ( | void |  | ) |
| static

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

References EMIT_ASM, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_prologue()

static void ppc_emit_prologue | ( | void |  | ) |
| static

Definition at line 1555 of file linux-ppc-low.c.

References EMIT_ASM.

## ◆ ppc_emit_ref()

static void ppc_emit_ref | ( | int | size | ) |
| static

Definition at line 1850 of file linux-ppc-low.c.

References EMIT_ASM.

## ◆ ppc_emit_reg()

static void ppc_emit_reg | ( | int | reg | ) |
| static

Definition at line 1896 of file linux-ppc-low.c.

References EMIT_ASM, emit_insns(), gdb_assert, gen_call(), GEN_LI, GEN_LWZ, and get_raw_reg_func_addr().

## ◆ ppc_emit_rsh_signed()

static void ppc_emit_rsh_signed | ( | void |  | ) |
| static

Definition at line 1656 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_rsh_unsigned()

static void ppc_emit_rsh_unsigned | ( | void |  | ) |
| static

Definition at line 1678 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_stack_adjust()

static void ppc_emit_stack_adjust | ( | int | n | ) |
| static

Definition at line 1962 of file linux-ppc-low.c.

References emit_error, emit_insns(), gdb_assert, and GEN_ADDI.

## ◆ ppc_emit_stack_flush()

static void ppc_emit_stack_flush | ( | void |  | ) |
| static

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

References EMIT_ASM, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_sub()

static void ppc_emit_sub | ( | void |  | ) |
| static

Definition at line 1612 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, and TMP_SECOND.

## ◆ ppc_emit_swap()

static void ppc_emit_swap | ( | void |  | ) |
| static

Definition at line 1949 of file linux-ppc-low.c.

References EMIT_ASM, TMP_FIRST, TMP_SECOND, TOP_FIRST, and TOP_SECOND.

## ◆ ppc_emit_void_call_2()

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

Definition at line 2025 of file linux-ppc-low.c.

References emit_insns(), gdb_assert, gen_call(), gen_limm(), GEN_LWZ, GEN_MR, and GEN_STW.

## ◆ ppc_emit_zero_ext()

static void ppc_emit_zero_ext | ( | int | arg | ) |
| static

Definition at line 1718 of file linux-ppc-low.c.

References EMIT_ASM, and emit_error.

## ◆ ppc_fill_evrregset()

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

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

References gdb_evrregset_t::acc, collect_register(), collect_register_by_name(), gdb_evrregset_t::evr, find_regno(), PPC_FEATURE_HAS_SPE, ppc_hwcap, gdb_evrregset_t::spefscr, and regcache::tdesc.

## ◆ ppc_fill_gregset()

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

Definition at line 446 of file linux-ppc-low.c.

References ppc_collect_ptrace_register(), and ppc_regmap.

## ◆ ppc_fill_vrregset()

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

Definition at line 493 of file linux-ppc-low.c.

References collect_register(), collect_register_by_name(), find_regno(), PPC_FEATURE_HAS_ALTIVEC, ppc_hwcap, and regcache::tdesc.

## ◆ ppc_fill_vsxregset()

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

Definition at line 463 of file linux-ppc-low.c.

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

## ◆ ppc_get_auxv()

static int ppc_get_auxv | ( | unsigned long | type,
|  | unsigned long * | valp
| ) |  |
| static

Definition at line 299 of file linux-ppc-low.c.

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

Referenced by ppc_arch_setup().

## ◆ ppc_get_ipa_tdesc_idx()

static int ppc_get_ipa_tdesc_idx | ( | void |  | ) |
| static

Definition at line 3063 of file linux-ppc-low.c.

References current_thread, get_thread_regcache(), PPC_TDESC_ALTIVEC, PPC_TDESC_BASE, PPC_TDESC_CELL, PPC_TDESC_E500, PPC_TDESC_ISA205, PPC_TDESC_ISA205_ALTIVEC, PPC_TDESC_ISA205_VSX, PPC_TDESC_VSX, regcache::tdesc, tdesc_powerpc_32l, tdesc_powerpc_altivec32l, tdesc_powerpc_cell32l, tdesc_powerpc_e500l, tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_vsx32l, and tdesc_powerpc_vsx32l.

## ◆ ppc_get_min_fast_tracepoint_insn_len()

static int ppc_get_min_fast_tracepoint_insn_len | ( | void |  | ) |
| static

Definition at line 1461 of file linux-ppc-low.c.

## ◆ ppc_get_pc()

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

Definition at line 248 of file linux-ppc-low.c.

References collect_register_by_name(), parse_spufs_run(), target_ops::read_memory, register_size(), regcache::tdesc, and the_target.

## ◆ ppc_get_thread_area()

static int ppc_get_thread_area | ( | int | lwpid,
|  | CORE_ADDR * | addr
| ) |  |
| static

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

References collect_register_by_name(), find_lwp_pid(), get_lwp_thread, get_thread_regcache(), pid_to_ptid(), register_size(), and regcache::tdesc.

## ◆ ppc_insert_point()

static int ppc_insert_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 405 of file linux-ppc-low.c.

References insert_memory_breakpoint(), raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_sw, and raw_bkpt_type_write_wp.

## ◆ ppc_install_fast_tracepoint_jump_pad()

static int ppc_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 1255 of file linux-ppc-low.c.

References current_thread, GEN_ADDI, gen_atomic_xchg(), GEN_B, gen_call(), gen_limm(), GEN_LOAD, GEN_LWSYNC, GEN_MFCR, GEN_MFSPR, GEN_MTCR, GEN_MTSPR, GEN_STDU, GEN_STORE, GEN_STWU, get_thread_regcache(), offset, ppc_relocate_instruction(), register_size(), regcache::tdesc, and write_inferior_memory().

## ◆ ppc_regs_info()

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

Definition at line 611 of file linux-ppc-low.c.

References regs_info.

## ◆ ppc_relocate_instruction()

static void ppc_relocate_instruction | ( | CORE_ADDR * | to,
|  | CORE_ADDR | oldloc
| ) |  |
| static

Definition at line 1111 of file linux-ppc-low.c.

References PPC_BD, PPC_BO, PPC_LI, PPC_OP6, read_inferior_memory(), write_inferior_memory(), and x4.

Referenced by ppc_install_fast_tracepoint_jump_pad().

## ◆ ppc_remove_point()

static int ppc_remove_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | size,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 426 of file linux-ppc-low.c.

References raw_bkpt_type_access_wp, raw_bkpt_type_hw, raw_bkpt_type_sw, raw_bkpt_type_write_wp, and remove_memory_breakpoint().

## ◆ ppc_set_pc()

static void ppc_set_pc | ( | struct regcache * | regcache,
|  | CORE_ADDR | pc
| ) |  |
| static

Definition at line 275 of file linux-ppc-low.c.

References parse_spufs_run(), register_size(), supply_register_by_name(), regcache::tdesc, the_target, and target_ops::write_memory.

## ◆ ppc_store_evrregset()

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

Definition at line 551 of file linux-ppc-low.c.

References gdb_evrregset_t::acc, gdb_evrregset_t::evr, find_regno(), PPC_FEATURE_HAS_SPE, ppc_hwcap, gdb_evrregset_t::spefscr, supply_register(), supply_register_by_name(), and regcache::tdesc.

## ◆ ppc_store_vrregset()

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

Definition at line 510 of file linux-ppc-low.c.

References find_regno(), PPC_FEATURE_HAS_ALTIVEC, ppc_hwcap, supply_register(), supply_register_by_name(), and regcache::tdesc.

## ◆ ppc_store_vsxregset()

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

Definition at line 477 of file linux-ppc-low.c.

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

## ◆ ppc_supply_ptrace_register()

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

Definition at line 170 of file linux-ppc-low.c.

References perror_with_name(), register_size(), supply_register(), and regcache::tdesc.

## ◆ ppc_supports_hardware_single_step()

static int ppc_supports_hardware_single_step | ( | void |  | ) |
| static

Definition at line 570 of file linux-ppc-low.c.

## ◆ ppc_supports_tracepoints()

static int ppc_supports_tracepoints | ( | void |  | ) |
| static

Definition at line 716 of file linux-ppc-low.c.

## ◆ ppc_supports_z_point_type()

static int ppc_supports_z_point_type | ( | char | z_type | ) |
| static

Definition at line 387 of file linux-ppc-low.c.

References Z_PACKET_ACCESS_WP, Z_PACKET_HW_BP, Z_PACKET_SW_BP, and Z_PACKET_WRITE_WP.

## ◆ ppc_sw_breakpoint_from_kind()

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

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

References ppc_breakpoint, and ppc_breakpoint_len.

## ◆ ppc_write_goto_address()

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

Definition at line 2233 of file linux-ppc-low.c.

References emit_error, read_inferior_memory(), and write_inferior_memory().

## Variable Documentation

## ◆ ppc_breakpoint

const unsigned int ppc_breakpoint = 0x7d821008
| static

Definition at line 342 of file linux-ppc-low.c.

Referenced by ppc_breakpoint_at(), and ppc_sw_breakpoint_from_kind().

## ◆ ppc_emit_ops_impl

struct emit_ops ppc_emit_ops_impl
| static

Definition at line 2266 of file linux-ppc-low.c.

Referenced by ppc_emit_ops().

## ◆ ppc_hwcap

unsigned long ppc_hwcap
| static

Definition at line 42 of file linux-ppc-low.c.

Referenced by ppc_arch_setup(), ppc_cannot_store_register(), ppc_fill_evrregset(), ppc_fill_vrregset(), ppc_fill_vsxregset(), ppc_store_evrregset(), ppc_store_vrregset(), and ppc_store_vsxregset().

## ◆ ppc_regmap

int ppc_regmap[]
| static

Initial value:
=
{PT_R0 * 4, PT_R1 * 4, PT_R2 * 4, PT_R3 * 4,
PT_R4 * 4, PT_R5 * 4, PT_R6 * 4, PT_R7 * 4,
PT_R8 * 4, PT_R9 * 4, PT_R10 * 4, PT_R11 * 4,
PT_R12 * 4, PT_R13 * 4, PT_R14 * 4, PT_R15 * 4,
PT_R16 * 4, PT_R17 * 4, PT_R18 * 4, PT_R19 * 4,
PT_R20 * 4, PT_R21 * 4, PT_R22 * 4, PT_R23 * 4,
PT_R24 * 4, PT_R25 * 4, PT_R26 * 4, PT_R27 * 4,
PT_R28 * 4, PT_R29 * 4, PT_R30 * 4, PT_R31 * 4,
PT_FPR0*4, PT_FPR0*4 + 8, PT_FPR0*4+16, PT_FPR0*4+24,
PT_FPR0*4+32, PT_FPR0*4+40, PT_FPR0*4+48, PT_FPR0*4+56,
PT_FPR0*4+64, PT_FPR0*4+72, PT_FPR0*4+80, PT_FPR0*4+88,
PT_FPR0*4+96, PT_FPR0*4+104, PT_FPR0*4+112, PT_FPR0*4+120,
PT_FPR0*4+128, PT_FPR0*4+136, PT_FPR0*4+144, PT_FPR0*4+152,
PT_FPR0*4+160, PT_FPR0*4+168, PT_FPR0*4+176, PT_FPR0*4+184,
PT_FPR0*4+192, PT_FPR0*4+200, PT_FPR0*4+208, PT_FPR0*4+216,
PT_FPR0*4+224, PT_FPR0*4+232, PT_FPR0*4+240, PT_FPR0*4+248,
PT_NIP * 4, PT_MSR * 4, PT_CCR * 4, PT_LNK * 4,
PT_CTR * 4, PT_XER * 4, PT_FPSCR * 4,
PT_ORIG_R3 * 4, PT_TRAP * 4
}
PT_ORIG_R3
#define PT_ORIG_R3
Definition: ppc-linux.h:26
PT_TRAP
#define PT_TRAP
Definition: ppc-linux.h:29

Definition at line 72 of file linux-ppc-low.c.

Referenced by ppc_arch_setup(), and ppc_fill_gregset().

## ◆ ppc_regmap_adjusted

int ppc_regmap_adjusted
| static

Definition at line 335 of file linux-ppc-low.c.

Referenced by ppc_arch_setup().

## ◆ ppc_regmap_e500

int ppc_regmap_e500[]
| static

Initial value:
=
{PT_R0 * 4, PT_R1 * 4, PT_R2 * 4, PT_R3 * 4,
PT_R4 * 4, PT_R5 * 4, PT_R6 * 4, PT_R7 * 4,
PT_R8 * 4, PT_R9 * 4, PT_R10 * 4, PT_R11 * 4,
PT_R12 * 4, PT_R13 * 4, PT_R14 * 4, PT_R15 * 4,
PT_R16 * 4, PT_R17 * 4, PT_R18 * 4, PT_R19 * 4,
PT_R20 * 4, PT_R21 * 4, PT_R22 * 4, PT_R23 * 4,
PT_R24 * 4, PT_R25 * 4, PT_R26 * 4, PT_R27 * 4,
PT_R28 * 4, PT_R29 * 4, PT_R30 * 4, PT_R31 * 4,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
-1, -1, -1, -1,
PT_NIP * 4, PT_MSR * 4, PT_CCR * 4, PT_LNK * 4,
PT_CTR * 4, PT_XER * 4, -1,
PT_ORIG_R3 * 4, PT_TRAP * 4
}
PT_ORIG_R3
#define PT_ORIG_R3
Definition: ppc-linux.h:26
PT_TRAP
#define PT_TRAP
Definition: ppc-linux.h:29

Definition at line 94 of file linux-ppc-low.c.

Referenced by ppc_arch_setup().

## ◆ ppc_regsets

struct regset_info ppc_regsets[]
| static

Initial value:
= {
{ PTRACE_GETVSXREGS, PTRACE_SETVSXREGS, 0, SIZEOF_VSXREGS, EXTENDED_REGS,
ppc_fill_vsxregset, ppc_store_vsxregset },
{ PTRACE_GETVRREGS, PTRACE_SETVRREGS, 0, SIZEOF_VRREGS, EXTENDED_REGS,
ppc_fill_vrregset, ppc_store_vrregset },
{ PTRACE_GETEVRREGS, PTRACE_SETEVRREGS, 0, 32 * 4 + 8 + 4, EXTENDED_REGS,
ppc_fill_evrregset, ppc_store_evrregset },
{ 0, 0, 0, 0, GENERAL_REGS, ppc_fill_gregset, NULL },
NULL_REGSET
}
SIZEOF_VSXREGS
#define SIZEOF_VSXREGS
Definition: linux-ppc-low.c:460
ppc_store_vsxregset
static void ppc_store_vsxregset(struct regcache *regcache, const void *buf)
Definition: linux-ppc-low.c:477
ppc_fill_evrregset
static void ppc_fill_evrregset(struct regcache *regcache, void *buf)
Definition: linux-ppc-low.c:534
PTRACE_GETEVRREGS
#define PTRACE_GETEVRREGS
Definition: ppc-linux.h:81
ppc_store_evrregset
static void ppc_store_evrregset(struct regcache *regcache, const void *buf)
Definition: linux-ppc-low.c:551
ppc_fill_vrregset
static void ppc_fill_vrregset(struct regcache *regcache, void *buf)
Definition: linux-ppc-low.c:493
PTRACE_SETEVRREGS
#define PTRACE_SETEVRREGS
Definition: ppc-linux.h:82
SIZEOF_VRREGS
#define SIZEOF_VRREGS
Definition: linux-ppc-low.c:490
ppc_fill_vsxregset
static void ppc_fill_vsxregset(struct regcache *regcache, void *buf)
Definition: linux-ppc-low.c:463
PTRACE_SETVRREGS
#define PTRACE_SETVRREGS
Definition: ppc-linux.h:68
PTRACE_GETVRREGS
#define PTRACE_GETVRREGS
Definition: ppc-linux.h:67
PTRACE_GETVSXREGS
#define PTRACE_GETVSXREGS
Definition: ppc-linux.h:73
PTRACE_SETVSXREGS
#define PTRACE_SETVSXREGS
Definition: ppc-linux.h:74
ppc_store_vrregset
static void ppc_store_vrregset(struct regcache *regcache, const void *buf)
Definition: linux-ppc-low.c:510
ppc_fill_gregset
static void ppc_fill_gregset(struct regcache *regcache, void *buf)
Definition: linux-ppc-low.c:446

Definition at line 575 of file linux-ppc-low.c.

## ◆ ppc_regsets_info

struct regsets_info ppc_regsets_info
| static

Initial value:
=
{
ppc_regsets,
0,
NULL,
}
ppc_regsets
static struct regset_info ppc_regsets[]
Definition: linux-ppc-low.c:575

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

Referenced by initialize_low_arch().

## ◆ ppc_usrregs_info

struct usrregs_info ppc_usrregs_info
| static

Initial value:
=
{
ppc_num_regs,
ppc_regmap,
}
ppc_num_regs
#define ppc_num_regs
Definition: linux-ppc-low.c:45
ppc_regmap
static int ppc_regmap[]
Definition: linux-ppc-low.c:72

Definition at line 590 of file linux-ppc-low.c.

Referenced by ppc_arch_setup().

## ◆ regs_info

struct regs_info regs_info
| static

Initial value:
=
{
NULL,
&ppc_usrregs_info,
&ppc_regsets_info
}
ppc_regsets_info
static struct regsets_info ppc_regsets_info
Definition: linux-ppc-low.c:596
ppc_usrregs_info
static struct usrregs_info ppc_usrregs_info
Definition: linux-ppc-low.c:590

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

Referenced by ppc_regs_info().

## ◆ the_low_target

struct linux_target_ops the_low_target

Definition at line 3105 of file linux-ppc-low.c.