aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-10-27 10:56:03 +0100
committerTankut Baris Aktemur <tankut.baris.aktemur@intel.com>2020-10-27 15:02:17 +0100
commitb1d4d8d128a65d59be6d6071614418116fbfcba2 (patch)
treefcafd50508e787b4d5dcc59d742eef5b7899a8b8 /gdb/testsuite
parentbd24c5d65b4aa7c98604d2260e4233f26e0ab836 (diff)
downloadgdb-b1d4d8d128a65d59be6d6071614418116fbfcba2.zip
gdb-b1d4d8d128a65d59be6d6071614418116fbfcba2.tar.gz
gdb-b1d4d8d128a65d59be6d6071614418116fbfcba2.tar.bz2
gdb/breakpoint: use gdb::option for the '-force' flag
Use the gdb::option framework for the '-force' flag of the 'condition' command. This gives tab-completion ability for the flag. gdb/ChangeLog: 2020-10-27 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * breakpoint.c (struct condition_command_opts): New struct. (condition_command_option_defs): New static global. (make_condition_command_options_def_group): New function. (condition_completer): Update to consider the '-force' flag. (condition_command): Use gdb::option for the '-force' flag. gdb/testsuite/ChangeLog: 2020-10-27 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com> * gdb.base/condbreak.exp: Update the completion tests to consider the '-force' flag.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/gdb.base/condbreak.exp8
2 files changed, 13 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 5bcb04d..8635d17 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-10-27 Tankut Baris Aktemur <tankut.baris.aktemur@intel.com>
+
+ * gdb.base/condbreak.exp: Update the completion tests to
+ consider the '-force' flag.
+
2020-10-27 Tom de Vries <tdevries@suse.de>
* gdb.base/list-ambiguous-readnow.exp: New file.
diff --git a/gdb/testsuite/gdb.base/condbreak.exp b/gdb/testsuite/gdb.base/condbreak.exp
index 05c90c3..132ffdd 100644
--- a/gdb/testsuite/gdb.base/condbreak.exp
+++ b/gdb/testsuite/gdb.base/condbreak.exp
@@ -232,3 +232,11 @@ gdb_test "complete cond 1" "cond 1"
gdb_test "set variable \$var = 1"
gdb_test "complete cond \$v" "cond \\\$var"
gdb_test "complete cond 1 values\[0\].a" "cond 1 values.0..a_field"
+
+set cond_completion "condition ($decimal|-force)"
+gdb_test "complete condition " "($cond_completion\r\n)+$cond_completion"
+gdb_test "complete cond -" "cond -force"
+
+# If '-force' is already given, it should not be suggested again.
+set cond_completion "cond -force $decimal"
+gdb_test "complete cond -force " "($cond_completion\r\n)+$cond_completion"