| 225 | |
| 226 | #ifdef KTR |
| 227 | void |
| 228 | stack_ktr(u_int mask, const char *file, int line, const struct stack *st, |
| 229 | u_int depth) |
| 230 | { |
| 231 | #ifdef DDB |
| 232 | const char *name; |
| 233 | long offset; |
| 234 | int i; |
| 235 | #endif |
| 236 | |
| 237 | KASSERT(st->depth <= STACK_MAX, ("bogus stack")); |
| 238 | #ifdef DDB |
| 239 | if (depth == 0 || st->depth < depth) |
| 240 | depth = st->depth; |
| 241 | for (i = 0; i < depth; i++) { |
| 242 | (void)stack_symbol_ddb(st->pcs[i], &name, &offset); |
| 243 | ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx", |
| 244 | i, st->pcs[i], (u_long)name, offset, 0, 0); |
| 245 | } |
| 246 | #endif |
| 247 | } |
| 248 | #endif |
| 249 | |
| 250 | /* |
nothing calls this directly
no test coverage detected