svn commit: r234190 - in head/sys: kern sys
Oleksandr Tymoshenko
gonzo at bluezbox.com
Sat Apr 14 04:13:52 UTC 2012
On 2012-04-12, at 10:43 AM, John Baldwin wrote:
> Author: jhb
> Date: Thu Apr 12 17:43:59 2012
> New Revision: 234190
> URL: http://svn.freebsd.org/changeset/base/234190
>
> Log:
> - Extend the KDB interface to add a per-debugger callback to print a
> backtrace for an arbitrary thread (rather than the calling thread).
> A kdb_backtrace_thread() wrapper function uses the configured debugger
> if possible, otherwise it falls back to using stack(9) if that is
> available.
> - Replace a direct call to db_trace_thread() in propagate_priority()
> with a call to kdb_backtrace_thread() instead.
>
>
> Modified: head/sys/kern/subr_turnstile.c
> ==============================================================================
> --- head/sys/kern/subr_turnstile.c Thu Apr 12 16:55:48 2012 (r234189)
> +++ head/sys/kern/subr_turnstile.c Thu Apr 12 17:43:59 2012 (r234190)
> @@ -217,9 +217,7 @@ propagate_priority(struct thread *td)
> printf(
> "Sleeping thread (tid %d, pid %d) owns a non-sleepable lock\n",
> td->td_tid, td->td_proc->p_pid);
> -#ifdef DDB
> - db_trace_thread(td, -1);
> -#endif
> + kdb_backtrace_thread(td);
> panic("sleeping thread");
> }
It seems that missing "#ifdef DDB" break build for kernels without DDB enabled:
cc1: warnings being treated as errors
/src/FreeBSD/head/sys/kern/subr_turnstile.c: In function 'propagate_priority':
/src/FreeBSD/head/sys/kern/subr_turnstile.c:220: warning: implicit declaration of function 'kdb_backtrace_thread'
/src/FreeBSD/head/sys/kern/subr_turnstile.c:220: warning: nested extern declaration of 'kdb_backtrace_thread' [-Wnested-externs]
More information about the svn-src-all
mailing list