From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10007 invoked by alias); 29 Oct 2008 17:58:03 -0000 Received: (qmail 9996 invoked by uid 22791); 29 Oct 2008 17:58:03 -0000 X-Spam-Check-By: sourceware.org Received: from mail-gx0-f14.google.com (HELO mail-gx0-f14.google.com) (209.85.217.14) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Oct 2008 17:57:59 +0000 Received: by gxk7 with SMTP id 7so1107004gxk.0 for ; Wed, 29 Oct 2008 10:57:56 -0700 (PDT) Received: by 10.150.133.18 with SMTP id g18mr16820389ybd.188.1225303076454; Wed, 29 Oct 2008 10:57:56 -0700 (PDT) Received: by 10.150.149.13 with HTTP; Wed, 29 Oct 2008 10:57:56 -0700 (PDT) Message-ID: <5cfa99000810291057q72c63faeyc9a38ac1a3e4ac47@mail.gmail.com> Date: Wed, 29 Oct 2008 17:58:00 -0000 From: "Edward Peschko" To: "Michael Snyder" Subject: Re: automated trace output with gdb Cc: "gdb@sourceware.org" In-Reply-To: <4908993E.3000601@vmware.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <5cfa99000810290001i7d042cf0lf8739bab23b70997@mail.gmail.com> <4908993E.3000601@vmware.com> 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/msg00132.txt.bz2 Michael, Just curious, but how do you redirect the output to a file using that script? And how fast is it (ie: say I'm stepping through thousands of steps.) Basically, what I'm looking to do is take a inkblot test of a program.. ie: do one thing, record it, do another, record it, and then look at the difference.. Thanks, Ed On Wed, Oct 29, 2008 at 10:11 AM, Michael Snyder wrote: > 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. > > > >