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 19:03:00 -0000	[thread overview]
Message-ID: <5cfa99000810291203p1aa443e1m2e92cac0507b8811@mail.gmail.com> (raw)
In-Reply-To: <4908A41F.2060508@vmware.com>

Ok, I'm trying it, and it seems to be working - so far, speed isn't
really that great (ie: perl's tracemode in *its* debugger is faster,
line per line, in tracing perl code), but it's workable, with caveat.
For some things it'd be really painful (eg: debugging vim)

Just for future record, here are the commands that I used, and they
have to be done in the right order:

(gdb) set logging redirect on
(gdb) set logging file 'myfile'
(gdb) set logging on
(gdb) set pagination off
(gdb) b <certain_point>
(gdb) while 1
> step
> end

If they aren't in this order, then the behavior is indeterminate, and
if pagination isn't set off, you get 'hit <return> to continue' even
though everything else goes to the file..

I don't know - all in all, IMO this should be a feature of gdb itself,
just for simplicity's sake, and to avoid the overhead of the scripting
language. I'm just guessing, but I'd bet that if this was done in a
tight loop, it would be an order of magnitude faster..

Thanks,

Ed

On Wed, Oct 29, 2008 at 10:57 AM, Michael Snyder <msnyder@vmware.com> wrote:
> Edward Peschko wrote:
>>
>> Michael,
>>
>> Just curious, but how do you redirect the output to a file using that
>> script?
>
> Set logging, set logging file...
>
>> And how fast is it (ie: say I'm stepping through thousands of
>>
>> steps.)
>
> Well... it's as fast as it is.  The only way to find out
> if it's fast enough to suit you is to try it.
>
>
>
>


  reply	other threads:[~2008-10-29 19:03 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
2008-10-29 18:03     ` Michael Snyder
2008-10-29 19:03       ` Edward Peschko [this message]
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=5cfa99000810291203p1aa443e1m2e92cac0507b8811@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