28 #ifdef CONFIG_DISABLE_SIGNALS
29 #define SIG_QUEUE_NUM 0
31 #define SIG_QUEUE_NUM 1
34 #ifdef CONFIG_DISABLE_MQUEUE
41 #define PAGING_QUEUE_NUM 1
43 #define PAGING_QUEUE_NUM 0
47 #define TASK_QUEUE_NUM (6 + SIG_QUEUE_NUM + M_QUEUE_NUM + PAGING_QUEUE_NUM)
76 #ifndef CONFIG_DISABLE_SIGNALS
79 #ifndef CONFIG_DISABLE_MQUEUE
112 .stack_growth_direction = -1,
113 .num_output_registers = 17,
139 .stack_growth_direction = -1,
140 .num_output_registers = 17,
155 if (strlen(
cmd) <= strlen(
name) + 1)
158 return atoi(
cmd + strlen(
name));
162 char const *packet,
int packet_size)
166 if (!strncmp(packet,
"qRcmd", 5)) {
241 uint32_t thread_count;
260 LOG_ERROR(
"target_read_buffer : ret = %d\n", ret);
275 LOG_ERROR(
"target_read_u32 : ret = %d\n", ret);
288 sizeof(
tcb), (uint8_t *)&
tcb);
290 LOG_ERROR(
"target_read_buffer : ret = %d\n",
334 struct rtos_reg **reg_list,
int *num_regs)
339 bool cm4_fpu_enabled =
false;
348 LOG_ERROR(
"Could not read CPACR register to check FPU state");
353 if (cpacr & 0x00F00000) {
static struct armv7m_common * target_to_armv7m(struct target *target)
static bool is_armv7m(const struct armv7m_common *armv7m)
size_t unhexify(uint8_t *bin, const char *hex, size_t count)
Convert a string of hexadecimal pairs into its binary representation.
int gdb_put_packet(struct connection *connection, char *buffer, int len)
The JTAG interface can be implemented with a software or hardware fifo.
#define LOG_ERROR(expr ...)
#define LOG_INFO(expr ...)
static int nuttx_thread_packet(struct connection *connection, char const *packet, int packet_size)
static char * nuttx_symbol_list[]
int rtos_thread_packet(struct connection *connection, const char *packet, int packet_size)
static int nuttx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[])
static const struct stack_register_offset nuttx_stack_offsets_cortex_m_fpu[]
static const struct stack_register_offset nuttx_stack_offsets_cortex_m[]
static int rcmd_offset(const char *cmd, const char *name)
static bool nuttx_detect_rtos(struct target *target)
static int nuttx_create(struct target *target)
static struct @51 g_tasklist[TASK_QUEUE_NUM]
struct rtos_type nuttx_rtos
static int nuttx_update_threads(struct rtos *rtos)
static const struct rtos_register_stacking nuttx_stacking_cortex_m_fpu
static char * task_state_str[]
static const struct rtos_register_stacking nuttx_stacking_cortex_m
static int nuttx_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs)
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)
void rtos_free_threadlist(struct rtos *rtos)
unsigned char stack_registers_size
int(* gdb_thread_packet)(struct connection *connection, char const *packet, int packet_size)
struct thread_detail * thread_details
struct symbol_table_elem * symbols
threadid_t current_thread
Table should be terminated by an element with NULL in symbol_name.
const char * name
Name of this type of target.
struct target_type * type
int target_read_buffer(struct target *target, target_addr_t address, uint32_t size, uint8_t *buffer)
int target_read_u32(struct target *target, target_addr_t address, uint32_t *value)
#define ARRAY_SIZE(x)
Compute the number of elements of a variable length array.