GDBserver
Classes | Defines | Functions | Variables
/home/stan/gdb/src/gdb/gdbserver/linux-ppc-low.c File Reference
#include "server.h"
#include "linux-low.h"
#include <elf.h>
#include <asm/ptrace.h>

Go to the source code of this file.

Classes

struct  gdb_evrregset_t

Defines

#define PPC_FEATURE_HAS_VSX   0x00000080
#define PPC_FEATURE_HAS_ALTIVEC   0x10000000
#define PPC_FEATURE_HAS_SPE   0x00800000
#define PPC_FEATURE_CELL   0x00010000
#define PPC_FEATURE_HAS_DFP   0x00000400
#define ppc_num_regs   73
#define PT_ORIG_R3   34
#define PT_TRAP   40
#define INSTR_SC   0x44000002
#define NR_spu_run   0x0116
#define ppc_breakpoint_len   4
#define PTRACE_GETVSXREGS   27
#define PTRACE_SETVSXREGS   28
#define SIZEOF_VSXREGS   32*8
#define PTRACE_GETVRREGS   18
#define PTRACE_SETVRREGS   19
#define SIZEOF_VRREGS   33*16+4
#define PTRACE_GETEVRREGS   20
#define PTRACE_SETEVRREGS   21

Functions

void init_registers_powerpc_32l (void)
void init_registers_powerpc_altivec32l (void)
void init_registers_powerpc_cell32l (void)
void init_registers_powerpc_vsx32l (void)
void init_registers_powerpc_isa205_32l (void)
void init_registers_powerpc_isa205_altivec32l (void)
void init_registers_powerpc_isa205_vsx32l (void)
void init_registers_powerpc_e500l (void)
void init_registers_powerpc_64l (void)
void init_registers_powerpc_altivec64l (void)
void init_registers_powerpc_cell64l (void)
void init_registers_powerpc_vsx64l (void)
void init_registers_powerpc_isa205_64l (void)
void init_registers_powerpc_isa205_altivec64l (void)
void init_registers_powerpc_isa205_vsx64l (void)
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_hwcap (unsigned long *valp)
static void ppc_arch_setup (void)
static int ppc_breakpoint_at (CORE_ADDR where)
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 struct regs_infoppc_regs_info (void)
void initialize_low_arch (void)

Variables

static unsigned long ppc_hwcap
struct target_desctdesc_powerpc_32l
struct target_desctdesc_powerpc_altivec32l
struct target_desctdesc_powerpc_cell32l
struct target_desctdesc_powerpc_vsx32l
struct target_desctdesc_powerpc_isa205_32l
struct target_desctdesc_powerpc_isa205_altivec32l
struct target_desctdesc_powerpc_isa205_vsx32l
struct target_desctdesc_powerpc_e500l
struct target_desctdesc_powerpc_64l
struct target_desctdesc_powerpc_altivec64l
struct target_desctdesc_powerpc_cell64l
struct target_desctdesc_powerpc_vsx64l
struct target_desctdesc_powerpc_isa205_64l
struct target_desctdesc_powerpc_isa205_altivec64l
struct target_desctdesc_powerpc_isa205_vsx64l
static int ppc_regmap []
static int ppc_regmap_e500 []
static struct usrregs_info ppc_usrregs_info
static int ppc_regmap_adjusted
static const unsigned int ppc_breakpoint = 0x7d821008
static struct regset_info ppc_regsets []
static struct regsets_info ppc_regsets_info
static struct regs_info regs_info
struct linux_target_ops the_low_target

Define Documentation

#define INSTR_SC   0x44000002

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

Referenced by parse_spufs_run().

#define NR_spu_run   0x0116

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

Referenced by parse_spufs_run().

#define ppc_breakpoint_len   4

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

#define PPC_FEATURE_CELL   0x00010000

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

Referenced by ppc_arch_setup().

#define PPC_FEATURE_HAS_ALTIVEC   0x10000000

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

Referenced by ppc_arch_setup(), ppc_fill_vrregset(), and ppc_store_vrregset().

#define PPC_FEATURE_HAS_DFP   0x00000400

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

Referenced by ppc_arch_setup().

#define PPC_FEATURE_HAS_SPE   0x00800000
#define PPC_FEATURE_HAS_VSX   0x00000080

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

Referenced by ppc_arch_setup(), ppc_fill_vsxregset(), and ppc_store_vsxregset().

#define ppc_num_regs   73

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

#define PT_ORIG_R3   34

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

#define PT_TRAP   40

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

#define PTRACE_GETEVRREGS   20

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

#define PTRACE_GETVRREGS   18

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

#define PTRACE_GETVSXREGS   27

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

#define PTRACE_SETEVRREGS   21

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

#define PTRACE_SETVRREGS   19

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

#define PTRACE_SETVSXREGS   28

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

#define SIZEOF_VRREGS   33*16+4

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

#define SIZEOF_VSXREGS   32*8

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


Function Documentation

void init_registers_powerpc_32l ( void  )

Referenced by initialize_low_arch().

void init_registers_powerpc_64l ( void  )

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

Referenced by initialize_low_arch().

void initialize_low_arch ( void  )
static int parse_spufs_run ( struct regcache regcache,
int *  fd,
CORE_ADDR addr 
) [static]
static void ppc_arch_setup ( void  ) [static]
static int ppc_breakpoint_at ( CORE_ADDR  where) [static]
static int ppc_cannot_fetch_register ( int  regno) [static]

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

static int ppc_cannot_store_register ( int  regno) [static]
static void ppc_collect_ptrace_register ( struct regcache regcache,
int  regno,
char *  buf 
) [static]

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

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

Referenced by ppc_fill_gregset().

static void ppc_fill_evrregset ( struct regcache regcache,
void *  buf 
) [static]
static void ppc_fill_gregset ( struct regcache regcache,
void *  buf 
) [static]

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

References ppc_collect_ptrace_register(), and ppc_regmap.

static void ppc_fill_vrregset ( struct regcache regcache,
void *  buf 
) [static]
static void ppc_fill_vsxregset ( struct regcache regcache,
void *  buf 
) [static]
static int ppc_get_hwcap ( unsigned long *  valp) [static]
static CORE_ADDR ppc_get_pc ( struct regcache regcache) [static]
static struct regs_info* ppc_regs_info ( void  ) [static, read]

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

References regs_info.

static void ppc_set_pc ( struct regcache regcache,
CORE_ADDR  pc 
) [static]
static void ppc_store_evrregset ( struct regcache regcache,
const void *  buf 
) [static]
static void ppc_store_vrregset ( struct regcache regcache,
const void *  buf 
) [static]
static void ppc_store_vsxregset ( struct regcache regcache,
const void *  buf 
) [static]
static void ppc_supply_ptrace_register ( struct regcache regcache,
int  regno,
const char *  buf 
) [static]

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

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


Variable Documentation

const unsigned int ppc_breakpoint = 0x7d821008 [static]

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

Referenced by ppc_breakpoint_at().

unsigned long ppc_hwcap [static]
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
 }

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

Referenced by ppc_arch_setup(), and ppc_fill_gregset().

int ppc_regmap_adjusted [static]

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

Referenced by ppc_arch_setup().

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
 }

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

Referenced by ppc_arch_setup().

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 },
  { 0, 0, 0, -1, -1, NULL, NULL }
}

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

struct regsets_info ppc_regsets_info [static]
Initial value:
  {
    ppc_regsets, 
    0, 
    NULL, 
  }

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

Referenced by initialize_low_arch().

static struct usrregs_info ppc_usrregs_info [static]
Initial value:

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

Referenced by ppc_arch_setup().

struct regs_info regs_info [static]
Initial value:

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

Referenced by ppc_regs_info().

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines