From owner-freebsd-questions Fri Mar 1 13:54:13 1996 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA13044 for questions-outgoing; Fri, 1 Mar 1996 13:54:13 -0800 (PST) Received: from precipice.shockwave.com (precipice.shockwave.com [171.69.108.33]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id NAA13020 Fri, 1 Mar 1996 13:54:04 -0800 (PST) Received: from localhost.shockwave.com (localhost.shockwave.com [127.0.0.1]) by precipice.shockwave.com (8.7.4/8.7.3) with SMTP id NAA00721; Fri, 1 Mar 1996 13:53:31 -0800 (PST) Message-Id: <199603012153.NAA00721@precipice.shockwave.com> To: questions@freebsd.org cc: hackers@freebsd.org Subject: using ddb to debug a double-panic? Date: Fri, 01 Mar 1996 13:53:27 -0800 From: Paul Traina Sender: owner-questions@freebsd.org Precedence: bulk I'm seeing something -very- strange while working on a device driver. When I add a delay to some code that's doing direct I/O to the parallel port, I get a system hang (but I can pop out to ddb and look at things, however ddb is showing that I'm just waiting in the idle loop). It seems like something is going to sleep on a system resource and never coming back. So, I figured, what the heck, I'd add a couple of kernel printfs in strategic places so I could find out where it was actually hanging (I didn't feel like doing breakpoints). I -thought- our kernel printf was supposed to be safe to use. I'm not at raised IPL and I don't believe I'm overflowing the stack anywhere, but without fail, I get a perfectly reproducable double-panic which takes me out to DDB. Now, the question I'm asking is: Could someone give me a leg-up on tracking the original problem that caused the first panic to occur? Obviously, the stack/frame pointer from the double panic point to the panic code, but the original stuff does (?) get saved somewhere. Is there a simple sequence I can type into ddb to switch stack pointers and frames so I can do a "where" to see where I was when the first panic occured? Thanks, a confused Paul