From owner-freebsd-hackers Tue Jan 2 20:35: 4 2001 From owner-freebsd-hackers@FreeBSD.ORG Tue Jan 2 20:35:02 2001 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.80]) by hub.freebsd.org (Postfix) with ESMTP id 8221E37B400 for ; Tue, 2 Jan 2001 20:35:01 -0800 (PST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id 2694C6A911; Wed, 3 Jan 2001 15:04:52 +1030 (CST) Date: Wed, 3 Jan 2001 15:04:52 +1030 From: Greg Lehey To: Zhiui Zhang Cc: Doug White , freebsd-hackers@FreeBSD.ORG Subject: Re: kernel debugging suggestion needed Message-ID: <20010103150452.F4336@wantadilla.lemis.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from zzhang@cs.binghamton.edu on Tue, Jan 02, 2001 at 11:22:49PM -0500 Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Tuesday, 2 January 2001 at 23:22:49 -0500, Zhiui Zhang wrote: > 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. There are other macros in my .gdbinits which give you backtraces of other processes. Greg -- Finger grog@lemis.com for PGP public key See complete headers for address and phone numbers To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message