summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.mi
diff options
context:
space:
mode:
authorBob Rossi <bob@brasko.net>2005-07-06 14:54:37 +0000
committerBob Rossi <bob@brasko.net>2005-07-06 14:54:37 +0000
commit3721ef102785c6b5d706219407eeaed1902add3d (patch)
tree874878ac7035c2847ac224bb8b7f082aa2abaefc /gdb/testsuite/gdb.mi
parentf7b75da3eb30217d8b4d3ccb9749119ebf499b75 (diff)
downloadgdb-3721ef102785c6b5d706219407eeaed1902add3d.tar.gz
Index: gdb/ChangeLog
+2005-07-06 Bob Rossi <bob@brasko.net> + + * fork-child.c (fork-inferior): Use accessor function for + inferior_io_terminal. + * infcmd.c (inferior_io_terminal): Make static. + (set_inferior_io_terminal): New function. + (get_inferior_io_terminal): Ditto. + (tty_command): Use accessor function. + (_initialize_infcmd): Add inferior_tty setshow variable. + (_initialize_infcmd): Remove tty command. + (_initialize_infcmd): Add a tty command that is an alias. + * inferior.h (set_inferior_io_terminal): New prototype. + (get_inferior_io_terminal): Ditto. + (new_tty_prefork): Add const qualifier to parameter. + * inflow.c (inferior_thisrun_terminal): Add const qualifier. + (new_tty_prefork): Add const qualifier to parameter. + * nto-procfs (procfs_create_inferior): Use accessor function. + (procfs_create_inferior): Add const qualifier to locals. + * win32-nat.c (child_create_inferior): Ditto. + * mi/mi-cmd-env.c (mi_cmd_inferior_tty_set): New function. + (mi_cmd_inferior_tty_set): Ditto. + * mi/mi-cmds.c (mi_cmds): Add inferior-tty-set and inferior-tty-show + * mi/mi-cmds.h (mi_cmd_inferior_tty_set): Add prototype. + (mi_cmd_inferior_tty_show): Ditto. Index: gdb/doc/ChangeLog +2005-07-06 Bob Rossi <bob@brasko.net> + + * gdb.texinfo (GDB/MI Miscellaneous Commands): Add -inferior-tty-set + and -inferior-tty-show. + (Input/Output): Document "set/show inferior-tty" and tty alias. Index: gdb/testsuite/ChangeLog +2005-07-06 Bob Rossi <bob@brasko.net> + + * gdb.mi/mi-basics.exp (test_setshow_inferior_tty): Test MI tty + command. + (Copyright): Update copyright.
Diffstat (limited to 'gdb/testsuite/gdb.mi')
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp32
1 files changed, 31 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 39a08736910..0d2b06ee98d 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -1,4 +1,4 @@
-# Copyright 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright 1999, 2000, 2001, 2002, 2003, 2005 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
@@ -236,12 +236,42 @@ proc test_path_specification {} {
}
+proc test_setshow_inferior_tty {} {
+ global mi_gdb_prompt
+
+ # Test that the commands,
+ # -inferior-tty-set
+ # -inferior-tty-show
+ # are setting/getting the same data in GDB.
+
+ mi_gdb_test "301-inferior-tty-show" \
+ "301\\\^done" \
+ "initial tty is empty"
+
+ mi_gdb_test "302-inferior-tty-set /dev/pts/1" \
+ "302\\\^done" \
+ "set tty to /dev/pts/1"
+
+ mi_gdb_test "303-inferior-tty-show" \
+ "303\\\^done,inferior_tty_terminal=\"/dev/pts/1\"" \
+ "tty was set correctly"
+
+ mi_gdb_test "304-inferior-tty-set" \
+ "304\\\^done" \
+ "set tty to the empty string"
+
+ mi_gdb_test "305-inferior-tty-show" \
+ "305\\\^done" \
+ "final tty is empty"
+}
+
if [test_mi_interpreter_selection] {
test_exec_and_symbol_mi_operatons
test_breakpoints_deletion
test_dir_specification
test_cwd_specification
test_path_specification
+ test_setshow_inferior_tty
}
mi_gdb_exit