|
OpenOCD
|

Go to the source code of this file.
Functions | |
| static struct symbol_table_elem * | find_symbol (const struct rtos *os, const char *symbol) |
| int | gdb_thread_packet (struct connection *connection, char const *packet, int packet_size) |
| static struct symbol_table_elem * | next_symbol (struct rtos *os, char *cur_symbol, uint64_t cur_addr) |
| static int | os_alloc (struct target *target, const struct rtos_type *ostype) |
| static int | os_alloc_create (struct target *target, const struct rtos_type *ostype) |
| static void | os_free (struct target *target) |
| 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 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. 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) |
| static int | rtos_put_gdb_reg (struct connection *connection, uint8_t *reg_value, unsigned int reg_size) |
| static int | rtos_put_gdb_reg_list (struct connection *connection, struct rtos_reg *reg_list, int num_regs) |
| 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 target * | rtos_swbp_target (struct target *target, target_addr_t address, uint32_t length, enum breakpoint_type type) |
| static int | rtos_target_for_threadid (struct connection *connection, int64_t threadid, struct target **t) |
| int | rtos_thread_packet (struct connection *connection, char const *packet, int packet_size) |
| static bool | rtos_try_next (struct target *target) |
| 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 | |
| static const struct rtos_type * | rtos_types [] |
|
static |
Definition at line 182 of file rtos.c.
References NULL, symbol_table_elem::symbol_name, and rtos::symbols.
Referenced by next_symbol(), and rtos_qsymbol().
| int gdb_thread_packet | ( | struct connection * | connection, |
| char const * | packet, | ||
| int | packet_size | ||
| ) |
Definition at line 150 of file rtos.c.
References rtos::gdb_thread_packet, get_target_from_connection(), target::rtos, and rtos_thread_packet().
Referenced by gdb_input_inner(), and gdb_restart_inferior().
|
static |
Definition at line 193 of file rtos.c.
References symbol_table_elem::address, find_symbol(), rtos_type::get_symbol_list_to_lookup, NULL, rtos::symbols, and rtos::type.
Referenced by rtos_qsymbol().
Definition at line 56 of file rtos.c.
References rtos::current_thread, rtos::current_threadid, ERROR_FAIL, ERROR_OK, rtos::gdb_target_for_threadid, rtos::gdb_thread_packet, NULL, target::rtos, rtos_target_for_threadid(), rtos_thread_packet(), rtos::symbols, rtos::target, target, and rtos::type.
Referenced by os_alloc_create(), and rtos_create().
Definition at line 87 of file rtos.c.
References rtos_type::create, ERROR_OK, os_alloc(), os_free(), target::rtos, and rtos::type.
Referenced by rtos_create().
|
static |
Definition at line 76 of file rtos.c.
References NULL, target::rtos, rtos_free_threadlist(), and rtos::symbols.
Referenced by os_alloc_create(), rtos_create(), and rtos_destroy().
| int rtos_create | ( | struct command_invocation * | cmd, |
| struct target * | target, | ||
| const char * | rtos_name | ||
| ) |
Definition at line 100 of file rtos.c.
References alloc_printf(), ARRAY_SIZE, cmd, command_print(), ERROR_COMMAND_ARGUMENT_INVALID, ERROR_FAIL, ERROR_OK, LOG_ERROR, name, NULL, os_alloc(), os_alloc_create(), os_free(), target::rtos_auto_detect, and rtos_types.
Referenced by COMMAND_HELPER().
| void rtos_destroy | ( | struct target * | target | ) |
Definition at line 145 of file rtos.c.
References os_free().
Referenced by COMMAND_HANDLER(), and target_destroy().
| void rtos_free_threadlist | ( | struct rtos * | rtos | ) |
Definition at line 740 of file rtos.c.
References rtos::current_thread, rtos::current_threadid, NULL, rtos::thread_count, and rtos::thread_details.
Referenced by chibios_update_threads(), chromium_ec_update_threads(), ecos_update_threads(), embkernel_update_threads(), freertos_update_threads(), hwthread_update_threads(), mqx_update_threads(), nuttx_update_threads(), os_free(), riot_update_threads(), rtkernel_update_threads(), threadx_update_threads(), ucos_iii_update_threads(), and zephyr_fetch_thread_list().
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().
| 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 | ||
| ) |
Definition at line 655 of file rtos.c.
References address, buf_cpy(), rtos_register_stacking::calculate_process_stack, ERROR_OK, LOG_DEBUG, LOG_ERROR, LOG_OUTPUT, rtos_register_stacking::num_output_registers, stack_register_offset::number, offset, stack_register_offset::offset, rtos_register_stacking::read_stack, rtos_register_stacking::register_offsets, size, rtos_register_stacking::stack_growth_direction, rtos_register_stacking::stack_registers_size, target_read_buffer(), and stack_register_offset::width_bits.
Referenced by chibios_get_thread_reg_list(), chromium_ec_get_thread_reg_list(), ecos_get_thread_reg_list(), embkernel_get_thread_reg_list(), freertos_get_thread_reg_list(), mqx_get_thread_reg_list(), nuttx_getregs_fromstack(), riot_get_thread_reg_list(), rtkernel_get_thread_reg_list(), threadx_get_thread_reg_list(), ucos_iii_get_thread_reg_list(), zephyr_get_arc_state(), and zephyr_get_arm_state().
| int rtos_get_gdb_reg | ( | struct connection * | connection, |
| int | reg_num | ||
| ) |
Look through all registers to find this register.
Definition at line 551 of file rtos.c.
References rtos::current_thread, rtos::current_threadid, ERROR_NOT_IMPLEMENTED, ERROR_OK, get_target_from_connection(), rtos_type::get_thread_reg_list, rtos_type::get_thread_reg_value, LOG_DEBUG, LOG_ERROR, number, target::rtos, rtos_put_gdb_reg(), rtos_put_gdb_reg_list(), target::smp, and rtos::type.
Referenced by gdb_get_register_packet().
| int rtos_get_gdb_reg_list | ( | struct connection * | connection | ) |
Return a list of general registers.
Definition at line 608 of file rtos.c.
References rtos::current_thread, rtos::current_threadid, ERROR_FAIL, ERROR_OK, get_target_from_connection(), rtos_type::get_thread_reg_list, LOG_DEBUG, LOG_ERROR, target::rtos, rtos_put_gdb_reg_list(), target::smp, and rtos::type.
Referenced by gdb_get_registers_packet().
| 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().
|
static |
Definition at line 507 of file rtos.c.
References DIV_ROUND_UP, ERROR_FAIL, ERROR_OK, gdb_put_packet(), hexify(), and LOG_ERROR.
Referenced by rtos_get_gdb_reg().
|
static |
Definition at line 527 of file rtos.c.
References count, DIV_ROUND_UP, ERROR_OK, gdb_put_packet(), hexify(), and size.
Referenced by rtos_get_gdb_reg(), and rtos_get_gdb_reg_list().
| int rtos_qsymbol | ( | struct connection * | connection, |
| char const * | packet, | ||
| int | packet_size | ||
| ) |
Definition at line 235 of file rtos.c.
References addr, rtos_type::detect_rtos, find_symbol(), GDB_BUFFER_SIZE, gdb_put_packet(), get_target_from_connection(), hexify(), LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING, rtos_type::name, next_symbol(), NULL, symbol_table_elem::optional, target::rtos, target::rtos_auto_detect, rtos_try_next(), symbol_table_elem::symbol_name, rtos::type, and unhexify().
Referenced by linux_thread_packet(), and rtos_thread_packet().
| int rtos_read_buffer | ( | struct target * | target, |
| target_addr_t | address, | ||
| uint32_t | size, | ||
| uint8_t * | buffer | ||
| ) |
Definition at line 758 of file rtos.c.
References address, buffer, ERROR_NOT_IMPLEMENTED, rtos_type::read_buffer, target::rtos, size, and rtos::type.
Referenced by gdb_read_memory_packet().
| int rtos_set_reg | ( | struct connection * | connection, |
| int | reg_num, | ||
| uint8_t * | reg_value | ||
| ) |
Definition at line 641 of file rtos.c.
References rtos::current_threadid, ERROR_FAIL, get_target_from_connection(), target::rtos, rtos_type::set_reg, and rtos::type.
Referenced by gdb_set_register_packet().
| 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().
| 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().
|
static |
Definition at line 47 of file rtos.c.
References ERROR_OK, and get_target_from_connection().
Referenced by os_alloc().
| int rtos_thread_packet | ( | struct connection * | connection, |
| char const * | packet, | ||
| int | packet_size | ||
| ) |
Definition at line 355 of file rtos.c.
References buffer, rtos_type::create, rtos::current_thread, rtos::current_threadid, ERROR_FAIL, ERROR_OK, thread_detail::exists, thread_detail::extra_info_str, gdb_put_packet(), GDB_THREAD_PACKET_NOT_CONSUMED, get_target_from_connection(), hexify(), LOG_DEBUG, LOG_ERROR, target::rtos, target::rtos_auto_detect, rtos_qsymbol(), size, rtos::thread_count, rtos::thread_details, thread_detail::thread_name_str, thread_detail::threadid, rtos::type, and rtos_type::update_threads.
Referenced by ecos_packet_hook(), gdb_thread_packet(), hwthread_thread_packet(), and os_alloc().
|
static |
Definition at line 159 of file rtos.c.
References ARRAY_SIZE, NULL, target::rtos, rtos_types, rtos::symbols, and rtos::type.
Referenced by rtos_qsymbol().
| int rtos_update_threads | ( | struct target * | target | ) |
Definition at line 732 of file rtos.c.
References ERROR_OK, rtos_from_target(), rtos::type, and rtos_type::update_threads.
Referenced by gdb_fileio_reply(), gdb_new_connection(), and gdb_signal_reply().
| int rtos_write_buffer | ( | struct target * | target, |
| target_addr_t | address, | ||
| uint32_t | size, | ||
| const uint8_t * | buffer | ||
| ) |
Definition at line 766 of file rtos.c.
References address, buffer, ERROR_NOT_IMPLEMENTED, target::rtos, size, rtos::type, and rtos_type::write_buffer.
Referenced by gdb_write_memory_binary_packet(), and gdb_write_memory_packet().
|
static |
Definition at line 20 of file rtos.c.
Referenced by rtos_create(), and rtos_try_next().