summaryrefslogtreecommitdiff
path: root/libcpu/risc-v/t-head
diff options
context:
space:
mode:
Diffstat (limited to 'libcpu/risc-v/t-head')
-rw-r--r--libcpu/risc-v/t-head/c906/backtrace.c2
-rw-r--r--libcpu/risc-v/t-head/c906/trap.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/libcpu/risc-v/t-head/c906/backtrace.c b/libcpu/risc-v/t-head/c906/backtrace.c
index c10d9f3522..0bcfa0b9d9 100644
--- a/libcpu/risc-v/t-head/c906/backtrace.c
+++ b/libcpu/risc-v/t-head/c906/backtrace.c
@@ -131,7 +131,7 @@ extern struct rt_thread *rt_current_thread;
static char *_get_elf_name(size_t sepc)
{
- return IN_USERSPACE ? rt_current_thread->name : "rtthread.elf";
+ return IN_USERSPACE ? rt_current_thread->parent.name : "rtthread.elf";
}
#endif /* RT_USING_SMART */
diff --git a/libcpu/risc-v/t-head/c906/trap.c b/libcpu/risc-v/t-head/c906/trap.c
index c95facb0f7..184765507b 100644
--- a/libcpu/risc-v/t-head/c906/trap.c
+++ b/libcpu/risc-v/t-head/c906/trap.c
@@ -220,7 +220,7 @@ void handle_user(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_hw_backtrace((uint32_t *)sp->s0_fp, sepc);
- LOG_E("User Fault, killing thread: %s", rt_thread_self()->name);
+ LOG_E("User Fault, killing thread: %s", rt_thread_self()->parent.name);
EXIT_TRAP;
sys_exit(-1);
@@ -332,7 +332,7 @@ void handle_trap(rt_size_t scause, rt_size_t stval, rt_size_t sepc, struct rt_hw
rt_kprintf("scause:0x%p,stval:0x%p,sepc:0x%p\n", scause, stval, sepc);
dump_regs(sp);
rt_kprintf("--------------Thread list--------------\n");
- rt_kprintf("current thread: %s\n", rt_thread_self()->name);
+ rt_kprintf("current thread: %s\n", rt_thread_self()->parent.name);
extern struct rt_thread *rt_current_thread;
rt_kprintf("--------------Backtrace--------------\n");