MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _check_fault

Function _check_fault

libcpu/aarch64/common/trap.c:35–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

33#endif
34
35static void _check_fault(struct rt_hw_exp_stack *regs, uint32_t pc_adj, char *info)
36{
37 uint32_t is_user_fault;
38 rt_thread_t th;
39
40 is_user_fault = !(regs->cpsr & 0x1f);
41 if (is_user_fault)
42 {
43 rt_kprintf("%s! pc = 0x%x\n", info, regs->pc - pc_adj);
44 }
45
46 /* user stack backtrace */
47 th = rt_thread_self();
48 if (th && th->lwp)
49 {
50 arch_backtrace_uthread(th);
51 }
52
53 if (is_user_fault)
54 {
55#ifdef LWP_USING_CORE_DUMP
56 lwp_core_dump(regs, pc_adj);
57#endif
58 sys_exit_group(-1);
59 }
60}
61
62rt_inline int _get_type(unsigned long esr)
63{

Callers 1

rt_hw_trap_exceptionFunction · 0.85

Calls 4

rt_kprintfFunction · 0.85
rt_thread_selfFunction · 0.85
sys_exit_groupFunction · 0.85
arch_backtrace_uthreadFunction · 0.50

Tested by

no test coverage detected