* abort_debug() handles the following abort: * * FAULT_DEBUG - Debug Event * */
| 246 | * |
| 247 | */ |
| 248 | static __inline void |
| 249 | abort_debug(struct trapframe *tf, u_int fsr, u_int prefetch, bool usermode, |
| 250 | u_int far) |
| 251 | { |
| 252 | |
| 253 | if (usermode) { |
| 254 | struct thread *td; |
| 255 | |
| 256 | td = curthread; |
| 257 | call_trapsignal(td, SIGTRAP, TRAP_BRKPT, far, FAULT_DEBUG); |
| 258 | userret(td, tf); |
| 259 | } else { |
| 260 | #ifdef KDB |
| 261 | kdb_trap((prefetch) ? T_BREAKPOINT : T_WATCHPOINT, 0, tf); |
| 262 | #else |
| 263 | printf("No debugger in kernel.\n"); |
| 264 | #endif |
| 265 | } |
| 266 | } |
| 267 | |
| 268 | /* |
| 269 | * Abort handler. |
no test coverage detected