We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4bdb042 commit 689d0fcCopy full SHA for 689d0fc
src/target/riscv/riscv.c
@@ -448,11 +448,12 @@ static int riscv_get_gdb_reg_list(struct target *target,
448
{
449
RISCV_INFO(r);
450
LOG_DEBUG("reg_class=%d", reg_class);
451
- LOG_DEBUG("riscv_get_gdb_reg_list: rtos_hartid=%d current_hartid=%d", r->rtos_hartid, r->current_hartid);
452
- if (r->rtos_hartid != -1)
+ LOG_DEBUG("rtos_hartid=%d current_hartid=%d", r->rtos_hartid, r->current_hartid);
+
453
+ if (r->rtos_hartid != -1 && riscv_rtos_enabled(target))
454
riscv_set_current_hartid(target, r->rtos_hartid);
455
else
- riscv_set_current_hartid(target, 0);
456
+ riscv_set_current_hartid(target, target->coreid);
457
458
switch (reg_class) {
459
case REG_CLASS_GENERAL:
0 commit comments