From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24418 invoked by alias); 25 Aug 2011 01:13:13 -0000 Received: (qmail 24409 invoked by uid 22791); 25 Aug 2011 01:13:12 -0000 X-SWARE-Spam-Status: No, hits=-1.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RP_MATCHES_RCVD,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mailout-de.gmx.net (HELO mailout-de.gmx.net) (213.165.64.23) by sourceware.org (qpsmtpd/0.43rc1) with SMTP; Thu, 25 Aug 2011 01:12:49 +0000 Received: (qmail invoked by alias); 25 Aug 2011 01:12:47 -0000 Received: from 216-58-92-243.cpe.distributel.net (EHLO [192.168.100.2]) [216.58.92.243] by mail.gmx.net (mp011) with SMTP; 25 Aug 2011 03:12:47 +0200 Message-ID: <4E55A188.3090008@gmx.net> Date: Thu, 25 Aug 2011 01:13:00 -0000 From: Aurelian Melinte User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.20) Gecko/20110804 Thunderbird/3.1.12 MIME-Version: 1.0 To: gdb@sourceware.org Subject: Re: gdb on automatic pilot? References: <4E559477.1060306@gmx.net> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: 2011-08/txt/msg00114.txt.bz2 On 24/08/2011 8:41 PM, Sergio Durigan Junior wrote: > Aurelian Melinte writes: > >> I am looking to use gdb to print the stack each time a certain >> function is called , then resume execution. And this without manual >> intervention. > Sorry, I'm not sure I understood your question. Will you be already > runnning GDB? If so, you can put a breakpoint at the function and use > `commands' to specify what you want to do when the breakpoint is hit. > Something like: > > (gdb) break f > (gdb) commands >> bt >> cont >> end > (gdb) run > > Is that what you want? Eaxctly what I was looking for :) Thanks Sergio and Jan!