This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mi tty commands


On Mon, Jul 11, 2005 at 08:40:50PM +0200, Mark Kettenis wrote:
>    Date: Mon, 11 Jul 2005 11:51:55 -0400
>    From: Bob Rossi <bob@brasko.net>
> 
>    > Bob, please make sure there are no regressions from your patch before
>    > you check things in.  I now get:
>    > 
>    > FAIL: gdb.base/default.exp: tty
>    > FAIL: gdb.base/help.exp: help tty
>    > 
>    > because the output of the tty command changed.  In the past we had:
>    > 
>    > (gdb) tty
>    > Argument required (terminal name for running target process).
>    > 
>    > whereas now we have
>    > 
>    > (gdb) tty
>    > Argument required (filename to set it to.).
>    > 
>    > I don't really consider this an improvement...
> 
>    Does anyone know why the "tty" command gives the "default" message when
>    I have,
> 
>       /* add the filename of the terminal connected to inferior I/O */
>       add_setshow_filename_cmd ("inferior-tty", class_run,
> 				&inferior_io_terminal, _("\
>       Set terminal for future runs of program being debugged."), _("\
>       Show terminal for future runs of program being debugged."), _("\
>       Usage: set inferior-tty /dev/pts/1"), NULL, NULL, &setlist, &showlist);
> 
>       add_com_alias ("tty", "set inferior-tty", class_alias, 0);
> 
>    I would expect the alias to take on the usage note from the command it
>    points to. Either that, or allow me to explicitly give it a usage note.
>    Any suggestions?
> 
> But it does take the usage nore from the command it points to:
> 
> (gdb) set inferior-tty
> Argument required (filename to set it to.).

Whoa, OK. I just realized that add_setshow_filename_cmd is borked.
The "set_doc" doesn't work, but the "show_doc" does. 

Look at this command (which I had nothing to do with),

     add_setshow_filename_cmd ("remotelogfile", no_class,
     &serial_logfile, _("\
     Set filename for remote session recording."), _("\
     Show filename for remote session recording."), _("\
     This file is used to record the remote session for future
     playback\n\
     by gdbserver."), ...

     (gdb) set remotelogfile
     Argument required (filename to set it to.).
     (gdb) show remotelogfile
     Filename for remote session recording is "".
 
I'll look into this.

Bob Rossi


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]