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 jim_getopt_info *goi, struct target *target) |
void | rtos_destroy (struct target *target) |
void | rtos_free_threadlist (struct rtos *rtos) |
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... | |
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) |
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) |
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 164 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 jim_getopt_info * | goi, |
struct target * | target | ||
) |
Definition at line 114 of file rtos.c.
References jim_getopt_info::argc, jim_getopt_info::argv, jim_getopt_info::interp, jim_getopt_info::isconfigure, jim_getopt_string(), rtos_type::name, name, NULL, os_alloc(), os_alloc_create(), os_free(), target::rtos_auto_detect, and rtos_types.
Referenced by target_configure().
void rtos_destroy | ( | struct target * | target | ) |
Definition at line 159 of file rtos.c.
References os_free().
Referenced by target_create(), and target_destroy().
void rtos_free_threadlist | ( | struct rtos * | rtos | ) |
Definition at line 707 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(), riot_update_threads(), threadx_update_threads(), ucos_iii_update_threads(), and zephyr_fetch_thread_list().
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 617 of file rtos.c.
References 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::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_get_thread_reg_list(), riot_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 518 of file rtos.c.
References rtos::current_thread, rtos::current_threadid, ERROR_FAIL, ERROR_OK, get_target_from_connection(), rtos_type::get_thread_reg, rtos_type::get_thread_reg_list, LOG_DEBUG, LOG_ERROR, number, target::rtos, 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 570 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().
int rtos_qsymbol | ( | struct connection * | connection, |
char const * | packet, | ||
int | packet_size | ||
) |
Definition at line 226 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 725 of file rtos.c.
References 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 603 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 55 of file rtos.c.
References ERROR_TARGET_INIT_FAILED, target::rtos, rtos_type::smp_init, and rtos::type.
Referenced by jim_target_smp().
int rtos_update_threads | ( | struct target * | target | ) |
Definition at line 700 of file rtos.c.
References ERROR_OK, target::rtos, rtos::type, and rtos_type::update_threads.
Referenced by gdb_fileio_reply(), gdb_handle_vcont_packet(), 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 733 of file rtos.c.
References 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().