Date: Fri, 13 Apr 2012 21:13:42 -0700 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: John Baldwin <jhb@freebsd.org> Cc: svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org Subject: Re: svn commit: r234190 - in head/sys: kern sys Message-ID: <C9619E29-73EE-41BE-A33D-E0A17075AE34@bluezbox.com> In-Reply-To: <201204121743.q3CHhxQA039333@svn.freebsd.org> References: <201204121743.q3CHhxQA039333@svn.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 >=20 > 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. >=20 >=20 > Modified: head/sys/kern/subr_turnstile.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D > --- 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]
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?C9619E29-73EE-41BE-A33D-E0A17075AE34>