mirror of
https://github.com/apache/nuttx.git
synced 2026-05-21 04:52:02 +08:00
arch/riscv/ricv_exception.c: Dump the process name at exception in user space
This helps in debugging loaded elf files in CONFIG_BUILD_KERNEL. If a user space exception occurs, one would beed the process name in order to debug the correct process/elf file. Only dumping the pid and name of the crashed task/thread doesn't help, since different processes may have helper threads with the same name. Signed-off-by: Jukka Laitinen <jukka.laitinen@tii.ae>
This commit is contained in:
committed by
Xiang Xiao
parent
a5f43aa8e8
commit
5aa45e328e
@@ -106,7 +106,9 @@ int riscv_exception(int mcause, void *regs, void *args)
|
||||
if (((tcb->flags & TCB_FLAG_TTYPE_MASK) != TCB_FLAG_TTYPE_KERNEL) &&
|
||||
((tcb->flags & TCB_FLAG_SYSCALL) == false))
|
||||
{
|
||||
_alert("Segmentation fault in PID %d: %s\n",
|
||||
struct tcb_s *ptcb = nxsched_get_tcb(tcb->group->tg_pid);
|
||||
|
||||
_alert("Segmentation fault in %s (PID %d: %s)\n", get_task_name(ptcb),
|
||||
tcb->pid, get_task_name(tcb));
|
||||
|
||||
tcb->flags |= TCB_FLAG_FORCED_CANCEL;
|
||||
|
||||
Reference in New Issue
Block a user