GDBserver
Classes | Macros | Functions | Variables
linux-tic6x-low.c File Reference
#include "server.h"
#include "linux-low.h"
#include "arch/tic6x.h"
#include "tdesc.h"
#include "nat/gdb_ptrace.h"
#include <endian.h>
#include "gdb_proc_service.h"
#include <asm/ptrace.h>

Go to the source code of this file.

Classes

union  tic6x_register
 

Macros

#define PTRACE_GET_THREAD_AREA   25
 
#define TIC6X_NUM_REGS   69
 
#define tic6x_breakpoint_len   4
 

Functions

void init_registers_tic6x_c64xp_linux (void)
 
void init_registers_tic6x_c64x_linux (void)
 
void init_registers_tic6x_c62x_linux (void)
 
static const gdb_bytetic6x_sw_breakpoint_from_kind (int kind, int *size)
 
static const struct target_desctic6x_read_description (enum c6x_feature feature)
 
static int tic6x_cannot_fetch_register (int regno)
 
static int tic6x_cannot_store_register (int regno)
 
static CORE_ADDR tic6x_get_pc (struct regcache *regcache)
 
static void tic6x_set_pc (struct regcache *regcache, CORE_ADDR pc)
 
static int tic6x_breakpoint_at (CORE_ADDR where)
 
ps_err_e ps_get_thread_area (struct ps_prochandle *ph, lwpid_t lwpid, int idx, void **base)
 
static void tic6x_collect_register (struct regcache *regcache, int regno, union tic6x_register *reg)
 
static void tic6x_supply_register (struct regcache *regcache, int regno, const union tic6x_register *reg)
 
static void tic6x_fill_gregset (struct regcache *regcache, void *buf)
 
static void tic6x_store_gregset (struct regcache *regcache, const void *buf)
 
static void tic6x_arch_setup (void)
 
static int tic6x_supports_hardware_single_step (void)
 
static const struct regs_infotic6x_regs_info (void)
 
void initialize_low_arch (void)
 

Variables

const struct target_desctdesc_tic6x_c64xp_linux
 
const struct target_desctdesc_tic6x_c64x_linux
 
const struct target_desctdesc_tic6x_c62x_linux
 
static int tic6x_regmap_c64xp []
 
static int tic6x_regmap_c64x []
 
static int tic6x_regmap_c62x []
 
struct linux_target_ops the_low_target
 
static int * tic6x_regmap
 
static unsigned int tic6x_breakpoint
 
static struct usrregs_info tic6x_usrregs_info
 
static struct regset_info tic6x_regsets []
 
static struct regsets_info tic6x_regsets_info
 
static struct regs_info regs_info
 

Macro Definition Documentation

◆ PTRACE_GET_THREAD_AREA

#define PTRACE_GET_THREAD_AREA   25

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

Referenced by ps_get_thread_area().

◆ tic6x_breakpoint_len

#define tic6x_breakpoint_len   4

Definition at line 176 of file linux-tic6x-low.c.

Referenced by tic6x_sw_breakpoint_from_kind().

◆ TIC6X_NUM_REGS

#define TIC6X_NUM_REGS   69

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

Referenced by tic6x_fill_gregset(), and tic6x_store_gregset().

Function Documentation

◆ init_registers_tic6x_c62x_linux()

void init_registers_tic6x_c62x_linux ( void  )

Referenced by initialize_low_arch().

◆ init_registers_tic6x_c64x_linux()

void init_registers_tic6x_c64x_linux ( void  )

Referenced by initialize_low_arch().

◆ init_registers_tic6x_c64xp_linux()

void init_registers_tic6x_c64xp_linux ( void  )

Referenced by initialize_low_arch().

◆ initialize_low_arch()

void initialize_low_arch ( void  )

◆ 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 258 of file linux-tic6x-low.c.

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

◆ tic6x_arch_setup()

static void tic6x_arch_setup ( void  )
static

◆ tic6x_breakpoint_at()

static int tic6x_breakpoint_at ( CORE_ADDR  where)
static

Definition at line 242 of file linux-tic6x-low.c.

References target_ops::read_memory, the_target, and tic6x_breakpoint.

◆ tic6x_cannot_fetch_register()

static int tic6x_cannot_fetch_register ( int  regno)
static

Definition at line 212 of file linux-tic6x-low.c.

References tic6x_regmap.

◆ tic6x_cannot_store_register()

static int tic6x_cannot_store_register ( int  regno)
static

Definition at line 218 of file linux-tic6x-low.c.

References tic6x_regmap.

◆ tic6x_collect_register()

static void tic6x_collect_register ( struct regcache regcache,
int  regno,
union tic6x_register reg 
)
static

Definition at line 273 of file linux-tic6x-low.c.

References collect_register(), and tic6x_register::reg32.

Referenced by tic6x_fill_gregset().

◆ tic6x_fill_gregset()

static void tic6x_fill_gregset ( struct regcache regcache,
void *  buf 
)
static

◆ tic6x_get_pc()

static CORE_ADDR tic6x_get_pc ( struct regcache regcache)
static

◆ tic6x_read_description()

static const struct target_desc* tic6x_read_description ( enum c6x_feature  feature)
static

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

References target_desc::expedite_regs, and init_target_desc().

Referenced by tic6x_arch_setup().

◆ tic6x_regs_info()

static const struct regs_info* tic6x_regs_info ( void  )
static

Definition at line 385 of file linux-tic6x-low.c.

References regs_info.

◆ tic6x_set_pc()

static void tic6x_set_pc ( struct regcache regcache,
CORE_ADDR  pc 
)
static

◆ tic6x_store_gregset()

static void tic6x_store_gregset ( struct regcache regcache,
const void *  buf 
)
static

◆ tic6x_supply_register()

static void tic6x_supply_register ( struct regcache regcache,
int  regno,
const union tic6x_register reg 
)
static

Definition at line 283 of file linux-tic6x-low.c.

References tic6x_register::buf, offset, and supply_register().

Referenced by tic6x_store_gregset().

◆ tic6x_supports_hardware_single_step()

static int tic6x_supports_hardware_single_step ( void  )
static

Definition at line 365 of file linux-tic6x-low.c.

◆ tic6x_sw_breakpoint_from_kind()

static const gdb_byte* tic6x_sw_breakpoint_from_kind ( int  kind,
int *  size 
)
static

Definition at line 181 of file linux-tic6x-low.c.

References tic6x_breakpoint, and tic6x_breakpoint_len.

Variable Documentation

◆ regs_info

struct regs_info regs_info
static
Initial value:
=
{
NULL,
}
static struct usrregs_info tic6x_usrregs_info
static struct regsets_info tic6x_regsets_info

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

Referenced by tic6x_regs_info().

◆ tdesc_tic6x_c62x_linux

const struct target_desc* tdesc_tic6x_c62x_linux

◆ tdesc_tic6x_c64x_linux

const struct target_desc* tdesc_tic6x_c64x_linux

◆ tdesc_tic6x_c64xp_linux

const struct target_desc* tdesc_tic6x_c64xp_linux

◆ the_low_target

struct linux_target_ops the_low_target

Definition at line 390 of file linux-tic6x-low.c.

◆ tic6x_breakpoint

unsigned int tic6x_breakpoint
static

◆ tic6x_regmap

int* tic6x_regmap
static

◆ tic6x_regmap_c62x

int tic6x_regmap_c62x[]
static
Initial value:
= {
19, 18, 21, 20, 23, 22, 25, 24,
27, 26, 29, 28, 31, 30, 33, 32,
5, 4, 7, 6, 9, 8, 11, 10,
13, 12, 15, 14, 17, 16, 35, 34,
3, 2,
-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,
-1, -1, -1
}

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

Referenced by tic6x_arch_setup().

◆ tic6x_regmap_c64x

int tic6x_regmap_c64x[]
static
Initial value:
= {
51, 50, 53, 52, 55, 54, 57, 56,
59, 58, 61, 60, 63, 62, 65, 64,
21, 20, 23, 22, 25, 24, 27, 26,
29, 28, 31, 30, 33, 32, 67, 66,
3, 2,
35, 34, 37, 36, 39, 38, 41, 40,
43, 42, 45, 44, 47, 46, 49, 48,
5, 4, 7, 6, 9, 8, 11, 10,
13, 12, 15, 14, 17, 16, 19, 18,
-1, -1, -1
}

Definition at line 82 of file linux-tic6x-low.c.

Referenced by tic6x_arch_setup().

◆ tic6x_regmap_c64xp

int tic6x_regmap_c64xp[]
static
Initial value:
= {
53, 52, 55, 54, 57, 56, 59, 58,
61, 60, 63, 62, 65, 64, 67, 66,
23, 22, 25, 24, 27, 26, 29, 28,
31, 30, 33, 32, 35, 34, 69, 68,
5, 4,
37, 36, 39, 38, 41, 40, 43, 42,
45, 44, 47, 46, 49, 48, 51, 50,
7, 6, 9, 8, 11, 10, 13, 12,
15, 14, 17, 16, 19, 18, 21, 20,
1, 2, 3
}

Definition at line 63 of file linux-tic6x-low.c.

Referenced by tic6x_arch_setup().

◆ tic6x_regsets

struct regset_info tic6x_regsets[]
static
Initial value:
= {
{ PTRACE_GETREGS, PTRACE_SETREGS, 0, TIC6X_NUM_REGS * 4, GENERAL_REGS,
NULL_REGSET
}
static void tic6x_fill_gregset(struct regcache *regcache, void *buf)
#define TIC6X_NUM_REGS
static void tic6x_store_gregset(struct regcache *regcache, const void *buf)

Definition at line 313 of file linux-tic6x-low.c.

◆ tic6x_regsets_info

struct regsets_info tic6x_regsets_info
static
Initial value:
=
{
0,
NULL,
}
static struct regset_info tic6x_regsets[]

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

Referenced by initialize_low_arch().

◆ tic6x_usrregs_info

struct usrregs_info tic6x_usrregs_info
static
Initial value:
=
{
NULL,
}
#define TIC6X_NUM_REGS

Definition at line 187 of file linux-tic6x-low.c.

Referenced by tic6x_arch_setup().