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

Go to the source code of this file.

Data Structures

struct  threadx_params
 
struct  threadx_thread_state
 

Macros

#define ARM926EJS_REGISTERS_SIZE_INTERRUPT   (17 * 4)
 
#define ARM926EJS_REGISTERS_SIZE_SOLICITED   (11 * 4)
 
#define THREADX_NUM_STATES   ARRAY_SIZE(threadx_thread_states)
 
#define THREADX_THREAD_NAME_STR_SIZE   (200)
 

Enumerations

enum  threadx_symbol_values { THREADX_VAL_TX_THREAD_CURRENT_PTR = 0 , THREADX_VAL_TX_THREAD_CREATED_PTR = 1 , THREADX_VAL_TX_THREAD_CREATED_COUNT = 2 }
 

Functions

static const struct rtos_register_stackingget_stacking_info (const struct rtos *rtos, int64_t stack_ptr)
 
static const struct rtos_register_stackingget_stacking_info_arm926ejs (const struct rtos *rtos, int64_t stack_ptr)
 
static int is_thread_id_valid (const struct rtos *rtos, int64_t thread_id)
 
static int is_thread_id_valid_arm926ejs (const struct rtos *rtos, int64_t thread_id)
 
static int threadx_create (struct target *target)
 
static bool threadx_detect_rtos (struct target *target)
 
static int threadx_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[])
 
static int threadx_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
 
static int threadx_update_threads (struct rtos *rtos)
 

Variables

static const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_interrupt []
 
static const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_solicited []
 
static const struct rtos_register_stacking rtos_threadx_arm926ejs_stacking []
 
static const struct threadx_params threadx_params_list []
 
const struct rtos_type threadx_rtos
 
static const char *const threadx_symbol_list []
 
static const struct threadx_thread_state threadx_thread_states []
 

Macro Definition Documentation

◆ ARM926EJS_REGISTERS_SIZE_INTERRUPT

#define ARM926EJS_REGISTERS_SIZE_INTERRUPT   (17 * 4)

Definition at line 80 of file ThreadX.c.

◆ ARM926EJS_REGISTERS_SIZE_SOLICITED

#define ARM926EJS_REGISTERS_SIZE_SOLICITED   (11 * 4)

Definition at line 58 of file ThreadX.c.

◆ THREADX_NUM_STATES

#define THREADX_NUM_STATES   ARRAY_SIZE(threadx_thread_states)

Definition at line 56 of file ThreadX.c.

◆ THREADX_THREAD_NAME_STR_SIZE

#define THREADX_THREAD_NAME_STR_SIZE   (200)

Enumeration Type Documentation

◆ threadx_symbol_values

Enumerator
THREADX_VAL_TX_THREAD_CURRENT_PTR 
THREADX_VAL_TX_THREAD_CREATED_PTR 
THREADX_VAL_TX_THREAD_CREATED_COUNT 

Definition at line 180 of file ThreadX.c.

Function Documentation

◆ get_stacking_info()

static const struct rtos_register_stacking * get_stacking_info ( const struct rtos rtos,
int64_t  stack_ptr 
)
static

◆ get_stacking_info_arm926ejs()

static const struct rtos_register_stacking * get_stacking_info_arm926ejs ( const struct rtos rtos,
int64_t  stack_ptr 
)
static

◆ is_thread_id_valid()

static int is_thread_id_valid ( const struct rtos rtos,
int64_t  thread_id 
)
static

◆ is_thread_id_valid_arm926ejs()

static int is_thread_id_valid_arm926ejs ( const struct rtos rtos,
int64_t  thread_id 
)
static

Definition at line 252 of file ThreadX.c.

◆ threadx_create()

static int threadx_create ( struct target target)
static

◆ threadx_detect_rtos()

static bool threadx_detect_rtos ( struct target target)
static

◆ threadx_get_symbol_list_to_lookup()

static int threadx_get_symbol_list_to_lookup ( struct symbol_table_elem symbol_list[])
static

Definition at line 489 of file ThreadX.c.

References ARRAY_SIZE, and threadx_symbol_list.

◆ threadx_get_thread_reg_list()

static int threadx_get_thread_reg_list ( struct rtos rtos,
int64_t  thread_id,
struct rtos_reg **  reg_list,
int *  num_regs 
)
static

◆ threadx_update_threads()

Variable Documentation

◆ rtos_threadx_arm926ejs_stack_offsets_interrupt

const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_interrupt[]
static
Initial value:
= {
{ 0, 0x08, 32 },
{ 1, 0x0C, 32 },
{ 2, 0x10, 32 },
{ 3, 0x14, 32 },
{ 4, 0x18, 32 },
{ 5, 0x1C, 32 },
{ 6, 0x20, 32 },
{ 7, 0x24, 32 },
{ 8, 0x28, 32 },
{ 9, 0x2C, 32 },
{ 10, 0x30, 32 },
{ 11, 0x34, 32 },
{ 12, 0x38, 32 },
{ 13, -2, 32 },
{ 14, 0x3C, 32 },
{ 15, 0x40, 32 },
{ 16, 0x04, 32 },
}

Definition at line 30 of file ThreadX.c.

◆ rtos_threadx_arm926ejs_stack_offsets_solicited

const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_solicited[]
static
Initial value:
= {
{ 0, -1, 32 },
{ 1, -1, 32 },
{ 2, -1, 32 },
{ 3, -1, 32 },
{ 4, 0x08, 32 },
{ 5, 0x0C, 32 },
{ 6, 0x10, 32 },
{ 7, 0x14, 32 },
{ 8, 0x18, 32 },
{ 9, 0x1C, 32 },
{ 10, 0x20, 32 },
{ 11, 0x24, 32 },
{ 12, -1, 32 },
{ 13, -2, 32 },
{ 14, 0x28, 32 },
{ 15, -1, 32 },
{ 16, 0x04, 32 },
}

Definition at line 30 of file ThreadX.c.

◆ rtos_threadx_arm926ejs_stacking

const struct rtos_register_stacking rtos_threadx_arm926ejs_stacking[]
static
Initial value:
= {
{
.stack_registers_size = ARM926EJS_REGISTERS_SIZE_SOLICITED,
.stack_growth_direction = -1,
.num_output_registers = 17,
},
{
.stack_registers_size = ARM926EJS_REGISTERS_SIZE_INTERRUPT,
.stack_growth_direction = -1,
.num_output_registers = 17,
},
}
#define ARM926EJS_REGISTERS_SIZE_SOLICITED
Definition: ThreadX.c:58
#define ARM926EJS_REGISTERS_SIZE_INTERRUPT
Definition: ThreadX.c:80
static const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_solicited[]
Definition: ThreadX.c:59
static const struct stack_register_offset rtos_threadx_arm926ejs_stack_offsets_interrupt[]
Definition: ThreadX.c:81

Definition at line 30 of file ThreadX.c.

◆ threadx_params_list

const struct threadx_params threadx_params_list[]
static

Definition at line 30 of file ThreadX.c.

Referenced by threadx_create().

◆ threadx_rtos

const struct rtos_type threadx_rtos
Initial value:
= {
.name = "ThreadX",
.detect_rtos = threadx_detect_rtos,
.create = threadx_create,
.update_threads = threadx_update_threads,
.get_thread_reg_list = threadx_get_thread_reg_list,
.get_symbol_list_to_lookup = threadx_get_symbol_list_to_lookup,
}
static int threadx_create(struct target *target)
Definition: ThreadX.c:607
static bool threadx_detect_rtos(struct target *target)
Definition: ThreadX.c:501
static int threadx_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
Definition: ThreadX.c:443
static int threadx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
Definition: ThreadX.c:489
static int threadx_update_threads(struct rtos *rtos)
Definition: ThreadX.c:257

Definition at line 186 of file ThreadX.c.

◆ threadx_symbol_list

const char* const threadx_symbol_list[]
static
Initial value:
= {
"_tx_thread_current_ptr",
"_tx_thread_created_ptr",
"_tx_thread_created_count",
}
#define NULL
Definition: usb.h:16

Definition at line 186 of file ThreadX.c.

Referenced by threadx_get_symbol_list_to_lookup().

◆ threadx_thread_states

const struct threadx_thread_state threadx_thread_states[]
static
Initial value:
= {
{ 0, "Ready" },
{ 1, "Completed" },
{ 2, "Terminated" },
{ 3, "Suspended" },
{ 4, "Sleeping" },
{ 5, "Waiting - Queue" },
{ 6, "Waiting - Semaphore" },
{ 7, "Waiting - Event flag" },
{ 8, "Waiting - Memory" },
{ 9, "Waiting - Memory" },
{ 10, "Waiting - I/O" },
{ 11, "Waiting - Filesystem" },
{ 12, "Waiting - Network" },
{ 13, "Waiting - Mutex" },
}

Definition at line 30 of file ThreadX.c.

Referenced by threadx_update_threads().