Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: "Edward Peschko" <horos11@gmail.com>
To: "Michael Snyder" <msnyder@vmware.com>
Cc: "gdb@sourceware.org" <gdb@sourceware.org>
Subject: Re: automated trace output with gdb
Date: Wed, 29 Oct 2008 17:58:00 -0000	[thread overview]
Message-ID: <5cfa99000810291057q72c63faeyc9a38ac1a3e4ac47@mail.gmail.com> (raw)
In-Reply-To: <4908993E.3000601@vmware.com>

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 <msnyder@vmware.com> 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.
>
>
>
>


  reply	other threads:[~2008-10-29 17:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-10-29  7:02 Edward Peschko
2008-10-29 17:17 ` Michael Snyder
2008-10-29 17:58   ` Edward Peschko [this message]
2008-10-29 18:03     ` Michael Snyder
2008-10-29 19:03       ` Edward Peschko
2008-10-29 21:35         ` Michael Snyder
2008-10-31  8:20           ` Edward Peschko
2008-10-30 21:49             ` Edward Peschko
2008-10-31 12:43             ` Jeremy Bennett

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5cfa99000810291057q72c63faeyc9a38ac1a3e4ac47@mail.gmail.com \
    --to=horos11@gmail.com \
    --cc=gdb@sourceware.org \
    --cc=msnyder@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox