GDBserver

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

Go to the source code of this file.

## Macros
#define | cris_num_regs 49
#define | PTRACE_GET_THREAD_AREA 25
#define | cris_breakpoint_len 2

## Functions
void | init_registers_crisv32 (void)
static const gdb_byte * | cris_sw_breakpoint_from_kind (int kind, int *size)
static int | cris_breakpoint_at (CORE_ADDR where)
static void | cris_write_data_breakpoint (struct regcache *regcache, int bp, unsigned long start, unsigned long end)
static int | cris_supports_z_point_type (char z_type)
static int | cris_insert_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp)
static int | cris_remove_point (enum raw_bkpt_type type, CORE_ADDR addr, int len, struct raw_breakpoint *bp)
static int | cris_stopped_by_watchpoint (void)
static CORE_ADDR | cris_stopped_data_address (void)
ps_err_e | ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
static void | cris_fill_gregset (struct regcache *regcache, void *buf)
static void | cris_store_gregset (struct regcache *regcache, const void *buf)
static void | cris_arch_setup (void)
static int | cris_supports_hardware_single_step (void)
static const struct regs_info * | cris_regs_info (void)
void | initialize_low_arch (void)

## Variables
const struct target_desc * | tdesc_crisv32
static int | cris_regmap []
static const unsigned short | cris_breakpoint = 0xe938
static struct regset_info | cris_regsets []
static struct regsets_info | cris_regsets_info
static struct usrregs_info | cris_usrregs_info
static struct regs_info | regs_info
struct linux_target_ops | the_low_target

## Macro Definition Documentation

## ◆ cris_breakpoint_len

#define cris_breakpoint_len 2

Definition at line 59 of file linux-crisv32-low.c.

Referenced by cris_breakpoint_at(), and cris_sw_breakpoint_from_kind().

## ◆ cris_num_regs

#define cris_num_regs 49

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

Referenced by cris_fill_gregset(), and cris_store_gregset().

## ◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA 25

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

Referenced by ps_get_thread_area().

## Function Documentation

## ◆ cris_arch_setup()

static void cris_arch_setup | ( | void |  | ) |
| static

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

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

## ◆ cris_breakpoint_at()

static int cris_breakpoint_at | ( | CORE_ADDR | where | ) |
| static

Definition at line 71 of file linux-crisv32-low.c.

References cris_breakpoint, cris_breakpoint_len, target_ops::read_memory, and the_target.

## ◆ cris_fill_gregset()

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

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

References collect_register(), cris_num_regs, and cris_regmap.

## ◆ cris_insert_point()

static int cris_insert_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | len,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 133 of file linux-crisv32-low.c.

References collect_register_by_name(), cris_write_data_breakpoint(), current_thread, get_thread_regcache(), raw_bkpt_type_access_wp, raw_bkpt_type_read_wp, raw_bkpt_type_write_wp, supply_register_by_name(), and x3.

## ◆ cris_regs_info()

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

Definition at line 391 of file linux-crisv32-low.c.

References regs_info.

## ◆ cris_remove_point()

static int cris_remove_point | ( | enum raw_bkpt_type | type,
|  | CORE_ADDR | addr,
|  | int | len,
|  | struct raw_breakpoint * | bp
| ) |  |
| static

Definition at line 206 of file linux-crisv32-low.c.

References collect_register_by_name(), cris_write_data_breakpoint(), current_thread, get_thread_regcache(), raw_bkpt_type_access_wp, raw_bkpt_type_read_wp, raw_bkpt_type_write_wp, supply_register_by_name(), x1, and x3.

## ◆ cris_stopped_by_watchpoint()

static int cris_stopped_by_watchpoint | ( | void |  | ) |
| static

Definition at line 289 of file linux-crisv32-low.c.

References collect_register_by_name(), current_thread, and get_thread_regcache().

## ◆ cris_stopped_data_address()

static CORE_ADDR cris_stopped_data_address | ( | void |  | ) |
| static

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

References collect_register_by_name(), current_thread, and get_thread_regcache().

## ◆ cris_store_gregset()

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

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

References cris_num_regs, cris_regmap, and supply_register().

## ◆ cris_supports_hardware_single_step()

static int cris_supports_hardware_single_step | ( | void |  | ) |
| static

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

## ◆ cris_supports_z_point_type()

static int cris_supports_z_point_type | ( | char | z_type | ) |
| static

Definition at line 119 of file linux-crisv32-low.c.

References Z_PACKET_ACCESS_WP, Z_PACKET_READ_WP, and Z_PACKET_WRITE_WP.

## ◆ cris_sw_breakpoint_from_kind()

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

Definition at line 64 of file linux-crisv32-low.c.

References cris_breakpoint, and cris_breakpoint_len.

## ◆ cris_write_data_breakpoint()

static void cris_write_data_breakpoint | ( | struct regcache * | regcache,
|  | int | bp,
|  | unsigned long | start,
|  | unsigned long | end
| ) |  |
| static

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

References supply_register_by_name().

Referenced by cris_insert_point(), and cris_remove_point().

## ◆ init_registers_crisv32()

void init_registers_crisv32 | ( | void |  | ) |

Referenced by initialize_low_arch().

## ◆ initialize_low_arch()

void initialize_low_arch | ( | void |  | ) |

Definition at line 435 of file linux-crisv32-low.c.

References cris_regsets_info, and init_registers_crisv32().

## ◆ ps_get_thread_area()

ps_err_e ps_get_thread_area | ( | struct ps_prochandle * | ph,
|  | lwpid_t | lwpid,
|  | int | idx,
|  | void ** | base
| ) |  |

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

References PS_ERR, PS_OK, ptrace(), and PTRACE_GET_THREAD_AREA.

## Variable Documentation

## ◆ cris_breakpoint

const unsigned short cris_breakpoint = 0xe938
| static

Definition at line 58 of file linux-crisv32-low.c.

Referenced by cris_breakpoint_at(), and cris_sw_breakpoint_from_kind().

## ◆ cris_regmap

int cris_regmap[]
| static

Initial value:
= {
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, 24*4, 15*4,
-1, -1, -1, 16*4,
-1, 22*4, 23*4, 17*4,
-1, -1, 21*4, 20*4,
-1, 19*4, -1, 18*4,
25*4,
26*4, -1, -1, 29*4,
30*4, 31*4, 32*4, 33*4,
34*4, 35*4, 36*4, 37*4,
38*4, 39*4, 40*4, -1
}

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

Referenced by cris_fill_gregset(), and cris_store_gregset().

## ◆ cris_regsets

struct regset_info cris_regsets[]
| static

Initial value:
= {
{ PTRACE_GETREGS, PTRACE_SETREGS, 0, cris_num_regs * 4,
GENERAL_REGS, cris_fill_gregset, cris_store_gregset },
NULL_REGSET
}
cris_fill_gregset
static void cris_fill_gregset(struct regcache *regcache, void *buf)
Definition: linux-crisv32-low.c:326
cris_num_regs
#define cris_num_regs
Definition: linux-crisv32-low.c:28
cris_store_gregset
static void cris_store_gregset(struct regcache *regcache, const void *buf)
Definition: linux-crisv32-low.c:338

Definition at line 363 of file linux-crisv32-low.c.

## ◆ cris_regsets_info

struct regsets_info cris_regsets_info
| static

Initial value:
=
{
cris_regsets,
0,
NULL,
}
cris_regsets
static struct regset_info cris_regsets[]
Definition: linux-crisv32-low.c:363

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

Referenced by initialize_low_arch().

## ◆ cris_usrregs_info

struct usrregs_info cris_usrregs_info
| static

Initial value:
=
{
cris_num_regs,
cris_regmap,
}
cris_num_regs
#define cris_num_regs
Definition: linux-crisv32-low.c:28
cris_regmap
static int cris_regmap[]
Definition: linux-crisv32-low.c:38

Definition at line 377 of file linux-crisv32-low.c.

## ◆ regs_info

struct regs_info regs_info
| static

Initial value:
=
{
NULL,
&cris_usrregs_info,
&cris_regsets_info
}
cris_regsets_info
static struct regsets_info cris_regsets_info
Definition: linux-crisv32-low.c:370
cris_usrregs_info
static struct usrregs_info cris_usrregs_info
Definition: linux-crisv32-low.c:377

Definition at line 383 of file linux-crisv32-low.c.

Referenced by cris_regs_info().

## ◆ tdesc_crisv32

const struct target_desc* tdesc_crisv32

Referenced by cris_arch_setup().

## ◆ the_low_target

struct linux_target_ops the_low_target

Definition at line 396 of file linux-crisv32-low.c.