aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorYao Qi <yao@codesourcery.com>2013-04-13 14:14:08 +0000
committerYao Qi <yao@codesourcery.com>2013-04-13 14:14:08 +0000
commitda9160e4c8b95f900048f9ca7018344b5b2e8461 (patch)
tree19448c341f509480ea22a8d5b3e8003f9650ac50 /gdb/testsuite
parent0cfdc76718f8314663016322c94c67afe6bb8f12 (diff)
downloadgdb-da9160e4c8b95f900048f9ca7018344b5b2e8461.zip
gdb-da9160e4c8b95f900048f9ca7018344b5b2e8461.tar.gz
gdb-da9160e4c8b95f900048f9ca7018344b5b2e8461.tar.bz2
gdb/
* ctf.c (_initialize_ctf): Include "completer.h". Call add_target_with_completer instead of add_target. gdb/testsuite/ * gdb.base/completion.exp: Test completion of command 'target ctf' if target ctf is supported.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/completion.exp13
2 files changed, 17 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 90a83b0..93360a4 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2013-04-13 Yao Qi <yao@codesourcery.com>
+
+ * gdb.base/completion.exp: Test completion of command
+ 'target ctf' if target ctf is supported.
+
2013-04-10 Pedro Alves <palves@redhat.com>
* gdb.base/completion.exp: Test "set height", "set listsize" and
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 008cb0a..80cfbff 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -714,8 +714,19 @@ gdb_test "complete set gnutarget aut" "set gnutarget auto"
gdb_test "complete set cp-abi aut" "set cp-abi auto"
# Test that completion of commands 'target FOO' works well.
+set targets [list "core" "tfile" "exec"]
-foreach target_name { "core" "tfile" "exec" } {
+# Test that completion of command 'target ctf' if GDB supports ctf
+# target.
+gdb_test_multiple "target ctf" "" {
+ -re "Undefined target command: \"ctf\"\. Try \"help target\"\.\r\n$gdb_prompt $" {
+ }
+ -re "No CTF directory specified.*\r\n$gdb_prompt $" {
+ lappend targets "ctf"
+ }
+}
+
+foreach target_name ${targets} {
gdb_test "complete target ${target_name} ./gdb.base/completion" \
"target ${target_name} ./gdb.base/completion\\.exp.*"
}