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

Function print_backtrace

libcpu/ppc/ppc405/traps.c:38–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36 */
37
38void print_backtrace(unsigned long *sp)
39{
40 int cnt = 0;
41 unsigned long i;
42
43 rt_kprintf("Call backtrace: ");
44 while (sp) {
45 if ((rt_uint32_t)sp > END_OF_MEM)
46 break;
47
48 i = sp[1];
49 if (cnt++ % 7 == 0)
50 rt_kprintf("\n");
51 rt_kprintf("%08lX ", i);
52 if (cnt > 32) break;
53 sp = (unsigned long *)*sp;
54 }
55 rt_kprintf("\n");
56}
57
58void show_regs(struct pt_regs * regs)
59{

Callers 4

_exceptionFunction · 0.85
MachineCheckExceptionFunction · 0.85
AlignmentExceptionFunction · 0.85
ProgramCheckExceptionFunction · 0.85

Calls 1

rt_kprintfFunction · 0.85

Tested by

no test coverage detected