This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: mi tty commands
On Fri, Jun 17, 2005 at 05:08:11PM -0400, Bob Rossi wrote:
> > > - c = add_com ("tty", class_run, tty_command,
> > > - _("Set terminal for future runs of program being debugged."));
> > > + /* add the filename of the terminal connected to inferior I/O */
> > > + add_setshow_string_noescape_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);
> > > set_cmd_completer (c, filename_completer);
> > > + add_com_alias ("tty", "set inferior-tty", class_alias, 0);
> >
> > This seems nice. I was thinking of replacing "tty" with "set tty"
> > instead of "set inferior-tty", but I don't have a strong preference one
> > way or the other.
>
> I didn't change this, since there is an alias. However, the more I
> think about it, it would be fine with me if this was changed to simply
> 'tty'. Eventually, I might add a console-tty, which is the reason I was
> more specific with inferior-tty, instead of just tty. What do you think?
Right - what we have now is "tty", this patch preserves "tty" and adds
"set inferior-tty". Might as well stay with that. It's a little more
descriptive.
Could you explain what you've got in mind for console-tty?
> I do have one problem with this patch, before it can be approved. There
> is no file completion for the tty command with the new patch. I can't
> figure out how to add file completion with the
> add_setshow_string_noescape_cmd command. Do you or anyone else know how
> to do this?
If it's a filename, perhaps you should be using
add_setshow_filename_cmd instead.
--
Daniel Jacobowitz
CodeSourcery, LLC