From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24300 invoked by alias); 25 Aug 2011 00:42:25 -0000 Received: (qmail 24292 invoked by uid 22791); 25 Aug 2011 00:42:24 -0000 X-SWARE-Spam-Status: No, hits=-6.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 25 Aug 2011 00:42:08 +0000 Received: from int-mx02.intmail.prod.int.phx2.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p7P0g3Fg023370 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 24 Aug 2011 20:42:04 -0400 Received: from psique ([10.3.112.13]) by int-mx02.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p7P0fvpH006657; Wed, 24 Aug 2011 20:42:00 -0400 From: Sergio Durigan Junior To: Aurelian Melinte Cc: gdb@sourceware.org Subject: Re: gdb on automatic pilot? References: <4E559477.1060306@gmx.net> Date: Thu, 25 Aug 2011 00:42:00 -0000 In-Reply-To: <4E559477.1060306@gmx.net> (Aurelian Melinte's message of "Wed, 24 Aug 2011 20:16:55 -0400") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux) 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: 2011-08/txt/msg00113.txt.bz2 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?