Go to the source code of this file.
|
enum | zephyr_offsets {
OFFSET_VERSION
, OFFSET_K_CURR_THREAD
, OFFSET_K_THREADS
, OFFSET_T_ENTRY
,
OFFSET_T_NEXT_THREAD
, OFFSET_T_STATE
, OFFSET_T_USER_OPTIONS
, OFFSET_T_PRIO
,
OFFSET_T_STACK_POINTER
, OFFSET_T_NAME
, OFFSET_T_ARCH
, OFFSET_T_PREEMPT_FLOAT
,
OFFSET_T_COOP_FLOAT
, OFFSET_MAX
} |
|
enum | zephyr_symbol_values {
ZEPHYR_VAL__KERNEL
, ZEPHYR_VAL__KERNEL_OPENOCD_OFFSETS
, ZEPHYR_VAL__KERNEL_OPENOCD_SIZE_T_SIZE
, ZEPHYR_VAL__KERNEL_OPENOCD_NUM_OFFSETS
,
ZEPHYR_VAL_COUNT
} |
|
|
static void * | zephyr_array_append (struct zephyr_array *array, size_t size) |
|
static void * | zephyr_array_detach_ptr (struct zephyr_array *array) |
|
static void | zephyr_array_free (struct zephyr_array *array) |
|
static void | zephyr_array_init (struct zephyr_array *array) |
|
static target_addr_t | zephyr_cortex_m_stack_align (struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr) |
|
static int | zephyr_create (struct target *target) |
|
static bool | zephyr_detect_rtos (struct target *target) |
|
static int | zephyr_fetch_thread (const struct rtos *rtos, struct zephyr_thread *thread, uint32_t ptr) |
|
static int | zephyr_fetch_thread_list (struct rtos *rtos, uint32_t current_thread) |
|
static int | zephyr_get_arc_state (struct rtos *rtos, target_addr_t *addr, struct zephyr_params *params, struct rtos_reg *callee_saved_reg_list, struct rtos_reg **reg_list, int *num_regs) |
|
static int | zephyr_get_arm_state (struct rtos *rtos, target_addr_t *addr, struct zephyr_params *params, struct rtos_reg *callee_saved_reg_list, struct rtos_reg **reg_list, int *num_regs) |
|
static int | zephyr_get_symbol_list_to_lookup (struct symbol_table_elem **symbol_list) |
|
static int | zephyr_get_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs) |
|
static uint32_t | zephyr_kptr (const struct rtos *rtos, enum zephyr_offsets off) |
|
static int | zephyr_update_threads (struct rtos *rtos) |
|
◆ ARC_AUX_SEC_BUILD_REG
#define ARC_AUX_SEC_BUILD_REG 0xdb |
◆ ARC_REG_NUM
◆ ARM_XPSR_OFFSET
#define ARM_XPSR_OFFSET 28 |
◆ UNIMPLEMENTED
#define UNIMPLEMENTED 0xFFFFFFFFU |
◆ zephyr_offsets
Enumerator |
---|
OFFSET_VERSION | |
OFFSET_K_CURR_THREAD | |
OFFSET_K_THREADS | |
OFFSET_T_ENTRY | |
OFFSET_T_NEXT_THREAD | |
OFFSET_T_STATE | |
OFFSET_T_USER_OPTIONS | |
OFFSET_T_PRIO | |
OFFSET_T_STACK_POINTER | |
OFFSET_T_NAME | |
OFFSET_T_ARCH | |
OFFSET_T_PREEMPT_FLOAT | |
OFFSET_T_COOP_FLOAT | |
OFFSET_MAX | |
Definition at line 46 of file zephyr.c.
◆ zephyr_symbol_values
Enumerator |
---|
ZEPHYR_VAL__KERNEL | |
ZEPHYR_VAL__KERNEL_OPENOCD_OFFSETS | |
ZEPHYR_VAL__KERNEL_OPENOCD_SIZE_T_SIZE | |
ZEPHYR_VAL__KERNEL_OPENOCD_NUM_OFFSETS | |
ZEPHYR_VAL_COUNT | |
Definition at line 184 of file zephyr.c.
◆ zephyr_array_append()
static void* zephyr_array_append |
( |
struct zephyr_array * |
array, |
|
|
size_t |
size |
|
) |
| |
|
static |
◆ zephyr_array_detach_ptr()
static void* zephyr_array_detach_ptr |
( |
struct zephyr_array * |
array | ) |
|
|
static |
◆ zephyr_array_free()
static void zephyr_array_free |
( |
struct zephyr_array * |
array | ) |
|
|
static |
◆ zephyr_array_init()
static void zephyr_array_init |
( |
struct zephyr_array * |
array | ) |
|
|
static |
◆ zephyr_cortex_m_stack_align()
◆ zephyr_create()
static int zephyr_create |
( |
struct target * |
target | ) |
|
|
static |
Definition at line 417 of file zephyr.c.
References ARC_AUX_SEC_BUILD_REG, arc_cpu_saved, arc_cpu_saved_stacking, arc_jtag_read_aux_reg_one(), ARC_REG_NUM, CHECK_RETVAL, ERROR_FAIL, ERROR_OK, arc_common::jtag_info, LOG_DEBUG, LOG_ERROR, LOG_INFO, name, stack_register_offset::offset, target::rtos, rtos::rtos_specific_params, rtos_register_stacking::stack_registers_size, zephyr_params::target_name, target_to_arc(), target_type_name(), and zephyr_params_list.
◆ zephyr_detect_rtos()
static bool zephyr_detect_rtos |
( |
struct target * |
target | ) |
|
|
static |
◆ zephyr_fetch_thread()
static int zephyr_fetch_thread |
( |
const struct rtos * |
rtos, |
|
|
struct zephyr_thread * |
thread, |
|
|
uint32_t |
ptr |
|
) |
| |
|
static |
Definition at line 506 of file zephyr.c.
References zephyr_thread::entry, ERROR_OK, LOG_DEBUG, zephyr_thread::name, zephyr_thread::next_ptr, OFFSET_T_ENTRY, OFFSET_T_NAME, OFFSET_T_NEXT_THREAD, OFFSET_T_PRIO, OFFSET_T_STACK_POINTER, OFFSET_T_STATE, OFFSET_T_USER_OPTIONS, param, prio, zephyr_thread::prio, zephyr_thread::ptr, rtos::rtos_specific_params, zephyr_thread::stack_pointer, zephyr_thread::state, rtos::target, target_read_buffer(), target_read_u32(), target_read_u8(), UNIMPLEMENTED, and zephyr_thread::user_options.
Referenced by zephyr_fetch_thread_list().
◆ zephyr_fetch_thread_list()
static int zephyr_fetch_thread_list |
( |
struct rtos * |
rtos, |
|
|
uint32_t |
current_thread |
|
) |
| |
|
static |
Definition at line 567 of file zephyr.c.
References alloc_printf(), rtos::current_thread, rtos::current_threadid, zephyr_array::elements, zephyr_thread::entry, ERROR_FAIL, ERROR_OK, thread_detail::exists, thread_detail::extra_info_str, LOG_DEBUG, LOG_ERROR, zephyr_thread::name, zephyr_thread::next_ptr, OFFSET_K_THREADS, zephyr_thread::prio, zephyr_thread::ptr, zephyr_array::ptr, rtos_free_threadlist(), rtos::target, target_read_u32(), rtos::thread_count, rtos::thread_details, thread_detail::thread_name_str, thread_detail::threadid, zephyr_thread::user_options, zephyr_array_append(), zephyr_array_detach_ptr(), zephyr_array_free(), zephyr_array_init(), zephyr_fetch_thread(), and zephyr_kptr().
Referenced by zephyr_update_threads().
◆ zephyr_get_arc_state()
Definition at line 226 of file zephyr.c.
References addr, ARC_BLINK, arc_cpu_saved, arc_cpu_saved_stacking, ARC_PC, ARC_SP, ARRAY_SIZE, buf_cpy(), zephyr_params::callee_saved_stacking, zephyr_params::cpu_saved_nofp_stacking, ERROR_FAIL, ERROR_OK, LOG_ERROR, number, rtos_generic_stack_read(), size, rtos_register_stacking::stack_registers_size, rtos::target, and target_read_u32().
◆ zephyr_get_arm_state()
Definition at line 297 of file zephyr.c.
References addr, buf_cpy(), zephyr_params::callee_saved_stacking, zephyr_params::cpu_saved_fp_stacking, zephyr_params::cpu_saved_nofp_stacking, ERROR_OK, number, OFFSET_T_PREEMPT_FLOAT, zephyr_params::offsets, rtos_generic_stack_read(), size, rtos::target, target_buffer_get_u32(), UNIMPLEMENTED, and rtos_reg::value.
◆ zephyr_get_symbol_list_to_lookup()
static int zephyr_get_symbol_list_to_lookup |
( |
struct symbol_table_elem ** |
symbol_list | ) |
|
|
static |
◆ zephyr_get_thread_reg_list()
static int zephyr_get_thread_reg_list |
( |
struct rtos * |
rtos, |
|
|
int64_t |
thread_id, |
|
|
struct rtos_reg ** |
reg_list, |
|
|
int * |
num_regs |
|
) |
| |
|
static |
Definition at line 746 of file zephyr.c.
References addr, zephyr_params::callee_saved_stacking, ERROR_FAIL, zephyr_params::get_cpu_state, LOG_INFO, NULL, stack_register_offset::offset, OFFSET_T_STACK_POINTER, zephyr_params::offsets, rtos_register_stacking::register_offsets, and rtos::rtos_specific_params.
◆ zephyr_kptr()
◆ zephyr_update_threads()
static int zephyr_update_threads |
( |
struct rtos * |
rtos | ) |
|
|
static |
Definition at line 635 of file zephyr.c.
References symbol_table_elem::address, ERROR_FAIL, ERROR_OK, LOG_DEBUG, LOG_ERROR, OFFSET_K_CURR_THREAD, OFFSET_MAX, OFFSET_T_COOP_FLOAT, OFFSET_T_STACK_POINTER, OFFSET_VERSION, param, rtos::rtos_specific_params, rtos::symbols, rtos::target, target_read_u32(), target_read_u8(), UNIMPLEMENTED, zephyr_fetch_thread_list(), zephyr_kptr(), ZEPHYR_VAL__KERNEL, ZEPHYR_VAL__KERNEL_OPENOCD_NUM_OFFSETS, ZEPHYR_VAL__KERNEL_OPENOCD_OFFSETS, and ZEPHYR_VAL__KERNEL_OPENOCD_SIZE_T_SIZE.
◆ arc_callee_saved
Initial value:
Definition at line 1 of file zephyr.c.
◆ arc_callee_saved_stacking
Initial value:= {
.stack_registers_size = 64,
.stack_growth_direction = -1,
}
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.
static const struct stack_register_offset arc_callee_saved[]
Definition at line 1 of file zephyr.c.
◆ arc_cpu_saved
◆ arc_cpu_saved_stacking
◆ arm_callee_saved
Initial value:
Definition at line 1 of file zephyr.c.
◆ arm_callee_saved_stacking
Initial value:= {
.stack_registers_size = 36,
.stack_growth_direction = -1,
}
static const struct stack_register_offset arm_callee_saved[]
Definition at line 1 of file zephyr.c.
◆ arm_cpu_saved
Initial value:
Definition at line 1 of file zephyr.c.
◆ arm_cpu_saved_fp_stacking
Initial value:= {
.stack_registers_size = 32 + 18 * 4,
.stack_growth_direction = -1,
}
static target_addr_t zephyr_cortex_m_stack_align(struct target *target, const uint8_t *stack_data, const struct rtos_register_stacking *stacking, target_addr_t stack_ptr)
static const struct stack_register_offset arm_cpu_saved[]
Definition at line 192 of file zephyr.c.
◆ arm_cpu_saved_nofp_stacking
Initial value:= {
.stack_registers_size = 32,
.stack_growth_direction = -1,
}
Definition at line 192 of file zephyr.c.
◆ zephyr_params_list
◆ zephyr_rtos
Initial value:= {
.name = "Zephyr",
}
static int zephyr_get_symbol_list_to_lookup(struct symbol_table_elem **symbol_list)
static int zephyr_create(struct target *target)
static int zephyr_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
static int zephyr_update_threads(struct rtos *rtos)
static bool zephyr_detect_rtos(struct target *target)
Definition at line 776 of file zephyr.c.
◆ zephyr_symbol_list
Initial value:= {
{
.symbol_name = "_kernel",
.optional = false
},
{
.symbol_name = "_kernel_thread_info_offsets",
.optional = false
},
{
.symbol_name = "_kernel_thread_info_size_t_size",
.optional = false
},
{
.symbol_name = "_kernel_thread_info_num_offsets",
.optional = true
},
{
}
}
Definition at line 297 of file zephyr.c.
Referenced by zephyr_get_symbol_list_to_lookup().