GDBserver

Classes | Macros | Functions | Variables
linux-sparc-low.c File Reference
`#include "server.h"`
`#include "linux-low.h"`
`#include "nat/gdb_ptrace.h"`
`#include "gdb_proc_service.h"`

Go to the source code of this file.

## Classes
struct | regs_range_t

## Macros
#define | BIAS 2047
#define | INSN_SIZE 4
#define | SPARC_R_REGS_NUM 32
#define | SPARC_F_REGS_NUM 48
#define | SPARC_CONTROL_REGS_NUM 6
#define | sparc_num_regs (SPARC_R_REGS_NUM + SPARC_F_REGS_NUM + SPARC_CONTROL_REGS_NUM)
#define | N_GREGS_RANGES (sizeof (gregs_ranges) / sizeof (struct regs_range_t))
#define | N_FPREGS_RANGES (sizeof (fpregs_ranges) / sizeof (struct regs_range_t))
#define | sparc_breakpoint_len INSN_SIZE

## Functions
void | init_registers_sparc64 (void)
static int | sparc_cannot_store_register (int regno)
static int | sparc_cannot_fetch_register (int regno)
static void | sparc_fill_gregset_to_stack (struct regcache *regcache, const void *buf)
static void | sparc_fill_gregset (struct regcache *regcache, void *buf)
static void | sparc_fill_fpregset (struct regcache *regcache, void *buf)
static void | sparc_store_gregset_from_stack (struct regcache *regcache, const void *buf)
static void | sparc_store_gregset (struct regcache *regcache, const void *buf)
static void | sparc_store_fpregset (struct regcache *regcache, const void *buf)
static const unsigned char * | sparc_sw_breakpoint_from_kind (int kind, int *size)
static int | sparc_breakpoint_at (CORE_ADDR where)
static void | sparc_arch_setup (void)
static const struct regs_info * | sparc_regs_info (void)
void | initialize_low_arch (void)

## Variables
static int | sparc_regmap []
static const struct regs_range_t | gregs_ranges []
static const struct regs_range_t | fpregs_ranges []
const struct target_desc * | tdesc_sparc64
static const gdb_byte | sparc_breakpoint [INSN_SIZE]
static struct regset_info | sparc_regsets []
static struct regsets_info | sparc_regsets_info
static struct usrregs_info | sparc_usrregs_info
static struct regs_info | regs_info
struct linux_target_ops | the_low_target

## Macro Definition Documentation

## ◆ BIAS

#define BIAS 2047

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

Referenced by sparc_fill_gregset_to_stack(), and sparc_store_gregset_from_stack().

## ◆ INSN_SIZE

#define INSN_SIZE 4

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

Referenced by sparc_breakpoint_at().

## ◆ N_FPREGS_RANGES

#define N_FPREGS_RANGES (sizeof (fpregs_ranges) / sizeof (struct regs_range_t))

Definition at line 99 of file linux-sparc-low.c.

Referenced by sparc_fill_fpregset(), and sparc_store_fpregset().

## ◆ N_GREGS_RANGES

#define N_GREGS_RANGES (sizeof (gregs_ranges) / sizeof (struct regs_range_t))

Definition at line 92 of file linux-sparc-low.c.

Referenced by sparc_fill_gregset(), and sparc_store_gregset().

## ◆ sparc_breakpoint_len

#define sparc_breakpoint_len INSN_SIZE

Definition at line 229 of file linux-sparc-low.c.

Referenced by sparc_sw_breakpoint_from_kind().

## ◆ SPARC_CONTROL_REGS_NUM

#define SPARC_CONTROL_REGS_NUM 6

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

## ◆ SPARC_F_REGS_NUM

#define SPARC_F_REGS_NUM 48

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

## ◆ sparc_num_regs

#define sparc_num_regs (SPARC_R_REGS_NUM + SPARC_F_REGS_NUM + SPARC_CONTROL_REGS_NUM)

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

Referenced by sparc_cannot_fetch_register(), and sparc_cannot_store_register().

## ◆ SPARC_R_REGS_NUM

#define SPARC_R_REGS_NUM 32

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

## Function Documentation

## ◆ init_registers_sparc64()

void init_registers_sparc64 | ( | void |  | ) |

Referenced by initialize_low_arch().

## ◆ initialize_low_arch()

void initialize_low_arch | ( | void |  | ) |

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

References init_registers_sparc64(), and sparc_regsets_info.

## ◆ sparc_arch_setup()

static void sparc_arch_setup | ( | void |  | ) |
| static

Definition at line 257 of file linux-sparc-low.c.

References current_process(), process_info::tdesc, and tdesc_sparc64.

## ◆ sparc_breakpoint_at()

static int sparc_breakpoint_at | ( | CORE_ADDR | where | ) |
| static

Definition at line 241 of file linux-sparc-low.c.

References INSN_SIZE, target_ops::read_memory, sparc_breakpoint, and the_target.

## ◆ sparc_cannot_fetch_register()

static int sparc_cannot_fetch_register | ( | int | regno | ) |
| static

Definition at line 112 of file linux-sparc-low.c.

References sparc_num_regs, and sparc_regmap.

## ◆ sparc_cannot_store_register()

static int sparc_cannot_store_register | ( | int | regno | ) |
| static

Definition at line 106 of file linux-sparc-low.c.

References sparc_num_regs, and sparc_regmap.

## ◆ sparc_fill_fpregset()

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

Definition at line 157 of file linux-sparc-low.c.

References collect_register(), fpregs_ranges, N_FPREGS_RANGES, regs_range_t::regno_end, and sparc_regmap.

## ◆ sparc_fill_gregset()

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

Definition at line 142 of file linux-sparc-low.c.

References collect_register(), gregs_ranges, N_GREGS_RANGES, regs_range_t::regno_end, sparc_fill_gregset_to_stack(), and sparc_regmap.

## ◆ sparc_fill_gregset_to_stack()

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

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

References BIAS, collect_register(), find_regno(), sparc_regmap, regcache::tdesc, the_target, and target_ops::write_memory.

Referenced by sparc_fill_gregset().

## ◆ sparc_regs_info()

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

Definition at line 295 of file linux-sparc-low.c.

References regs_info.

## ◆ sparc_store_fpregset()

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

Definition at line 214 of file linux-sparc-low.c.

References fpregs_ranges, N_FPREGS_RANGES, regs_range_t::regno_end, sparc_regmap, and supply_register().

## ◆ sparc_store_gregset()

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

Definition at line 194 of file linux-sparc-low.c.

References gregs_ranges, memset(), N_GREGS_RANGES, regs_range_t::regno_end, sparc_regmap, sparc_store_gregset_from_stack(), and supply_register().

## ◆ sparc_store_gregset_from_stack()

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

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

References BIAS, find_regno(), target_ops::read_memory, sparc_regmap, supply_register(), regcache::tdesc, and the_target.

Referenced by sparc_store_gregset().

## ◆ sparc_sw_breakpoint_from_kind()

static const unsigned char* sparc_sw_breakpoint_from_kind | ( | int | kind,
|  | int * | size
| ) |  |
| static

Definition at line 234 of file linux-sparc-low.c.

References sparc_breakpoint, and sparc_breakpoint_len.

## Variable Documentation

## ◆ fpregs_ranges

const struct regs_range_t fpregs_ranges[]
| static

Initial value:
= {
{ 32, 79 },
{ 83, 83 }
}

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

Referenced by sparc_fill_fpregset(), and sparc_store_fpregset().

## ◆ gregs_ranges

const struct regs_range_t gregs_ranges[]
| static

Initial value:
= {
{ 0, 31 },
{ 80, 82 },
{ 84, 85 }
}

Definition at line 86 of file linux-sparc-low.c.

Referenced by sparc_fill_gregset(), and sparc_store_gregset().

## ◆ regs_info

struct regs_info regs_info
| static

Initial value:
=
{
NULL,
&sparc_usrregs_info,
&sparc_regsets_info
}
sparc_usrregs_info
static struct usrregs_info sparc_usrregs_info
Definition: linux-sparc-low.c:279
sparc_regsets_info
static struct regsets_info sparc_regsets_info
Definition: linux-sparc-low.c:272

Definition at line 287 of file linux-sparc-low.c.

Referenced by sparc_regs_info().

## ◆ sparc_breakpoint

const gdb_byte sparc_breakpoint[INSN_SIZE]
| static

Initial value:
= {
0x91, 0xd0, 0x20, 0x01
}

Definition at line 226 of file linux-sparc-low.c.

Referenced by sparc_breakpoint_at(), and sparc_sw_breakpoint_from_kind().

## ◆ sparc_regmap

int sparc_regmap[]
| static

Initial value:
= {
-1, 0*8, 1*8, 2*8, 3*8, 4*8, 5*8, 6*8,
7*8, 8*8, 9*8, 10*8, 11*8, 12*8, 13*8, 14*8,
-1, -1, -1, -1, -1, -1, -1, -1,
-1, -1, -1, -1, -1, -1, -1, -1,
0*4, 1*4, 2*4, 3*4, 4*4, 5*4, 6*4, 7*4,
8*4, 9*4, 10*4, 11*4, 12*4, 13*4, 14*4, 15*4,
16*4, 17*4, 18*4, 19*4, 20*4, 21*4, 22*4, 23*4,
24*4, 25*4, 26*4, 27*4, 28*4, 29*4, 30*4, 31*4,
16*8, 17*8, 18*8, 19*8, 20*8, 21*8, 22*8, 23*8,
24*8, 25*8, 26*8, 27*8, 28*8, 29*8, 30*8, 31*8,
17 *8,
18 *8,
16 *8,
32 *8,
-1,
19 *8,
}

Definition at line 50 of file linux-sparc-low.c.

Referenced by sparc_cannot_fetch_register(), sparc_cannot_store_register(), sparc_fill_fpregset(), sparc_fill_gregset(), sparc_fill_gregset_to_stack(), sparc_store_fpregset(), sparc_store_gregset(), and sparc_store_gregset_from_stack().

## ◆ sparc_regsets

struct regset_info sparc_regsets[]
| static

Initial value:
= {
{ PTRACE_GETREGS, PTRACE_SETREGS, 0, sizeof (elf_gregset_t),
GENERAL_REGS,
sparc_fill_gregset, sparc_store_gregset },
{ PTRACE_GETFPREGS, PTRACE_SETFPREGS, 0, sizeof (fpregset_t),
FP_REGS,
sparc_fill_fpregset, sparc_store_fpregset },
NULL_REGSET
}
sparc_fill_fpregset
static void sparc_fill_fpregset(struct regcache *regcache, void *buf)
Definition: linux-sparc-low.c:157
sparc_store_fpregset
static void sparc_store_fpregset(struct regcache *regcache, const void *buf)
Definition: linux-sparc-low.c:214
sparc_store_gregset
static void sparc_store_gregset(struct regcache *regcache, const void *buf)
Definition: linux-sparc-low.c:194
sparc_fill_gregset
static void sparc_fill_gregset(struct regcache *regcache, void *buf)
Definition: linux-sparc-low.c:142

Definition at line 262 of file linux-sparc-low.c.

## ◆ sparc_regsets_info

struct regsets_info sparc_regsets_info
| static

Initial value:
=
{
sparc_regsets,
0,
NULL,
}
sparc_regsets
static struct regset_info sparc_regsets[]
Definition: linux-sparc-low.c:262

Definition at line 272 of file linux-sparc-low.c.

Referenced by initialize_low_arch().

## ◆ sparc_usrregs_info

struct usrregs_info sparc_usrregs_info
| static

Initial value:
=
{
sparc_num_regs,
NULL
}
sparc_num_regs
#define sparc_num_regs
Definition: linux-sparc-low.c:42

Definition at line 279 of file linux-sparc-low.c.

## ◆ tdesc_sparc64

const struct target_desc* tdesc_sparc64

Referenced by sparc_arch_setup().

## ◆ the_low_target

struct linux_target_ops the_low_target

Initial value:
= {
sparc_arch_setup,
sparc_regs_info,
sparc_cannot_fetch_register,
sparc_cannot_store_register,
NULL,
linux_get_pc_64bit,
NULL,
NULL,
sparc_sw_breakpoint_from_kind,
NULL,
0,
sparc_breakpoint_at,
NULL,
NULL, NULL, NULL, NULL,
NULL, NULL
}
linux_get_pc_64bit
CORE_ADDR linux_get_pc_64bit(struct regcache *regcache)
Definition: linux-low.c:7436
sparc_breakpoint_at
static int sparc_breakpoint_at(CORE_ADDR where)
Definition: linux-sparc-low.c:241
sparc_cannot_store_register
static int sparc_cannot_store_register(int regno)
Definition: linux-sparc-low.c:106
sparc_regs_info
static const struct regs_info * sparc_regs_info(void)
Definition: linux-sparc-low.c:295
sparc_cannot_fetch_register
static int sparc_cannot_fetch_register(int regno)
Definition: linux-sparc-low.c:112
sparc_arch_setup
static void sparc_arch_setup(void)
Definition: linux-sparc-low.c:257
sparc_sw_breakpoint_from_kind
static const unsigned char * sparc_sw_breakpoint_from_kind(int kind, int *size)
Definition: linux-sparc-low.c:234

Definition at line 300 of file linux-sparc-low.c.