From owner-freebsd-current Thu Mar 9 13:49:27 1995 Return-Path: current-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id NAA23296 for current-outgoing; Thu, 9 Mar 1995 13:49:27 -0800 Received: from POSC.org (posc.org [192.246.215.2]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id NAA23187; Thu, 9 Mar 1995 13:44:45 -0800 Received: from posc.posc.org (posc.posc.org [192.246.215.30]) by POSC.org (8.6.8.1/8.6.6) with ESMTP id PAA18097; Thu, 9 Mar 1995 15:44:38 -0600 Received: from sys14.posc.org (sys14.posc.org [192.246.215.69]) by posc.posc.org (8.6.9/8.6.9) with SMTP id PAA05135; Thu, 9 Mar 1995 15:44:36 -0600 Received: by sys14.posc.org (4.1/SMI-4.1) id AA02133; Thu, 9 Mar 95 15:44:42 CST Date: Thu, 9 Mar 1995 15:44:41 -0600 (CST) From: Dave Waddell X-Sender: waddell@sys14 To: Nate Williams Cc: current@FreeBSD.org, hackers@FreeBSD.org Subject: Re: Stack trace routine for running programs In-Reply-To: <199503091623.JAA25172@trout.sri.MT.net> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: current-owner@FreeBSD.org Precedence: bulk I don't know whether or not this would work but you might try running the program to where you want the trace then attaching to the program with the gnu debugger (it allows attaching to a running program). On Thu, 9 Mar 1995, Nate Williams wrote: > 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 > > > > ========================================================================== | Dave Waddell | Disclaimer - I don't even speak for myself | | waddell@posc.org | | | kb5wxe@kb5wxe.ampr.org | + 1 713 267 5103 | ==========================================================================