From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29386 invoked by alias); 21 Nov 2008 11:02:10 -0000 Received: (qmail 29222 invoked by uid 22791); 21 Nov 2008 11:02:09 -0000 X-Spam-Check-By: sourceware.org Received: from mta3.glam.ac.uk (HELO mta3.glam.ac.uk) (193.63.147.53) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 21 Nov 2008 11:01:14 +0000 Received: from j228-gm.comp.glam.ac.uk ([193.63.148.84]) by mta3.glam.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1L3Tl9-0001Vn-3b; Fri, 21 Nov 2008 11:01:11 +0000 Received: from gaius by j228-gm.comp.glam.ac.uk with local (Exim 4.63) (envelope-from ) id 1L3Tl2-0006Nu-QK; Fri, 21 Nov 2008 11:01:04 +0000 To: Sandeep222 Cc: gdb@sourceware.org Subject: Re: How to store function-name and its return values while program runs References: <20618721.post@talk.nabble.com> From: Gaius Mulley Date: Fri, 21 Nov 2008 11:02:00 -0000 In-Reply-To: <20618721.post@talk.nabble.com> Message-ID: <87skpl1gy7.fsf@j228-gm.comp.glam.ac.uk> User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2008-11/txt/msg00131.txt.bz2 Sandeep222 writes: > As we proceed with debugging a program, if I need to know the order of > functions being executed by printing on screen along with their return > values when a 'run' command or 'next' command is executed, how can i > proceed? I went thru frame.c but all the function seem to execute only when > a command is executed in the gdb. Plz help. > Reg, > Sandeep set a breakpoint at each of the functions of interest. (gdb) break function1 (gdb) break function2 etc now run the program (gdb) run when gdb hits a breakpoint you can finish the function and print the result via: (gdb) fin regards, Gaius