On 29-Mar-01 John Baldwin wrote:
>
> On 29-Mar-01 Alfred Perlstein wrote:
>> I can't seem to get a crashdump, is there a way to take a
>> ddb crash address: "Stopped at lf_setlock+0x52"
>> and boot later and see what line of code that's on?
>
> l *lf_setlock+0x52
>
> For example, on one of my SMP test boxes:
>
>> gdb -k /sys/compile/MUTEX/kernel.debug
> GNU gdb 4.18
> ...
> (kgdb) l *lf_setlock+0x52
> 0xc019ecae is in lf_setlock (../../kern/kern_lockf.c:229).
> 224 * Deadlock detection is done by looking through the
> 225 * wait channels to see if there are any cycles that
> 226 * involve us. MAXDEPTH is set just to make sure we
> 227 * do not go off into neverland.
> 228 */
> 229 if ((lock->lf_flags & F_POSIX) &&
> 230 (block->lf_flags & F_POSIX)) {
> 231 register struct proc *wproc;
> 232 register struct lockf *waitblock;
> 233 int i = 0;
>
> In this case, if your faulting virtual address is really low, your problem is
> probably that lock is NULL. (Assuming you haven't hacked this function to
> pieces making my line numbers irrelevant.)
Note, you need to really do this with /sys/compile/FOO as your workign
directory so gdb gets all the relative file names right unless you setup your
.gdbinit file to add /sys/compile/FOO to your search path.
--
John Baldwin <[EMAIL PROTECTED]> -- http://www.FreeBSD.org/~jhb/
PGP Key: http://www.baldwin.cx/~john/pgpkey.asc
"Power Users Use the Power to Serve!" - http://www.FreeBSD.org/
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message