From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8497 invoked by alias); 25 Jul 2002 16:17:53 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 8379 invoked from network); 25 Jul 2002 16:17:50 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 25 Jul 2002 16:17:50 -0000 Received: from dsl254-114-118.nyc1.dsl.speakeasy.net ([216.254.114.118] helo=nevyn.them.org ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 17XlJ8-0005Uh-00; Thu, 25 Jul 2002 11:17:42 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 17XlJF-0002r9-00; Thu, 25 Jul 2002 12:17:49 -0400 Date: Thu, 25 Jul 2002 10:36:00 -0000 From: Daniel Jacobowitz To: Andrew Cagney Cc: Tom Tromey , gdb-patches@sources.redhat.com Subject: Re: RFA: >, >>, and "tee" operators Message-ID: <20020725161749.GA10862@nevyn.them.org> Mail-Followup-To: Andrew Cagney , Tom Tromey , gdb-patches@sources.redhat.com References: <20020723183956.GA28558@nevyn.them.org> <871y9ub6fj.fsf@fleche.redhat.com> <20020723192325.GA30738@nevyn.them.org> <87d6te8a6o.fsf@fleche.redhat.com> <20020723202051.GA5427@nevyn.them.org> <3D3F5BDF.2050209@ges.redhat.com> <20020725031026.GA20117@nevyn.them.org> <3D401D50.4030009@ges.redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3D401D50.4030009@ges.redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2002-07/txt/msg00510.txt.bz2 On Thu, Jul 25, 2002 at 11:46:24AM -0400, Andrew Cagney wrote: > >Does the `transcript FILE' command send both the user input (prompts?) > >>and output to the file (output also to the console)? Like unix script? > > > > > >[Speaking for my patch] > > > >Nope. Prompts and user input are not logged. Output goes only to a > >file. Something like `script' might be useful but that's a patch for > >another day. > > My understanding of a transcript is that it records all details of the > exchange - both input and output. Unless the command is recording the > input, I don't think it should be called ``transcript''. > > The name ``transcript'' came about (I think) from an earlier discussion > where a command to record both input and output was proposed. See: > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=114 > for its bug report. OK. Let's hold the name 'transcript' in reserve for something that can log both. > >> I guess the corresponding ``tee FILE'' command just writes output? > > > > > >Output goes to the file and to the normal output channel. Still no > >prompts or input. > > Ok. > > >I think there is also a need for a tempoary redirection. So I guess > >>either the obscure: > >> >FILE ... > >>maybe? > >> log FILE ..... > > > > > >How about "transcript FILE "? There's some quoting badness but > >for the moment I'm willing to just disallow spaces in the filename. > >Much more straightforward that way. > > (See above for problem I see with the name ``transcript''.) > > For whitespace in filenames, see: > http://sources.redhat.com/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gdb&pr=535 > So yes, you get to use strchr (' ') .... :-( > > >GDB's option identifier is ``/'' and not ``-''. See the print/ > >>commands. ``-'' has the problem of being a valid expression operator. > >>I should note that the current parser is pretty broken. It can't > >>differentiate between: > >> transcript/f > >> transcript /f > >>(sigh) but that is a fixable problem. > > > > > >GDB's option identifier varies, actually; symbol-file -readnow, > >add-symbol-file -s
are the only two I see offhand. > >We only use / for print format characters. Mostly we just drop them > >all on one line. > > > >I'd rather stick with '-' as it's more familiar to most of our > >audience, particularly with 'tee -a'. > > I think this was raised before (fernando and I discussed it somewhere on > gdb@). GDB is used on systems that are not even UNIX like (namely > DJGPP), trying to tie the syntax to UNIX is such a good idea. GDB needs > a syntax spec, the current piece meal aproach is regrettable :-( > > If the command was called ``log'' rather than ``tee'' then I don't think > we would have problems with ``log -a''. (I'm not saying that log is the > right name mind.) Well, I find the DOS-ish '/' separator much nastier than '-' options. A question of personal taste. ``log'' unfortunately is more like ``tee'' than it is like redirection; how about a simple ``redirect'' command? redirect [-a[ppend]] FILE [COMMAND] log [-a[ppend]] FILE [COMMAND] I like the sound of those two. -- Daniel Jacobowitz Carnegie Mellon University MontaVista Software Debian GNU/Linux Developer