From owner-freebsd-hackers Thu Mar 29 13: 6: 8 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from meow.osd.bsdi.com (meow.osd.bsdi.com [204.216.28.88]) by hub.freebsd.org (Postfix) with ESMTP id 9175837B728; Thu, 29 Mar 2001 13:05:56 -0800 (PST) (envelope-from jhb@FreeBSD.org) Received: from laptop.baldwin.cx (john@jhb-laptop.osd.bsdi.com [204.216.28.241]) by meow.osd.bsdi.com (8.11.2/8.11.2) with ESMTP id f2TL5oG40591; Thu, 29 Mar 2001 13:05:50 -0800 (PST) (envelope-from jhb@FreeBSD.org) Message-ID: X-Mailer: XFMail 1.4.0 on FreeBSD X-Priority: 3 (Normal) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 8bit MIME-Version: 1.0 In-Reply-To: Date: Thu, 29 Mar 2001 13:05:26 -0800 (PST) From: John Baldwin To: John Baldwin Subject: RE: ddb -> gdb help? Cc: hackers@FreeBSD.org, Alfred Perlstein Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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 -- 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