forked from tromey/gdb
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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.
- Loading branch information
Simon Marchi
committed
Aug 24, 2016
1 parent
bdd7871
commit 0a1ddfa
Showing
7 changed files
with
98 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,10 @@ | ||
2016-08-24 Simon Marchi <[email protected]> | ||
|
||
* 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. | ||
|
||
2016-08-24 Carl Love <[email protected]> | ||
|
||
* rs6000-tdep.c (rs6000_gdbarch_init): Remove call | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2016-08-24 Simon Marchi <[email protected]> | ||
|
||
* gdb.texinfo (Input/Output): Mention possibility to unset | ||
inferior-tty. | ||
|
||
2016-07-25 Tim Wiederhake <[email protected]> | ||
|
||
* gdb.texinfo: Resume btrace on reconnect. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,8 @@ | ||
2016-08-24 Simon Marchi <[email protected]> | ||
|
||
* gdb.base/set-inferior-tty.exp: New file. | ||
* gdb.base/set-inferior-tty.c: New file. | ||
|
||
2016-08-23 Pedro Alves <[email protected]> | ||
|
||
PR gdb/20494 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
# 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/>. | ||
|
||
standard_testfile | ||
|
||
set compile_options "debug" | ||
if {[build_executable $testfile.exp $testfile ${srcfile} ${compile_options}] == -1} { | ||
untested "failed to compile $testfile" | ||
return -1 | ||
} | ||
|
||
proc test_set_inferior_tty { } { | ||
global binfile | ||
|
||
clean_restart ${binfile} | ||
|
||
gdb_test_no_output "set inferior-tty hello" "set inferior-tty to hello" | ||
gdb_test "show inferior-tty" \ | ||
"Terminal for future runs of program being debugged is \"hello\"." \ | ||
"show inferior-tty shows hello" | ||
|
||
gdb_test_no_output "set inferior-tty" "set inferior-tty to empty" | ||
gdb_test "show inferior-tty" \ | ||
"Terminal for future runs of program being debugged is \"\"." \ | ||
"show inferior-tty shows empty" | ||
} | ||
|
||
test_set_inferior_tty |