diff options
author | Simon Marchi <simon.marchi@ericsson.com> | 2016-08-24 13:10:08 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@ericsson.com> | 2016-08-24 13:10:08 -0400 |
commit | 0a1ddfa6b67201bb06f51fb47b56096e81bec5c0 (patch) | |
tree | 1e26eec2dfe35fc59fe4709b33e059a153178960 /gdb/testsuite/gdb.base/set-inferior-tty.c | |
parent | bdd78711b4c1ae26dbc8c2a64f28abec3486ae6c (diff) | |
download | binutils-0a1ddfa6b67201bb06f51fb47b56096e81bec5c0.zip binutils-0a1ddfa6b67201bb06f51fb47b56096e81bec5c0.tar.gz binutils-0a1ddfa6b67201bb06f51fb47b56096e81bec5c0.tar.bz2 |
Allow resetting an empty inferior-tty
This patch allows the user to set the inferior-tty to "empty", in order
to come back to the default behaviour of using the same tty as gdb is
using.
This is already supported in MI (and tested in gdb.mi/mi-basics.exp).
I added a new test, set-inferior-tty.exp, where I test only the setting
and unsetting of the parameter. It would be nice to actually test that
the inferior output properly goes to the separate tty, but that will be
for another day.
gdb/ChangeLog:
* infcmd.c (set_inferior_io_terminal): Set inferior terminal to
NULL if terminal_name is an empty string.
(_initialize_infcmd): Make the argument of "set inferior-tty"
optional, mention it in the help doc.
gdb/doc/ChangeLog:
* gdb.texinfo (Input/Output): Mention possibility to unset
inferior-tty.
gdb/testsuite/ChangeLog:
* gdb.base/set-inferior-tty.exp: New file.
* gdb.base/set-inferior-tty.c: New file.
Diffstat (limited to 'gdb/testsuite/gdb.base/set-inferior-tty.c')
-rw-r--r-- | gdb/testsuite/gdb.base/set-inferior-tty.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.base/set-inferior-tty.c b/gdb/testsuite/gdb.base/set-inferior-tty.c new file mode 100644 index 0000000..863fa99 --- /dev/null +++ b/gdb/testsuite/gdb.base/set-inferior-tty.c @@ -0,0 +1,24 @@ +/* This testcase is part of GDB, the GNU debugger. + + Copyright 2016 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +*/ + +int +main (void) +{ + return 0; +} |