From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5572 invoked by alias); 29 Oct 2008 19:03:12 -0000 Received: (qmail 5562 invoked by uid 22791); 29 Oct 2008 19:03:11 -0000 X-Spam-Check-By: sourceware.org Received: from yx-out-1718.google.com (HELO yx-out-1718.google.com) (74.125.44.157) by sourceware.org (qpsmtpd/0.31) with ESMTP; Wed, 29 Oct 2008 19:03:08 +0000 Received: by yx-out-1718.google.com with SMTP id 3so66368yxi.48 for ; Wed, 29 Oct 2008 12:03:05 -0700 (PDT) Received: by 10.150.133.18 with SMTP id g18mr16914775ybd.188.1225306985743; Wed, 29 Oct 2008 12:03:05 -0700 (PDT) Received: by 10.150.149.13 with HTTP; Wed, 29 Oct 2008 12:03:05 -0700 (PDT) Message-ID: <5cfa99000810291203p1aa443e1m2e92cac0507b8811@mail.gmail.com> Date: Wed, 29 Oct 2008 19:03:00 -0000 From: "Edward Peschko" To: "Michael Snyder" Subject: Re: automated trace output with gdb Cc: "gdb@sourceware.org" In-Reply-To: <4908A41F.2060508@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> <5cfa99000810291057q72c63faeyc9a38ac1a3e4ac47@mail.gmail.com> <4908A41F.2060508@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/msg00134.txt.bz2 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 (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 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 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. > > > >