|
OpenOCD
|


Go to the source code of this file.
Data Structures | |
| struct | rtos |
| struct | rtos_reg |
| struct | rtos_register_stacking |
| struct | rtos_type |
| struct | stack_register_offset |
| struct | symbol_table_elem |
| Table should be terminated by an element with NULL in symbol_name. More... | |
| struct | thread_detail |
Macros | |
| #define | GDB_THREAD_PACKET_NOT_CONSUMED (-40) |
Typedefs | |
| typedef int64_t | symbol_address_t |
| typedef int64_t | threadid_t |
Functions | |
| int | gdb_thread_packet (struct connection *connection, char const *packet, int packet_size) |
| 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) |
| 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) |
| int | rtos_thread_packet (struct connection *connection, const char *packet, int packet_size) |
| 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 | |
| const struct rtos_type | chibios_rtos |
| const struct rtos_type | chromium_ec_rtos |
| const struct rtos_type | ecos_rtos |
| const struct rtos_type | embkernel_rtos |
| const struct rtos_type | freertos_rtos |
| const struct rtos_type | hwthread_rtos |
| const struct rtos_type | linux_rtos |
| const struct rtos_type | mqx_rtos |
| const struct rtos_type | nuttx_rtos |
| const struct rtos_type | riot_rtos |
| const struct rtos_type | rtkernel_rtos |
| const struct rtos_type | threadx_rtos |
| const struct rtos_type | ucos_iii_rtos |
| const struct rtos_type | zephyr_rtos |
| typedef int64_t symbol_address_t |
| typedef int64_t threadid_t |
| 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().
| 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().
| 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().
| int rtos_thread_packet | ( | struct connection * | connection, |
| const char * | 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().
| 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().
|
extern |
Definition at line 366 of file chromium-ec.c.
|
extern |
Definition at line 27 of file embkernel.c.
|
extern |
Definition at line 80 of file freertos.c.
|
extern |
Definition at line 37 of file hwthread.c.
|
extern |
Definition at line 362 of file rtkernel.c.
|
extern |
Definition at line 487 of file ucos_iii.c.