Properly show XLEN for each thread.

This commit is contained in:
Tim Newsome 2017-09-01 11:29:15 -07:00
parent 48cda64282
commit ce740d02d6
1 changed files with 4 additions and 2 deletions

View File

@ -30,7 +30,6 @@ static int riscv_create_rtos(struct target *target)
target->rtos->current_threadid = 1;
target->rtos->current_thread = 1;
riscv_update_threads(target->rtos);
target->rtos->gdb_thread_packet = riscv_gdb_thread_packet;
target->rtos->gdb_v_packet = riscv_gdb_v_packet;
@ -42,6 +41,8 @@ int riscv_update_threads(struct rtos *rtos)
{
LOG_DEBUG("Updating the RISC-V Hart List");
struct target *target = rtos->target;
/* Figures out how many harts there are on the system. */
int hart_count = riscv_count_harts(rtos->target);
if (rtos->thread_count != hart_count) {
@ -54,7 +55,8 @@ int riscv_update_threads(struct rtos *rtos)
rtos->thread_details[i].exists = true;
if (asprintf(&rtos->thread_details[i].thread_name_str, "Hart %d", i) < 0)
LOG_ERROR("riscv_update_threads() failed asprintf");
if (asprintf(&rtos->thread_details[i].extra_info_str, "RV64") < 0)
if (asprintf(&rtos->thread_details[i].extra_info_str, "RV%d",
riscv_xlen_of_hart(target, i)) < 0)
LOG_ERROR("riscv_update_threads() failed asprintf");
}
}