diff options
-rw-r--r-- | src/rtos/FreeRTOS.c | 6 | ||||
-rw-r--r-- | src/rtos/ThreadX.c | 6 | ||||
-rw-r--r-- | src/rtos/chibios.c | 6 | ||||
-rw-r--r-- | src/rtos/chromium-ec.c | 4 | ||||
-rw-r--r-- | src/rtos/eCos.c | 6 | ||||
-rw-r--r-- | src/rtos/embKernel.c | 6 | ||||
-rw-r--r-- | src/rtos/hwthread.c | 6 | ||||
-rw-r--r-- | src/rtos/linux.c | 6 | ||||
-rw-r--r-- | src/rtos/mqx.c | 4 | ||||
-rw-r--r-- | src/rtos/nuttx.c | 6 | ||||
-rw-r--r-- | src/rtos/riot.c | 6 | ||||
-rw-r--r-- | src/rtos/rtos.c | 8 | ||||
-rw-r--r-- | src/rtos/rtos.h | 8 | ||||
-rw-r--r-- | src/rtos/uCOS-III.c | 4 |
14 files changed, 41 insertions, 41 deletions
diff --git a/src/rtos/FreeRTOS.c b/src/rtos/FreeRTOS.c index ee9b48b..4d520b9 100644 --- a/src/rtos/FreeRTOS.c +++ b/src/rtos/FreeRTOS.c @@ -109,7 +109,7 @@ static int FreeRTOS_create(struct target *target); static int FreeRTOS_update_threads(struct rtos *rtos); static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int FreeRTOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int FreeRTOS_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); struct rtos_type FreeRTOS_rtos = { .name = "FreeRTOS", @@ -474,11 +474,11 @@ static int FreeRTOS_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, return rtos_generic_stack_read(rtos->target, param->stacking_info_cm3, stack_ptr, reg_list, num_regs); } -static int FreeRTOS_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int FreeRTOS_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; *symbol_list = calloc( - ARRAY_SIZE(FreeRTOS_symbol_list), sizeof(symbol_table_elem_t)); + ARRAY_SIZE(FreeRTOS_symbol_list), sizeof(struct symbol_table_elem)); for (i = 0; i < ARRAY_SIZE(FreeRTOS_symbol_list); i++) { (*symbol_list)[i].symbol_name = FreeRTOS_symbol_list[i].name; diff --git a/src/rtos/ThreadX.c b/src/rtos/ThreadX.c index 7d58725..0b3fef0 100644 --- a/src/rtos/ThreadX.c +++ b/src/rtos/ThreadX.c @@ -39,7 +39,7 @@ static bool ThreadX_detect_rtos(struct target *target); static int ThreadX_create(struct target *target); static int ThreadX_update_threads(struct rtos *rtos); static int ThreadX_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int ThreadX_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int ThreadX_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); @@ -479,11 +479,11 @@ static int ThreadX_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, return rtos_generic_stack_read(rtos->target, stacking_info, stack_ptr, reg_list, num_regs); } -static int ThreadX_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int ThreadX_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; *symbol_list = calloc( - ARRAY_SIZE(ThreadX_symbol_list), sizeof(symbol_table_elem_t)); + ARRAY_SIZE(ThreadX_symbol_list), sizeof(struct symbol_table_elem)); for (i = 0; i < ARRAY_SIZE(ThreadX_symbol_list); i++) (*symbol_list)[i].symbol_name = ThreadX_symbol_list[i]; diff --git a/src/rtos/chibios.c b/src/rtos/chibios.c index a56d3ce..29abede 100644 --- a/src/rtos/chibios.c +++ b/src/rtos/chibios.c @@ -107,7 +107,7 @@ static int chibios_create(struct target *target); static int chibios_update_threads(struct rtos *rtos); static int chibios_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int chibios_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int chibios_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); struct rtos_type chibios_rtos = { .name = "chibios", @@ -131,7 +131,7 @@ enum chibios_symbol_values { CHIBIOS_VAL_CH_DEBUG = 2 }; -static symbol_table_elem_t chibios_symbol_list[] = { +static struct symbol_table_elem chibios_symbol_list[] = { { "rlist", 0, true}, /* Thread ready list */ { "ch", 0, true}, /* System data structure */ { "ch_debug", 0, false}, /* Memory Signature containing offsets of fields in rlist */ @@ -497,7 +497,7 @@ static int chibios_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, reg_list, num_regs); } -static int chibios_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int chibios_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { *symbol_list = malloc(sizeof(chibios_symbol_list)); diff --git a/src/rtos/chromium-ec.c b/src/rtos/chromium-ec.c index ae12a3b..1476f19 100644 --- a/src/rtos/chromium-ec.c +++ b/src/rtos/chromium-ec.c @@ -360,12 +360,12 @@ static int chromium_ec_get_thread_reg_list(struct rtos *rtos, stack_ptr, reg_list, num_regs); } -static int chromium_ec_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int chromium_ec_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { size_t s; *symbol_list = calloc(ARRAY_SIZE(chromium_ec_symbol_list), - sizeof(symbol_table_elem_t)); + sizeof(struct symbol_table_elem)); if (!(*symbol_list)) { LOG_ERROR("Chromium-EC: out of memory"); return ERROR_FAIL; diff --git a/src/rtos/eCos.c b/src/rtos/eCos.c index e6b7073..9501a55 100644 --- a/src/rtos/eCos.c +++ b/src/rtos/eCos.c @@ -31,7 +31,7 @@ static bool eCos_detect_rtos(struct target *target); static int eCos_create(struct target *target); static int eCos_update_threads(struct rtos *rtos); static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int eCos_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); struct eCos_thread_state { int value; @@ -351,11 +351,11 @@ static int eCos_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, return -1; } -static int eCos_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int eCos_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; *symbol_list = calloc( - ARRAY_SIZE(eCos_symbol_list), sizeof(symbol_table_elem_t)); + ARRAY_SIZE(eCos_symbol_list), sizeof(struct symbol_table_elem)); for (i = 0; i < ARRAY_SIZE(eCos_symbol_list); i++) (*symbol_list)[i].symbol_name = eCos_symbol_list[i]; diff --git a/src/rtos/embKernel.c b/src/rtos/embKernel.c index 2f04963..994cbc0 100644 --- a/src/rtos/embKernel.c +++ b/src/rtos/embKernel.c @@ -36,7 +36,7 @@ static int embKernel_create(struct target *target); static int embKernel_update_threads(struct rtos *rtos); static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int embKernel_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int embKernel_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); struct rtos_type embKernel_rtos = { .name = "embKernel", @@ -330,10 +330,10 @@ static int embKernel_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, return rtos_generic_stack_read(rtos->target, param->stacking_info, stack_ptr, reg_list, num_regs); } -static int embKernel_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int embKernel_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; - *symbol_list = calloc(ARRAY_SIZE(embKernel_symbol_list), sizeof(symbol_table_elem_t)); + *symbol_list = calloc(ARRAY_SIZE(embKernel_symbol_list), sizeof(struct symbol_table_elem)); for (i = 0; i < ARRAY_SIZE(embKernel_symbol_list); i++) (*symbol_list)[i].symbol_name = embKernel_symbol_list[i]; diff --git a/src/rtos/hwthread.c b/src/rtos/hwthread.c index e2d1ccf..ce24086 100644 --- a/src/rtos/hwthread.c +++ b/src/rtos/hwthread.c @@ -35,7 +35,7 @@ static int hwthread_get_thread_reg(struct rtos *rtos, int64_t thread_id, uint32_t reg_num, struct rtos_reg *rtos_reg); static int hwthread_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int hwthread_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int hwthread_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); static int hwthread_smp_init(struct target *target); static int hwthread_set_reg(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value); @@ -328,10 +328,10 @@ static int hwthread_set_reg(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_va return reg->type->set(reg, reg_value); } -static int hwthread_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int hwthread_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { /* return an empty list, we don't have any symbols to look up */ - *symbol_list = calloc(1, sizeof(symbol_table_elem_t)); + *symbol_list = calloc(1, sizeof(struct symbol_table_elem)); (*symbol_list)[0].symbol_name = NULL; return 0; } diff --git a/src/rtos/linux.c b/src/rtos/linux.c index 0cb4b54..4b96a93 100644 --- a/src/rtos/linux.c +++ b/src/rtos/linux.c @@ -246,11 +246,11 @@ static const char * const linux_symbol_list[] = { NULL }; -static int linux_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int linux_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; - *symbol_list = (symbol_table_elem_t *) - calloc(ARRAY_SIZE(linux_symbol_list), sizeof(symbol_table_elem_t)); + *symbol_list = (struct symbol_table_elem *) + calloc(ARRAY_SIZE(linux_symbol_list), sizeof(struct symbol_table_elem)); for (i = 0; i < ARRAY_SIZE(linux_symbol_list); i++) (*symbol_list)[i].symbol_name = linux_symbol_list[i]; diff --git a/src/rtos/mqx.c b/src/rtos/mqx.c index f45c15d..0914e31 100644 --- a/src/rtos/mqx.c +++ b/src/rtos/mqx.c @@ -540,9 +540,9 @@ static int mqx_get_thread_reg_list( } /* API function, export list of required symbols */ -static int mqx_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int mqx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { - *symbol_list = calloc(ARRAY_SIZE(mqx_symbol_list), sizeof(symbol_table_elem_t)); + *symbol_list = calloc(ARRAY_SIZE(mqx_symbol_list), sizeof(struct symbol_table_elem)); if (NULL == *symbol_list) return ERROR_FAIL; /* export required symbols */ diff --git a/src/rtos/nuttx.c b/src/rtos/nuttx.c index 19b93ba..6569e38 100644 --- a/src/rtos/nuttx.c +++ b/src/rtos/nuttx.c @@ -380,12 +380,12 @@ static int nuttx_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, (uint32_t)thread_id + xcpreg_offset, reg_list, num_regs); } -static int nuttx_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int nuttx_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { unsigned int i; - *symbol_list = (symbol_table_elem_t *) calloc(1, - sizeof(symbol_table_elem_t) * ARRAY_SIZE(nuttx_symbol_list)); + *symbol_list = (struct symbol_table_elem *) calloc(1, + sizeof(struct symbol_table_elem) * ARRAY_SIZE(nuttx_symbol_list)); for (i = 0; i < ARRAY_SIZE(nuttx_symbol_list); i++) (*symbol_list)[i].symbol_name = nuttx_symbol_list[i]; diff --git a/src/rtos/riot.c b/src/rtos/riot.c index 15cbb0f..dcba838 100644 --- a/src/rtos/riot.c +++ b/src/rtos/riot.c @@ -35,7 +35,7 @@ static int riot_create(struct target *target); static int riot_update_threads(struct rtos *rtos); static int riot_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, struct rtos_reg **reg_list, int *num_regs); -static int riot_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]); +static int riot_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]); struct riot_thread_state { int value; @@ -360,9 +360,9 @@ static int riot_get_thread_reg_list(struct rtos *rtos, int64_t thread_id, num_regs); } -static int riot_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int riot_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { - *symbol_list = calloc(ARRAY_SIZE(riot_symbol_list), sizeof(symbol_table_elem_t)); + *symbol_list = calloc(ARRAY_SIZE(riot_symbol_list), sizeof(struct symbol_table_elem)); if (*symbol_list == NULL) { LOG_ERROR("RIOT: out of memory"); diff --git a/src/rtos/rtos.c b/src/rtos/rtos.c index d9ba735..91d9379 100644 --- a/src/rtos/rtos.c +++ b/src/rtos/rtos.c @@ -176,9 +176,9 @@ int gdb_thread_packet(struct connection *connection, char const *packet, int pac return target->rtos->gdb_thread_packet(connection, packet, packet_size); } -static symbol_table_elem_t *next_symbol(struct rtos *os, char *cur_symbol, uint64_t cur_addr) +static struct symbol_table_elem *next_symbol(struct rtos *os, char *cur_symbol, uint64_t cur_addr) { - symbol_table_elem_t *s; + struct symbol_table_elem *s; if (!os->symbols) os->type->get_symbol_list_to_lookup(&os->symbols); @@ -200,7 +200,7 @@ static symbol_table_elem_t *next_symbol(struct rtos *os, char *cur_symbol, uint6 * if 'symbol' is not declared optional */ static bool is_symbol_mandatory(const struct rtos *os, const char *symbol) { - for (symbol_table_elem_t *s = os->symbols; s->symbol_name; ++s) { + for (struct symbol_table_elem *s = os->symbols; s->symbol_name; ++s) { if (!strcmp(s->symbol_name, symbol)) return !s->optional; } @@ -232,7 +232,7 @@ int rtos_qsymbol(struct connection *connection, char const *packet, int packet_s uint64_t addr = 0; size_t reply_len; char reply[GDB_BUFFER_SIZE + 1], cur_sym[GDB_BUFFER_SIZE / 2 + 1] = ""; /* Extra byte for null-termination */ - symbol_table_elem_t *next_sym = NULL; + struct symbol_table_elem *next_sym = NULL; struct target *target = get_target_from_connection(connection); struct rtos *os = target->rtos; diff --git a/src/rtos/rtos.h b/src/rtos/rtos.h index b437be0..b3fd01f 100644 --- a/src/rtos/rtos.h +++ b/src/rtos/rtos.h @@ -31,11 +31,11 @@ struct reg; /** * Table should be terminated by an element with NULL in symbol_name */ -typedef struct symbol_table_elem_struct { +struct symbol_table_elem { const char *symbol_name; symbol_address_t address; bool optional; -} symbol_table_elem_t; +}; struct thread_detail { threadid_t threadid; @@ -47,7 +47,7 @@ struct thread_detail { struct rtos { const struct rtos_type *type; - symbol_table_elem_t *symbols; + struct symbol_table_elem *symbols; struct target *target; /* add a context variable instead of global variable */ /* The thread currently selected by gdb. */ @@ -78,7 +78,7 @@ struct rtos_type { struct rtos_reg **reg_list, int *num_regs); int (*get_thread_reg)(struct rtos *rtos, int64_t thread_id, uint32_t reg_num, struct rtos_reg *reg); - int (*get_symbol_list_to_lookup)(symbol_table_elem_t *symbol_list[]); + int (*get_symbol_list_to_lookup)(struct symbol_table_elem *symbol_list[]); int (*clean)(struct target *target); char * (*ps_command)(struct target *target); int (*set_reg)(struct rtos *rtos, uint32_t reg_num, uint8_t *reg_value); diff --git a/src/rtos/uCOS-III.c b/src/rtos/uCOS-III.c index 304d07c..d62a219 100644 --- a/src/rtos/uCOS-III.c +++ b/src/rtos/uCOS-III.c @@ -508,9 +508,9 @@ static int uCOS_III_get_thread_reg_list(struct rtos *rtos, threadid_t threadid, num_regs); } -static int uCOS_III_get_symbol_list_to_lookup(symbol_table_elem_t *symbol_list[]) +static int uCOS_III_get_symbol_list_to_lookup(struct symbol_table_elem *symbol_list[]) { - *symbol_list = calloc(ARRAY_SIZE(uCOS_III_symbol_list), sizeof(symbol_table_elem_t)); + *symbol_list = calloc(ARRAY_SIZE(uCOS_III_symbol_list), sizeof(struct symbol_table_elem)); if (*symbol_list == NULL) { LOG_ERROR("uCOS-III: out of memory"); return ERROR_FAIL; |