MCPcopy Create free account
hub / github.com/F-Stack/f-stack / trapDump

Function trapDump

freebsd/mips/mips/trap.c:1124–1152  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1122
1123#if !defined(SMP) && (defined(DDB) || defined(DEBUG))
1124void
1125trapDump(char *msg)
1126{
1127 register_t s;
1128 int i;
1129
1130 s = intr_disable();
1131 printf("trapDump(%s)\n", msg);
1132 for (i = 0; i < TRAPSIZE; i++) {
1133 if (trp == trapdebug) {
1134 trp = &trapdebug[TRAPSIZE - 1];
1135 } else {
1136 trp--;
1137 }
1138
1139 if (trp->cause == 0)
1140 break;
1141
1142 printf("%s: ADR %jx PC %jx CR %jx SR %jx\n",
1143 trap_type[(trp->cause & MIPS_CR_EXC_CODE) >>
1144 MIPS_CR_EXC_CODE_SHIFT],
1145 (intmax_t)trp->vadr, (intmax_t)trp->pc,
1146 (intmax_t)trp->cause, (intmax_t)trp->status);
1147
1148 printf(" RA %jx SP %jx code %d\n", (intmax_t)trp->ra,
1149 (intmax_t)trp->sp, (int)trp->code);
1150 }
1151 intr_restore(s);
1152}
1153#endif
1154
1155/*

Callers 1

trapFunction · 0.85

Calls 3

intr_disableFunction · 0.50
printfFunction · 0.50
intr_restoreFunction · 0.50

Tested by

no test coverage detected