OpenOCD
rtos.h File Reference
Include dependency graph for rtos.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  rtos
 
struct  rtos_reg
 
struct  rtos_register_stacking
 
struct  rtos_type
 
struct  stack_register_offset
 
struct  symbol_table_elem
 Table should be terminated by an element with NULL in symbol_name. More...
 
struct  thread_detail
 

Macros

#define GDB_THREAD_PACKET_NOT_CONSUMED   (-40)
 

Typedefs

typedef int64_t symbol_address_t
 
typedef int64_t threadid_t
 

Functions

int gdb_thread_packet (struct connection *connection, char const *packet, int packet_size)
 
int rtos_create (struct command_invocation *cmd, struct target *target, const char *rtos_name)
 
void rtos_destroy (struct target *target)
 
void rtos_free_threadlist (struct rtos *rtos)
 
struct rtosrtos_from_target (struct target *target)
 Get the RTOS from the target itself, or from one of the targets in the same SMP node, or NULL when no RTOS is set. More...
 
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...
 
bool rtos_needs_fake_step (struct target *target, int64_t thread_id)
 
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)
 
struct targetrtos_swbp_target (struct target *target, target_addr_t address, uint32_t length, enum breakpoint_type type)
 
int rtos_thread_packet (struct connection *connection, const char *packet, int packet_size)
 
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

const struct rtos_type chibios_rtos
 
const struct rtos_type chromium_ec_rtos
 
const struct rtos_type ecos_rtos
 
const struct rtos_type embkernel_rtos
 
const struct rtos_type freertos_rtos
 
const struct rtos_type hwthread_rtos
 
const struct rtos_type linux_rtos
 
const struct rtos_type mqx_rtos
 
const struct rtos_type nuttx_rtos
 
const struct rtos_type riot_rtos
 
const struct rtos_type rtkernel_rtos
 
const struct rtos_type threadx_rtos
 
const struct rtos_type ucos_iii_rtos
 
const struct rtos_type zephyr_rtos
 

Macro Definition Documentation

◆ GDB_THREAD_PACKET_NOT_CONSUMED

#define GDB_THREAD_PACKET_NOT_CONSUMED   (-40)

Definition at line 129 of file rtos.h.

Typedef Documentation

◆ symbol_address_t

typedef int64_t symbol_address_t

Definition at line 16 of file rtos.h.

◆ threadid_t

typedef int64_t threadid_t

Definition at line 15 of file rtos.h.

Function Documentation

◆ gdb_thread_packet()

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

◆ rtos_create()

int rtos_create ( struct command_invocation cmd,
struct target target,
const char *  rtos_name 
)

◆ rtos_destroy()

void rtos_destroy ( struct target target)

Definition at line 145 of file rtos.c.

References os_free().

Referenced by COMMAND_HANDLER(), and target_destroy().

◆ rtos_free_threadlist()

◆ rtos_from_target()

struct rtos* rtos_from_target ( struct target target)

Get the RTOS from the target itself, or from one of the targets in the same SMP node, or NULL when no RTOS is set.

Definition at line 719 of file rtos.c.

References foreach_smp_target, NULL, target::rtos, target::smp_targets, target_list::target, and rtos::type.

Referenced by gdb_signal_reply(), and rtos_update_threads().

◆ 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_needs_fake_step()

bool rtos_needs_fake_step ( struct target target,
int64_t  thread_id 
)

Definition at line 774 of file rtos.c.

References rtos::current_thread, rtos_type::needs_fake_step, target::rtos, and rtos::type.

Referenced by gdb_handle_vcont_packet().

◆ rtos_qsymbol()

◆ rtos_read_buffer()

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

◆ 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 40 of file rtos.c.

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

Referenced by COMMAND_HANDLER().

◆ rtos_swbp_target()

struct target* rtos_swbp_target ( struct target target,
target_addr_t  address,
uint32_t  length,
enum breakpoint_type  type 
)

Definition at line 781 of file rtos.c.

References address, length, target::rtos, rtos_type::swbp_target, target, type, and rtos::type.

Referenced by gdb_breakpoint_watchpoint_packet().

◆ rtos_thread_packet()

◆ 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

◆ chibios_rtos

const struct rtos_type chibios_rtos
extern

Definition at line 97 of file chibios.c.

◆ chromium_ec_rtos

const struct rtos_type chromium_ec_rtos
extern

Definition at line 366 of file chromium-ec.c.

◆ ecos_rtos

const struct rtos_type ecos_rtos
extern

Definition at line 102 of file ecos.c.

◆ embkernel_rtos

const struct rtos_type embkernel_rtos
extern

Definition at line 27 of file embkernel.c.

◆ freertos_rtos

const struct rtos_type freertos_rtos
extern

Definition at line 80 of file freertos.c.

◆ hwthread_rtos

const struct rtos_type hwthread_rtos
extern

Definition at line 37 of file hwthread.c.

◆ linux_rtos

const struct rtos_type linux_rtos
extern

Definition at line 248 of file linux.c.

◆ mqx_rtos

const struct rtos_type mqx_rtos
extern

Definition at line 488 of file mqx.c.

◆ nuttx_rtos

const struct rtos_type nuttx_rtos
extern

Definition at line 380 of file nuttx.c.

◆ riot_rtos

const struct rtos_type riot_rtos
extern

Definition at line 72 of file riot.c.

◆ rtkernel_rtos

const struct rtos_type rtkernel_rtos
extern

Definition at line 362 of file rtkernel.c.

◆ threadx_rtos

const struct rtos_type threadx_rtos
extern

Definition at line 186 of file threadx.c.

◆ ucos_iii_rtos

const struct rtos_type ucos_iii_rtos
extern

Definition at line 487 of file ucos_iii.c.

◆ zephyr_rtos

const struct rtos_type zephyr_rtos
extern

Definition at line 776 of file zephyr.c.