OpenOCD
rtos.c File Reference
Include dependency graph for rtos.c:

Go to the source code of this file.

Functions

static struct symbol_table_elemfind_symbol (const struct rtos *os, const char *symbol)
 
int gdb_thread_packet (struct connection *connection, char const *packet, int packet_size)
 
static struct symbol_table_elemnext_symbol (struct rtos *os, char *cur_symbol, uint64_t cur_addr)
 
static int os_alloc (struct target *target, const struct rtos_type *ostype)
 
static int os_alloc_create (struct target *target, const struct rtos_type *ostype)
 
static void os_free (struct target *target)
 
int rtos_create (struct jim_getopt_info *goi, struct target *target)
 
void rtos_destroy (struct target *target)
 
void rtos_free_threadlist (struct rtos *rtos)
 
int rtos_generic_stack_read (struct target *target, const struct rtos_register_stacking *stacking, int64_t stack_ptr, struct rtos_reg **reg_list, int *num_regs)
 
int rtos_get_gdb_reg (struct connection *connection, int reg_num)
 Look through all registers to find this register. More...
 
int rtos_get_gdb_reg_list (struct connection *connection)
 Return a list of general registers. More...
 
static int rtos_put_gdb_reg_list (struct connection *connection, struct rtos_reg *reg_list, int num_regs)
 
int rtos_qsymbol (struct connection *connection, char const *packet, int packet_size)
 
int rtos_read_buffer (struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
 
int rtos_set_reg (struct connection *connection, int reg_num, uint8_t *reg_value)
 
int rtos_smp_init (struct target *target)
 
static int rtos_target_for_threadid (struct connection *connection, int64_t threadid, struct target **t)
 
int rtos_thread_packet (struct connection *connection, char const *packet, int packet_size)
 
static int rtos_try_next (struct target *target)
 
int rtos_update_threads (struct target *target)
 
int rtos_write_buffer (struct target *target, target_addr_t address, uint32_t size, const uint8_t *buffer)
 

Variables

static const struct rtos_typertos_types []
 

Function Documentation

◆ find_symbol()

static struct symbol_table_elem* find_symbol ( const struct rtos os,
const char *  symbol 
)
static

Definition at line 158 of file rtos.c.

References NULL, symbol_table_elem::symbol_name, and rtos::symbols.

Referenced by next_symbol(), and rtos_qsymbol().

◆ gdb_thread_packet()

int gdb_thread_packet ( struct connection connection,
char const *  packet,
int  packet_size 
)

◆ next_symbol()

static struct symbol_table_elem* next_symbol ( struct rtos os,
char *  cur_symbol,
uint64_t  cur_addr 
)
static

◆ os_alloc()

static int os_alloc ( struct target target,
const struct rtos_type ostype 
)
static

◆ os_alloc_create()

static int os_alloc_create ( struct target target,
const struct rtos_type ostype 
)
static

Definition at line 86 of file rtos.c.

References rtos_type::create, os_alloc(), os_free(), target::rtos, and rtos::type.

Referenced by rtos_create().

◆ os_free()

static void os_free ( struct target target)
static

Definition at line 75 of file rtos.c.

References NULL, target::rtos, rtos_free_threadlist(), and rtos::symbols.

Referenced by os_alloc_create(), rtos_create(), and rtos_destroy().

◆ rtos_create()

◆ rtos_destroy()

void rtos_destroy ( struct target target)

Definition at line 144 of file rtos.c.

References os_free().

Referenced by target_create(), and target_destroy().

◆ rtos_free_threadlist()

◆ rtos_generic_stack_read()

◆ rtos_get_gdb_reg()

int rtos_get_gdb_reg ( struct connection connection,
int  reg_num 
)

◆ rtos_get_gdb_reg_list()

int rtos_get_gdb_reg_list ( struct connection connection)

◆ rtos_put_gdb_reg_list()

static int rtos_put_gdb_reg_list ( struct connection connection,
struct rtos_reg reg_list,
int  num_regs 
)
static

Definition at line 479 of file rtos.c.

References count, DIV_ROUND_UP, ERROR_OK, gdb_put_packet(), hexify(), and size.

Referenced by rtos_get_gdb_reg(), and rtos_get_gdb_reg_list().

◆ rtos_qsymbol()

◆ rtos_read_buffer()

int rtos_read_buffer ( struct target target,
target_addr_t  address,
uint32_t  size,
uint8_t *  buffer 
)

Definition at line 713 of file rtos.c.

References buffer, ERROR_NOT_IMPLEMENTED, rtos_type::read_buffer, target::rtos, size, and rtos::type.

Referenced by gdb_read_memory_packet().

◆ rtos_set_reg()

int rtos_set_reg ( struct connection connection,
int  reg_num,
uint8_t *  reg_value 
)

◆ rtos_smp_init()

int rtos_smp_init ( struct target target)

Definition at line 39 of file rtos.c.

References ERROR_TARGET_INIT_FAILED, target::rtos, rtos_type::smp_init, and rtos::type.

Referenced by COMMAND_HANDLER().

◆ rtos_target_for_threadid()

static int rtos_target_for_threadid ( struct connection connection,
int64_t  threadid,
struct target **  t 
)
static

Definition at line 46 of file rtos.c.

References ERROR_OK, and get_target_from_connection().

Referenced by os_alloc().

◆ rtos_thread_packet()

◆ rtos_try_next()

static int rtos_try_next ( struct target target)
static

Definition at line 666 of file rtos.c.

References NULL, target::rtos, rtos_types, rtos::symbols, type, and rtos::type.

Referenced by rtos_qsymbol().

◆ rtos_update_threads()

int rtos_update_threads ( struct target target)

◆ rtos_write_buffer()

int rtos_write_buffer ( struct target target,
target_addr_t  address,
uint32_t  size,
const uint8_t *  buffer 
)

Variable Documentation

◆ rtos_types

const struct rtos_type* rtos_types[]
static
Initial value:
= {
}
const struct rtos_type freertos_rtos
Definition: FreeRTOS.c:82
const struct rtos_type chibios_rtos
Definition: chibios.c:99
const struct rtos_type chromium_ec_rtos
Definition: chromium-ec.c:383
const struct rtos_type ecos_rtos
Definition: eCos.c:455
const struct rtos_type embkernel_rtos
Definition: embKernel.c:29
const struct rtos_type hwthread_rtos
Definition: hwthread.c:50
const struct rtos_type linux_rtos
Definition: linux.c:250
const struct rtos_type mqx_rtos
Definition: mqx.c:500
const struct rtos_type nuttx_rtos
Definition: nuttx.c:396
const struct rtos_type riot_rtos
Definition: riot.c:97
const struct rtos_type rtkernel_rtos
Definition: rtkernel.c:375
const struct rtos_type zephyr_rtos
Definition: zephyr.c:788
const struct rtos_type threadx_rtos
Definition: ThreadX.c:193
const struct rtos_type ucos_iii_rtos
Definition: uCOS-III.c:501
#define NULL
Definition: usb.h:16

Definition at line 18 of file rtos.c.

Referenced by rtos_create(), and rtos_try_next().