| 1122 | |
| 1123 | #if !defined(SMP) && (defined(DDB) || defined(DEBUG)) |
| 1124 | void |
| 1125 | trapDump(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 | /* |
no test coverage detected