diff options
author | sobomax <sobomax@FreeBSD.org> | 2008-10-30 21:48:28 +0000 |
---|---|---|
committer | sobomax <sobomax@FreeBSD.org> | 2008-10-30 21:48:28 +0000 |
commit | dafc63cd43bf0c7ea93a1deb268c4cfc08fbaa8b (patch) | |
tree | 53c341b456c4945540639124ec969e9e9e26ce59 /sys/kern/subr_stack.c | |
parent | ae5a12cdf15120eb335030274f5cfa6220aec8d1 (diff) | |
download | FreeBSD-src-dafc63cd43bf0c7ea93a1deb268c4cfc08fbaa8b.zip FreeBSD-src-dafc63cd43bf0c7ea93a1deb268c4cfc08fbaa8b.tar.gz |
Make it possible to compile kernel with KTR but without DDB.
Diffstat (limited to 'sys/kern/subr_stack.c')
-rw-r--r-- | sys/kern/subr_stack.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/kern/subr_stack.c b/sys/kern/subr_stack.c index cf7c7ac..99e35ea 100644 --- a/sys/kern/subr_stack.c +++ b/sys/kern/subr_stack.c @@ -155,15 +155,18 @@ stack_sbuf_print_ddb(struct sbuf *sb, struct stack *st) name, offset); } } +#endif #ifdef KTR void stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth, int cheap) { +#ifdef DDB const char *name; long offset; int i; +#endif KASSERT(st->depth <= STACK_MAX, ("bogus stack")); if (cheap) { @@ -180,6 +183,7 @@ stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth, ktr_tracepoint(mask, file, line, "#2 %p %p %p %p %p %p", st->pcs[12], st->pcs[13], st->pcs[14], st->pcs[15], st->pcs[16], st->pcs[17]); +#ifdef DDB } else { if (depth == 0 || st->depth < depth) depth = st->depth; @@ -188,10 +192,10 @@ stack_ktr(u_int mask, const char *file, int line, struct stack *st, u_int depth, ktr_tracepoint(mask, file, line, "#%d %p at %s+%#lx", i, st->pcs[i], (u_long)name, offset, 0, 0); } +#endif } } #endif -#endif /* * Two variants of stack symbol lookup -- one that uses the DDB interfaces |