Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: Andrew Cagney <ac131313@ges.redhat.com>
Cc: Tom Tromey <tromey@redhat.com>, gdb-patches@sources.redhat.com
Subject: Re: RFA: >, >>, and "tee" operators
Date: Thu, 25 Jul 2002 10:36:00 -0000	[thread overview]
Message-ID: <20020725161749.GA10862@nevyn.them.org> (raw)
In-Reply-To: <3D401D50.4030009@ges.redhat.com>

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 <command> ...
> >>maybe?
> >>	log FILE <command> .....
> >
> >
> >How about "transcript FILE <command>"?  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/<FMT> 
> >>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 <section> <address> 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


  reply	other threads:[~2002-07-25 16:17 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-23 11:51 Daniel Jacobowitz
2002-07-23 12:23 ` Tom Tromey
2002-07-23 13:18   ` Daniel Jacobowitz
2002-07-23 13:20     ` Tom Tromey
2002-07-23 13:58       ` Daniel Jacobowitz
2002-07-24 20:10         ` Andrew Cagney
2002-07-24 20:14           ` Daniel Jacobowitz
2002-07-25  9:17             ` Andrew Cagney
2002-07-25 10:36               ` Daniel Jacobowitz [this message]
2002-07-25 10:46                 ` Andrew Cagney
2002-07-30 13:00                   ` Daniel Jacobowitz
2002-07-30 20:36                     ` Andrew Cagney
2002-07-30 20:51                       ` Daniel Jacobowitz
2002-07-30 20:58                         ` Andrew Cagney
2002-07-30 22:45                           ` Daniel Jacobowitz
2002-07-31  9:36                       ` david carlton
2002-07-31  9:39                         ` Daniel Jacobowitz
2002-08-01  8:05                           ` Andrew Cagney
2002-08-01 10:24                             ` david carlton
2002-08-01 12:03                               ` Daniel Jacobowitz
2002-08-01 12:16                                 ` david carlton
2002-08-13 15:20             ` Fernando Nasser
2002-07-23 14:23       ` Grant Edwards
2002-07-24  1:59 ` Eli Zaretskii
2002-07-24 19:01 ` Andrew Cagney
2002-07-24 22:15   ` Daniel Jacobowitz

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=20020725161749.GA10862@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=ac131313@ges.redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    --cc=tromey@redhat.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