From owner-freebsd-current Thu Mar 9 08:22:24 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id IAA12691 for current-outgoing; Thu, 9 Mar 1995 08:22:24 -0800 Received: from trout.sri.MT.net (trout.sri.MT.net [204.182.243.12]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id IAA12532; Thu, 9 Mar 1995 08:19:13 -0800 Received: (from nate@localhost) by trout.sri.MT.net (8.6.9/8.6.9) id JAA25172; Thu, 9 Mar 1995 09:23:19 -0700 Date: Thu, 9 Mar 1995 09:23:19 -0700 From: Nate Williams Message-Id: <199503091623.JAA25172@trout.sri.MT.net> X-Mailer: Mail User's Shell (7.2.5 10/14/92) To: current@FreeBSD.org, hackers@FreeBSD.org Subject: Stack trace routine for running programs Sender: current-owner@FreeBSD.org Precedence: bulk Does anyone know of a way to do a stack dump (trace) of a running program while *NOT* in the debugger. We are trying to debug a program that behaves very differently when it is running under the debugger, and being able to see a call stack would be very helpful. We have some code to do it on a 68020 HP box, but it's pretty convoluted and full of un-commented MAGIC #'s, so I'd rather not start from there. I could reverse engineer things by looking at the assembled output from the compiler, but if there already exists code that is easy to use I'd be much happier than that. I looked through gdb, but it's so large and I know so little about the layout that I didn't even know where to look. Oh, the stack trace we need is on SCO-x86 and Sparc boxes. The SCO code would be preferrable, but if someone could point me in the right direction I think I could get it running on both with a good push to some code fragments. Thanks! Nate