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

Function show_regs

libcpu/ppc/ppc405/traps.c:58–81  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56}
57
58void show_regs(struct pt_regs * regs)
59{
60 int i;
61
62 rt_kprintf("NIP: %08lX XER: %08lX LR: %08lX REGS: %p TRAP: %04lx DEAR: %08lX\n",
63 regs->nip, regs->xer, regs->link, regs, regs->trap, regs->dar);
64 rt_kprintf("MSR: %08lx EE: %01x PR: %01x FP: %01x ME: %01x IR/DR: %01x%01x\n",
65 regs->msr, regs->msr&MSR_EE ? 1 : 0, regs->msr&MSR_PR ? 1 : 0,
66 regs->msr & MSR_FP ? 1 : 0,regs->msr&MSR_ME ? 1 : 0,
67 regs->msr&MSR_IR ? 1 : 0,
68 regs->msr&MSR_DR ? 1 : 0);
69
70 rt_kprintf("\n");
71 for (i = 0; i < 32; i++) {
72 if ((i % 8) == 0) {
73 rt_kprintf("GPR%02d: ", i);
74 }
75
76 rt_kprintf("%08lX ", regs->gpr[i]);
77 if ((i % 8) == 7) {
78 rt_kprintf("\n");
79 }
80 }
81}
82
83void panic(const char *fmt, ...)
84{

Callers 5

_exceptionFunction · 0.70
MachineCheckExceptionFunction · 0.70
AlignmentExceptionFunction · 0.70
ProgramCheckExceptionFunction · 0.70
DebugExceptionFunction · 0.70

Calls 1

rt_kprintfFunction · 0.85

Tested by

no test coverage detected