Date: Thu, 29 Mar 2001 13:05:26 -0800 (PST) From: John Baldwin <jhb@FreeBSD.org> To: John Baldwin <jhb@FreeBSD.org> Cc: hackers@FreeBSD.org, Alfred Perlstein <bright@wintelcom.net> Subject: RE: ddb -> gdb help? Message-ID: <XFMail.010329130526.jhb@FreeBSD.org> In-Reply-To: <XFMail.010329123633.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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 <jhb@FreeBSD.org> -- 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?XFMail.010329130526.jhb>