uint32_t PC;
uint32_t preempt_count;
};
-struct cpu_context *cpu_context_read(struct target *target, uint32_t base_addr,
+static struct cpu_context *cpu_context_read(struct target *target, uint32_t base_addr,
uint32_t *info_addr);
static int insert_into_threadlist(struct target *target, struct threads *t);
return ERROR_OK;
}
-int fill_buffer(struct target *target, uint32_t addr, uint8_t *buffer)
+static int fill_buffer(struct target *target, uint32_t addr, uint8_t *buffer)
{
if ((addr & 0xfffffffc) != addr)
}
-uint32_t get_buffer(struct target *target, const uint8_t *buffer)
+static uint32_t get_buffer(struct target *target, const uint8_t *buffer)
{
uint32_t value = 0;
const uint8_t *value_ptr = buffer;
return ERROR_FAIL;
}
- /* search target to perfom the access */
+ /* search target to perform the access */
struct reg **gdb_reg_list;
struct target_list *head;
head = target->head;
}
#endif
-int fill_task(struct target *target, struct threads *t)
+static int fill_task(struct target *target, struct threads *t)
{
int retval;
uint32_t pid_addr = t->base_addr + PID;
return retval;
}
-int get_name(struct target *target, struct threads *t)
+static int get_name(struct target *target, struct threads *t)
{
int retval;
uint32_t full_name[4];
}
-int get_current(struct target *target, int create)
+static int get_current(struct target *target, int create)
{
struct target_list *head;
head = target->head;
return ERROR_OK;
}
-struct cpu_context *cpu_context_read(struct target *target, uint32_t base_addr,
+static struct cpu_context *cpu_context_read(struct target *target, uint32_t base_addr,
uint32_t *thread_info_addr_old)
{
struct cpu_context *context = calloc(1, sizeof(struct cpu_context));
return context;
}
-uint32_t next_task(struct target *target, struct threads *t)
+static uint32_t next_task(struct target *target, struct threads *t)
{
uint8_t *buffer = calloc(1, 4);
uint32_t next_addr = t->base_addr + NEXT;
return 0;
}
-struct current_thread *add_current_thread(struct current_thread *currents,
+static struct current_thread *add_current_thread(struct current_thread *currents,
struct current_thread *ct)
{
ct->next = NULL;
}
}
-struct threads *liste_del_task(struct threads *task_list, struct threads **t,
+static struct threads *liste_del_task(struct threads *task_list, struct threads **t,
struct threads *prev)
{
LOG_INFO("del task %" PRId64, (*t)->threadid);
task_list = (*t)->next;
/* free content of threads */
- if ((*t)->context)
- free((*t)->context);
+ free((*t)->context);
free(*t);
*t = prev ? prev : task_list;
return task_list;
}
-struct threads *liste_add_task(struct threads *task_list, struct threads *t,
+static struct threads *liste_add_task(struct threads *task_list, struct threads *t,
struct threads **last)
{
t->next = NULL;
return 0;
}
-int linux_get_tasks(struct target *target, int context)
+static int linux_get_tasks(struct target *target, int context)
{
int loop = 0;
int retval = 0;
while (temp != NULL) {
old = temp;
- if (temp->context)
- free(temp->context);
+ free(temp->context);
temp = temp->next;
free(old);
while (thread_list != NULL) {
thread_list->status = 0; /*setting all tasks to dead state*/
- if (thread_list->context) {
- free(thread_list->context);
- thread_list->context = NULL;
- }
+ free(thread_list->context);
+ thread_list->context = NULL;
thread_list = thread_list->next;
}
if (context)
thread_list->context =
cpu_context_read(target,
- thread_list->
- base_addr,
- &thread_list->
- thread_info_addr);
+ thread_list->base_addr,
+ &thread_list->thread_info_addr);
} else {
/* it is a current thread no need to read context */
}
return ERROR_OK;
}
-int linux_gdb_thread_packet(struct target *target,
+static int linux_gdb_thread_packet(struct target *target,
struct connection *connection, char const *packet,
int packet_size)
{
return ERROR_OK;
}
-int linux_gdb_thread_update(struct target *target,
+static int linux_gdb_thread_update(struct target *target,
struct connection *connection, char const *packet,
int packet_size)
{
return ERROR_OK;
}
-int linux_thread_extra_info(struct target *target,
+static int linux_thread_extra_info(struct target *target,
struct connection *connection, char const *packet,
int packet_size)
{
return ERROR_OK;
}
-int linux_gdb_T_packet(struct connection *connection,
+static int linux_gdb_T_packet(struct connection *connection,
struct target *target, char const *packet, int packet_size)
{
int64_t threadid;
} else {
/* delete item in the list */
linux_os->thread_list =
- liste_del_task(linux_os->
- thread_list, &temp,
- prev);
+ liste_del_task(linux_os->thread_list,
+ &temp, prev);
linux_os->thread_count--;
gdb_put_packet(connection, "E01", 3);
return ERROR_OK;
return retval;
}
-int linux_gdb_h_packet(struct connection *connection,
+static int linux_gdb_h_packet(struct connection *connection,
struct target *target, char const *packet, int packet_size)
{
struct linux_os *linux_os = (struct linux_os *)
if (strncmp(packet, "qSymbol", 7) == 0) {
if (rtos_qsymbol(connection, packet, packet_size) == 1) {
linux_compute_virt2phys(target,
- target->rtos->
- symbols[INIT_TASK].
- address);
+ target->rtos->symbols[INIT_TASK].address);
}
break;
}
if ((ct != NULL) && (ct->threadid !=
- target->rtos->
- current_threadid)
+ target->rtos->current_threadid)
&& (target->rtos->current_threadid != -1))
- LOG_WARNING("WARNING! current GDB thread do not match" \
- "current thread running." \
+ LOG_WARNING("WARNING! current GDB thread do not match "
+ "current thread running. "
"Switch thread in GDB to threadid %d",
(int)ct->threadid);
while (head != (struct target_list *)NULL) {
if (head->target->rtos != rtos) {
struct linux_os *smp_os_linux =
- (struct linux_os *)head->target->rtos->
- rtos_specific_params;
+ (struct linux_os *)head->target->rtos->rtos_specific_params;
/* remap smp target on rtos */
free(head->target->rtos);
head->target->rtos = rtos;
if (temp->context)
tmp +=
sprintf(tmp,
- "%" PRId32 "\t\t%" PRId32 "\t\t%" PRIx32 "\t\t%s\n",
+ "%" PRIu32 "\t\t%" PRIu32 "\t\t%" PRIx32 "\t\t%s\n",
temp->pid, temp->oncpu,
temp->asid, temp->name);
else
tmp +=
sprintf(tmp,
- "%" PRId32 "\t\t%" PRId32 "\t\t%" PRIx32 "\t\t%s\n",
+ "%" PRIu32 "\t\t%" PRIu32 "\t\t%" PRIx32 "\t\t%s\n",
temp->pid, temp->oncpu,
temp->asid, temp->name);
}