aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2012-08-10 05:03:13 +0000
committerMike Frysinger <vapier@gentoo.org>2012-08-10 05:03:13 +0000
commitde0bea007c446f40ecec90a2672e0a806d397e1a (patch)
tree239ac66f780b5afdb4cdc3e2115100a096c7e9b4 /gdb/testsuite
parent44534af395e517016f70c2b0baee26f810391843 (diff)
downloadgdb-de0bea007c446f40ecec90a2672e0a806d397e1a.zip
gdb-de0bea007c446f40ecec90a2672e0a806d397e1a.tar.gz
gdb-de0bea007c446f40ecec90a2672e0a806d397e1a.tar.bz2
gdb: add completion handler for "handle" and "signal"
The command line completion has spoiled me. Thus the lack of completion with the "handle" command annoys me. Patch! This does a few things: - adds a VEC_merge helper - adds a generic signal completer - adds a completion handler for the "handle" command - sets the completion handler for the "signal" command URL: http://sourceware.org/bugzilla/show_bug.cgi?id=10436 Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/completion.exp26
2 files changed, 31 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 8d6aca0..3113c6a 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2012-08-10 Mike Frysinger <vapier@gentoo.org>
+
+ PR cli/10436:
+ * gdb.base/completion.exp: Add tests for handle completion.
+
2012-08-09 Yao Qi <yao@codesourcery.com>
* gdb.mi/mi-cmd-param-changed.exp: New.
diff --git a/gdb/testsuite/gdb.base/completion.exp b/gdb/testsuite/gdb.base/completion.exp
index 9b9459c..ccdc199 100644
--- a/gdb/testsuite/gdb.base/completion.exp
+++ b/gdb/testsuite/gdb.base/completion.exp
@@ -363,6 +363,32 @@ gdb_test_multiple "" "$test" {
}
}
+set test "complete 'handle signal'"
+send_gdb "handle sigq\t"
+gdb_test_multiple "" "$test" {
+ -re "^handle sigqSIGQUIT $" {
+ send_gdb "\n"
+ gdb_test_multiple "" "$test" {
+ -re "SIGQUIT.*Quit.*$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+ }
+}
+
+set test "complete 'handle keyword'"
+send_gdb "handle nos\t"
+gdb_test_multiple "" "$test" {
+ -re "^handle nostop $" {
+ send_gdb "\n"
+ gdb_test_multiple "" "$test" {
+ -re "$gdb_prompt $" {
+ pass "$test"
+ }
+ }
+ }
+}
+
# These tests used to try completing the shorter "p b-a".
# Unfortunately, on some systems, there are .o files in system