OpenOCD
|
Go to the source code of this file.
Data Structures | |
struct | cpu_context |
struct | current_thread |
struct | linux_os |
struct | threads |
Macros | |
#define | INIT_TASK 0 |
#define | LINUX_USER_KERNEL_BORDER 0xc0000000 |
#define | MAX_THREADS 200 |
#define | PHYS |
Functions | |
static struct current_thread * | add_current_thread (struct current_thread *currents, struct current_thread *ct) |
static int | clean_threadlist (struct target *target) |
static struct cpu_context * | cpu_context_read (struct target *target, uint32_t base_addr, uint32_t *info_addr) |
static int | current_base_addr (struct linux_os *linux_os, uint32_t base_addr) |
static int | fill_buffer (struct target *target, uint32_t addr, uint8_t *buffer) |
static int | fill_task (struct target *target, struct threads *t) |
static uint32_t | get_buffer (struct target *target, const uint8_t *buffer) |
static int | get_current (struct target *target, int create) |
static int | get_name (struct target *target, struct threads *t) |
static int | insert_into_threadlist (struct target *target, struct threads *t) |
static int | linux_compute_virt2phys (struct target *target, target_addr_t address) |
static int | linux_gdb_h_packet (struct connection *connection, struct target *target, char const *packet, int packet_size) |
static int | linux_gdb_t_packet (struct connection *connection, struct target *target, char const *packet, int packet_size) |
static int | linux_gdb_thread_packet (struct target *target, struct connection *connection, char const *packet, int packet_size) |
static int | linux_gdb_thread_update (struct target *target, struct connection *connection, char const *packet, int packet_size) |
static int | linux_get_symbol_list_to_lookup (struct symbol_table_elem *symbol_list[]) |
static int | linux_get_tasks (struct target *target, int context) |
static void | linux_identify_current_threads (struct target *target) |
static int | linux_os_clean (struct target *target) |
static int | linux_os_create (struct target *target) |
static bool | linux_os_detect (struct target *target) |
static int | linux_os_dummy_update (struct rtos *rtos) |
static int | linux_os_smp_init (struct target *target) |
static int | linux_os_thread_reg_list (struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs) |
static char * | linux_ps_command (struct target *target) |
static int | linux_read_memory (struct target *target, uint32_t address, uint32_t size, uint32_t count, uint8_t *buffer) |
static int | linux_task_update (struct target *target, int context) |
static int | linux_thread_extra_info (struct target *target, struct connection *connection, char const *packet, int packet_size) |
static int | linux_thread_packet (struct connection *connection, char const *packet, int packet_size) |
static struct threads * | liste_add_task (struct threads *task_list, struct threads *t, struct threads **last) |
static struct threads * | liste_del_task (struct threads *task_list, struct threads **t, struct threads *prev) |
static uint32_t | next_task (struct target *target, struct threads *t) |
Variables | |
const struct rtos_type | linux_rtos |
static const char *const | linux_symbol_list [] |
|
static |
Definition at line 586 of file linux.c.
References current_thread::next, and NULL.
Referenced by linux_os_create(), and linux_os_smp_init().
|
static |
Definition at line 759 of file linux.c.
References ERROR_OK, target::rtos, rtos::rtos_specific_params, and linux_os::thread_list.
Referenced by linux_os_clean().
|
static |
Definition at line 471 of file linux.c.
References buffer, CPU_CONT, ERROR_FAIL, ERROR_OK, fill_buffer(), cpu_context::FP, get_buffer(), cpu_context::IP, linux_read_memory(), LINUX_USER_KERNEL_BORDER, LOG_ERROR, LOG_INFO, cpu_context::PC, PREEMPT, cpu_context::preempt_count, QAT, cpu_context::R4, cpu_context::R5, cpu_context::R6, cpu_context::R7, cpu_context::R8, cpu_context::R9, cpu_context::SP, and target_buffer_get_u32().
Referenced by linux_get_tasks(), and linux_task_update().
|
static |
Definition at line 650 of file linux.c.
References linux_os::current_threads, current_thread::next, and current_thread::TS.
Referenced by linux_get_tasks().
|
static |
Definition at line 137 of file linux.c.
References addr, buffer, linux_read_memory(), and LOG_INFO.
Referenced by cpu_context_read(), fill_task(), get_current(), and next_task().
Definition at line 283 of file linux.c.
References threads::asid, threads::base_addr, buffer, ERROR_OK, fill_buffer(), get_buffer(), LOG_ERROR, MEM, MM_CTX, threads::oncpu, ONCPU, PID, threads::pid, and threads::state.
Referenced by get_current(), linux_get_tasks(), linux_identify_current_threads(), and linux_task_update().
|
static |
Definition at line 148 of file linux.c.
References buffer, and target_buffer_get_u32().
Referenced by cpu_context_read(), fill_task(), get_current(), and next_task().
|
static |
Definition at line 385 of file linux.c.
References threads::base_addr, buffer, current_thread::core_id, target::coreid, linux_os::current_threads, ERROR_OK, ERROR_TARGET_FAILURE, fill_buffer(), fill_task(), foreach_smp_target, reg_arch_type::get, get_buffer(), get_name(), insert_into_threadlist(), LOG_ERROR, current_thread::next, threads::oncpu, ONCPU, threads::pid, REG_CLASS_GENERAL, target::rtos, rtos::rtos_specific_params, target::smp_targets, threads::status, target_list::target, target_get_gdb_reg_list(), linux_os::thread_count, threads::thread_info_addr, current_thread::threadid, threads::threadid, current_thread::TS, reg::type, reg::valid, and reg::value.
Referenced by linux_get_tasks(), and linux_task_update().
Definition at line 339 of file linux.c.
References threads::base_addr, COMM, ERROR_FAIL, ERROR_OK, linux_read_memory(), LOG_ERROR, threads::name, and target_buffer_get_u32().
Referenced by get_current(), linux_gdb_h_packet(), linux_get_tasks(), linux_identify_current_threads(), and linux_task_update().
Definition at line 793 of file linux.c.
References ERROR_OK, threads::next, NULL, target::rtos, rtos::rtos_specific_params, threads::status, linux_os::thread_list, threads::threadid, and linux_os::threadid_count.
Referenced by get_current(), linux_identify_current_threads(), and linux_task_update().
|
static |
Definition at line 98 of file linux.c.
References ERROR_FAIL, ERROR_OK, linux_os::init_task_addr, LOG_ERROR, linux_os::phys_base, linux_os::phys_mask, target::rtos, rtos::rtos_specific_params, target::type, and target_type::virt2phys.
Referenced by linux_thread_packet().
|
static |
Definition at line 1211 of file linux.c.
References threads::base_addr, target::coreid, rtos::current_threadid, linux_os::current_threads, ERROR_OK, gdb_put_packet(), get_name(), LOG_INFO, threads::name, current_thread::next, target::rtos, rtos::rtos_specific_params, and linux_os::threads_lookup.
Referenced by linux_thread_packet().
|
static |
Definition at line 1151 of file linux.c.
References ERROR_OK, gdb_put_packet(), linux_task_update(), liste_del_task(), LOG_INFO, threads::next, NULL, target::rtos, rtos::rtos_specific_params, threads::status, linux_os::thread_count, linux_os::thread_list, threads::threadid, and linux_os::threads_needs_update.
Referenced by linux_thread_packet().
|
static |
Definition at line 1021 of file linux.c.
References ERROR_OK, ERROR_TARGET_FAILURE, gdb_put_packet(), linux_os::init_task_addr, linux_get_tasks(), LOG_INFO, MAX_THREADS, threads::next, target::rtos, rtos::rtos_specific_params, linux_os::thread_list, and threads::threadid.
Referenced by linux_thread_packet().
|
static |
Definition at line 1058 of file linux.c.
References ERROR_OK, gdb_put_packet(), MAX_THREADS, threads::next, linux_os::preupdtate_threadid_count, target::rtos, rtos::rtos_specific_params, linux_os::thread_list, and linux_os::threadid_count.
Referenced by linux_thread_packet().
|
static |
Definition at line 236 of file linux.c.
References ARRAY_SIZE, linux_symbol_list, and symbol_table_elem::symbol_name.
|
static |
Definition at line 671 of file linux.c.
References threads::base_addr, threads::context, cpu_context_read(), current_base_addr(), ERROR_FAIL, ERROR_OK, fill_task(), get_current(), get_name(), linux_os::init_task_addr, liste_add_task(), LOG_INFO, MAX_THREADS, next_task(), NULL, threads::pid, linux_os::preupdtate_threadid_count, target::rtos, rtos::rtos_specific_params, start, threads::status, linux_os::thread_count, threads::thread_info_addr, linux_os::thread_list, threads::threadid, linux_os::threadid_count, linux_os::threads_lookup, linux_os::threads_needs_update, and timeval_ms().
Referenced by linux_gdb_thread_packet(), and linux_ps_command().
|
static |
Definition at line 816 of file linux.c.
References threads::base_addr, linux_os::current_threads, ERROR_OK, fill_task(), get_name(), insert_into_threadlist(), LOG_ERROR, LOG_INFO, threads::name, threads::next, NULL, threads::pid, target::rtos, rtos::rtos_specific_params, threads::status, linux_os::thread_count, threads::thread_info_addr, linux_os::thread_list, and threads::threadid.
Referenced by linux_task_update().
|
static |
Definition at line 777 of file linux.c.
References clean_threadlist(), ERROR_OK, linux_os::init_task_addr, linux_os::name, linux_os::nr_cpus, NULL, target::rtos, rtos::rtos_specific_params, linux_os::thread_count, linux_os::thread_list, linux_os::threadid_count, linux_os::threads_lookup, and linux_os::threads_needs_update.
|
static |
Definition at line 1406 of file linux.c.
References add_current_thread(), current_thread::core_id, target::coreid, rtos::current_threadid, linux_os::current_threads, rtos::gdb_thread_packet, linux_os::init_task_addr, linux_thread_packet(), LOG_INFO, linux_os::name, linux_os::nr_cpus, NULL, linux_os::phys_base, linux_os::phys_mask, target::rtos, rtos::rtos_specific_params, linux_os::thread_count, linux_os::thread_list, current_thread::threadid, linux_os::threadid_count, linux_os::threads_lookup, linux_os::threads_needs_update, and current_thread::TS.
|
static |
|
static |
|
static |
Definition at line 1375 of file linux.c.
References add_current_thread(), target::coreid, linux_os::current_threads, ERROR_OK, foreach_smp_target, linux_os::nr_cpus, target::rtos, rtos::rtos_specific_params, target::smp_targets, target_list::target, and current_thread::threadid.
|
static |
Definition at line 156 of file linux.c.
References linux_os::current_threads, current_thread::next, target::rtos, rtos::rtos_specific_params, and rtos::target.
|
static |
Definition at line 1435 of file linux.c.
References threads::asid, threads::context, ERROR_OK, linux_get_tasks(), linux_task_update(), LOG_INFO, threads::name, threads::next, threads::oncpu, threads::pid, target::rtos, rtos::rtos_specific_params, threads::status, linux_os::thread_count, linux_os::thread_list, linux_os::threads_lookup, and linux_os::threads_needs_update.
|
static |
Definition at line 117 of file linux.c.
References buffer, count, ERROR_FAIL, ERROR_OK, LOG_ERROR, linux_os::phys_base, linux_os::phys_mask, target::rtos, rtos::rtos_specific_params, size, target_read_memory(), and target_read_phys_memory().
Referenced by cpu_context_read(), fill_buffer(), and get_name().
|
static |
Definition at line 904 of file linux.c.
References threads::base_addr, threads::context, cpu_context_read(), ERROR_FAIL, ERROR_OK, fill_task(), get_current(), get_name(), linux_os::init_task_addr, insert_into_threadlist(), linux_identify_current_threads(), LOG_INFO, threads::next, next_task(), NULL, threads::pid, target::rtos, rtos::rtos_specific_params, start, threads::status, linux_os::thread_count, threads::thread_info_addr, linux_os::thread_list, linux_os::threads_needs_update, and timeval_ms().
Referenced by linux_gdb_t_packet(), and linux_ps_command().
|
static |
Definition at line 1105 of file linux.c.
References ERROR_OK, gdb_put_packet(), hexify(), LOG_INFO, threads::name, name, threads::next, threads::pid, target::rtos, rtos::rtos_specific_params, threads::status, linux_os::thread_list, and threads::threadid.
Referenced by linux_thread_packet().
|
static |
Definition at line 1280 of file linux.c.
References symbol_table_elem::address, current_thread::core_id, target::coreid, rtos::current_threadid, linux_os::current_threads, ERROR_OK, gdb_put_packet(), GDB_THREAD_PACKET_NOT_CONSUMED, get_target_from_connection(), INIT_TASK, linux_compute_virt2phys(), linux_gdb_h_packet(), linux_gdb_t_packet(), linux_gdb_thread_packet(), linux_gdb_thread_update(), linux_thread_extra_info(), LOG_INFO, LOG_WARNING, current_thread::next, target::rtos, rtos_qsymbol(), rtos::rtos_specific_params, rtos::symbols, linux_os::thread_list, current_thread::threadid, linux_os::threads_lookup, and linux_os::threads_needs_update.
Referenced by linux_os_create().
|
static |
Definition at line 622 of file linux.c.
References threads::next, and NULL.
Referenced by linux_get_tasks().
|
static |
Definition at line 605 of file linux.c.
References LOG_INFO, and threads::next.
Referenced by linux_gdb_t_packet().
Definition at line 567 of file linux.c.
References threads::base_addr, buffer, ERROR_OK, fill_buffer(), get_buffer(), LOG_ERROR, and NEXT.
Referenced by linux_get_tasks(), and linux_task_update().
const struct rtos_type linux_rtos |