From owner-freebsd-hackers Tue Jan 2 20:23:32 2001 From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 20:23:31 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from bingnet2.cc.binghamton.edu (bingnet2.cc.binghamton.edu [128.226.1.18]) by hub.freebsd.org (Postfix) with ESMTP id 94A8137B402 for ; Tue, 2 Jan 2001 20:23:30 -0800 (PST) Received: from opal (cs.binghamton.edu [128.226.123.101]) by bingnet2.cc.binghamton.edu (8.9.3/8.9.3) with ESMTP id XAA04752; Tue, 2 Jan 2001 23:22:51 -0500 (EST) Date: Tue, 2 Jan 2001 23:22:49 -0500 (EST) From: Zhiui Zhang X-Sender: zzhang@opal To: Doug White 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, Doug White wrote: > 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. I already did this. I hope that I can find a way to know which process is running which part of the KLD code endlessly. -Zhihui To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message