From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3760 invoked by alias); 28 Oct 2005 18:53:51 -0000 Mailing-List: contact gdb-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sources.redhat.com Received: (qmail 3749 invoked by uid 22791); 28 Oct 2005 18:53:46 -0000 Received: from [203.197.88.2] (HELO marvin.codito.net) (203.197.88.2) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 28 Oct 2005 18:53:46 +0000 Received: from zirakzigil.codito.co.in ([220.225.32.98]) (authenticated bits=0) by marvin.codito.net (8.13.5/8.13.5/Debian-3) with ESMTP id j9SInNSX003806; Sat, 29 Oct 2005 00:19:24 +0530 Subject: Re: Get a whole call stack through the running of target program From: Ramana Radhakrishnan Reply-To: ramana.radhakrishnan@codito.com To: ZengNan Cc: gdb@sources.redhat.com In-Reply-To: <20051027025240.97987.qmail@web15702.mail.cnb.yahoo.com> References: <20051027025240.97987.qmail@web15702.mail.cnb.yahoo.com> Content-Type: text/plain; charset=UTF-8 Date: Fri, 28 Oct 2005 18:53:00 -0000 Message-Id: <1130525312.8742.194.camel@localhost.localdomain> Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-SW-Source: 2005-10/txt/msg00192.txt.bz2 Hi, GDB can't do it per se but scripting on top could help you do this. Look at atree. http://atree.sourceforge.net It could give you the complete activation tree. Its some scripting on top of gdb . atree runs a program through GDB. It sets breakpoints on all functions and makes a log of all the functions that got called. The log contains the arguments and return values of the functions. This log is then turned into a tree — a node in the tree is a function call and its children are the functions that it called, in order. cheers Ramana On Thu, 2005-10-27 at 10:52 +0800, ZengNan wrote: > Can gdb give the whole call stack from the beginning to the termination of the target program, so > I can see the flow of the algorithm. > > > > > > > ___________________________________________________________ > 雅虎免费G邮箱-中国第一绝无垃圾邮件骚扰超大邮箱 > http://cn.mail.yahoo.com