From owner-freebsd-hackers Tue Jan 2 14: 3:30 2001 From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 14:03:28 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from resnet.uoregon.edu (resnet.uoregon.edu [128.223.122.47]) by hub.freebsd.org (Postfix) with ESMTP id 44E9E37B400 for ; Tue, 2 Jan 2001 14:03:28 -0800 (PST) Received: from localhost (dwhite@localhost) by resnet.uoregon.edu (8.10.1/8.10.1) with ESMTP id f02M3Gr44558; Tue, 2 Jan 2001 14:03:16 -0800 (PST) Date: Tue, 2 Jan 2001 14:03:16 -0800 (PST) From: Doug White To: Zhiui Zhang Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: kernel debugging suggestion needed In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tue, 2 Jan 2001, Zhiui Zhang wrote: > > I have written a KLD and am debugging it. The program often hangs after > runs for a while (I guess it enters into some dead loop). Is there a way > to attach to the process and somehow find out which code it is executing > (with remote debugging or ddb)? kld debugging is a bit tricky. Take a look at the debugging macros and bits that Greg Lehey put together for vinum for a starting point. You have to calculate the appropriate offset to get to the KLD code in gdb. Doug White | FreeBSD: The Power to Serve dwhite@resnet.uoregon.edu | www.FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message