25 struct rtos_reg **reg_list,
int *num_regs);
38 { 3,
"Blocked mutex" },
39 { 4,
"Blocked receive" },
40 { 5,
"Blocked send" },
41 { 6,
"Blocked reply" },
42 { 7,
"Blocked any flag" },
43 { 8,
"Blocked all flags" },
44 { 9,
"Blocked mbox" },
45 { 10,
"Blocked condition" },
49 #define RIOT_NUM_STATES ARRAY_SIZE(riot_thread_states)
69 #define RIOT_NUM_PARAMS ARRAY_SIZE(riot_params_list)
89 {
"sched_threads",
false},
90 {
"sched_num_threads",
false},
91 {
"sched_active_pid",
false},
92 {
"max_threads",
false},
93 {
"_tcb_name_offset",
true},
139 int16_t active_pid = 0;
142 (uint16_t *)&active_pid);
152 int32_t thread_count = 0;
155 (uint16_t *)&thread_count);
163 uint8_t max_threads = 0;
172 if (thread_count > max_threads) {
183 uint8_t name_offset = 0;
205 for (
unsigned int i = 0; i < max_threads; i++) {
210 uint32_t tcb_pointer = 0;
212 threads_base + (i * 4),
220 if (tcb_pointer == 0) {
249 strdup(
"unknown state");
262 if (name_offset != 0) {
263 uint32_t name_pointer = 0;
265 tcb_pointer + name_offset,
294 strdup(
"Enable DEVELHELP to see task names");
316 struct rtos_reg **reg_list,
int *num_regs)
334 uint32_t tcb_pointer = 0;
336 threads_base + (thread_id * 4),
344 uint32_t stackptr = 0;
397 LOG_ERROR(
"Could not find target in RIOT compatibility list");
413 LOG_ERROR(
"No stacking info for architecture");
static struct armv7m_common * target_to_armv7m(struct target *target)
static bool is_armv7m(const struct armv7m_common *armv7m)
The JTAG interface can be implemented with a software or hardware fifo.
#define LOG_ERROR(expr ...)
static const struct rtos_register_stacking * stacking_info
static int riot_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
static const struct riot_thread_state riot_thread_states[]
static bool riot_detect_rtos(struct target *target)
static int riot_update_threads(struct rtos *rtos)
static int riot_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
static struct riot_symbol const riot_symbol_list[]
const struct rtos_type riot_rtos
static const struct riot_params riot_params_list[]
static int riot_create(struct target *target)
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)
void rtos_free_threadlist(struct rtos *rtos)
const struct rtos_register_stacking rtos_riot_cortex_m0_stacking
const struct rtos_register_stacking rtos_riot_cortex_m34_stacking
enum arm_arch arch
ARM architecture version.
unsigned char thread_sp_offset
unsigned char thread_status_offset
struct thread_detail * thread_details
struct symbol_table_elem * symbols
void * rtos_specific_params
threadid_t current_thread
Table should be terminated by an element with NULL in symbol_name.
int target_read_buffer(struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
int target_read_u8(struct target *target, target_addr_t address, uint8_t *value)
int target_read_u16(struct target *target, target_addr_t address, uint16_t *value)
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)
const char * target_type_name(const struct target *target)
Get the target type name.
static const char * target_name(const struct target *target)
Returns the instance-specific name of the specified target.
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.