From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13070 invoked by alias); 29 Oct 2008 17:17:38 -0000 Received: (qmail 13052 invoked by uid 22791); 29 Oct 2008 17:17:36 -0000 X-Spam-Check-By: sourceware.org Received: from smtp-outbound-1.vmware.com (HELO smtp-outbound-1.vmware.com) (65.115.85.69) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Oct 2008 17:17:27 +0000 Received: from mailhost4.vmware.com (mailhost4.vmware.com [10.16.67.124]) by smtp-outbound-1.vmware.com (Postfix) with ESMTP id 861865600B; Wed, 29 Oct 2008 10:17:23 -0700 (PDT) Received: from [10.20.92.59] (promb-2s-dhcp59.eng.vmware.com [10.20.92.59]) by mailhost4.vmware.com (Postfix) with ESMTP id 7EE3BC9A56; Wed, 29 Oct 2008 10:17:23 -0700 (PDT) Message-ID: <4908993E.3000601@vmware.com> Date: Wed, 29 Oct 2008 17:17:00 -0000 From: Michael Snyder User-Agent: Thunderbird 1.5.0.12 (X11/20080411) MIME-Version: 1.0 To: Edward Peschko CC: "gdb@sourceware.org" Subject: Re: automated trace output with gdb References: <5cfa99000810290001i7d042cf0lf8739bab23b70997@mail.gmail.com> In-Reply-To: <5cfa99000810290001i7d042cf0lf8739bab23b70997@mail.gmail.com> 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: 2008-10/txt/msg00131.txt.bz2 Edward Peschko wrote: > All, > > Solaris' dbx had the ability to record runs of programs - ie: you > could say 'trace step' and you could then see - printed out - all the > lines of code execute as the debugger executed them.. > > Does gdb have something similar? I see the concept of tracepoints, but > that's not exactly what I had in mind.. I just want a running > commentary of the code as it runs, without having to press 'n' and/or > 's' all the time.. Could this be implemented in terms of tracepoints? First of all, I don't think tracepoints are related. What you ask is not a built-in feature of gdb, but I often do something like it by writing a short gdb script. For a not-very-general example, I'll do something like: set $foo = 100 while $foo-- step end You could make $foo a parameter, or you could define some more useful condition for stopping. You could also use "while 1" if you wanted it to run forever.