aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
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
commit3cb3b8dfd1975f480bec3ebd8023f1cc8351606d (patch)
tree4343381252723a8129f84a7e1b8ff55db8a77469 /gdb/testsuite
parent5cf2e3f01e6546edc8951532cfeaebef5587fba4 (diff)
downloadgdb-3cb3b8dfd1975f480bec3ebd8023f1cc8351606d.zip
gdb-3cb3b8dfd1975f480bec3ebd8023f1cc8351606d.tar.gz
gdb-3cb3b8dfd1975f480bec3ebd8023f1cc8351606d.tar.bz2
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')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp32
2 files changed, 37 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index bc57d7f..3b60675 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2005-07-06 Bob Rossi <bob@brasko.net>
+
+ * gdb.mi/mi-basics.exp (test_setshow_inferior_tty): Test MI tty
+ command.
+ (Copyright): Update copyright.
+
2005-07-06 Wu Zhou <woodzltc@cn.ibm.com>
* gdb.fortran/exprs.exp (test_arithmetic_expressions): Add five
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 39a0873..0d2b06e 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