Test no =breakpoint-modified is emitted for modifications from MI commands
authorYao Qi <yao@codesourcery.com>
Fri, 24 Jan 2014 03:05:06 +0000 (11:05 +0800)
committerYao Qi <yao@codesourcery.com>
Sat, 8 Feb 2014 01:41:01 +0000 (09:41 +0800)
As design, =breakpoint-modified isn't emitted when breakpoints are modified
by MI commands.  This patch is to add tests for this.

gdb/testsuite:

2014-02-08  Yao Qi  <yao@codesourcery.com>

* gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify): Test
that no =breakpoint-modified is emitted when breakpoints are
modified through MI commands.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp

index 7c1fd10fd56fff6a89003f5a948909b39dbf9b00..55b735a72093610d12535a8d5d0ff3ed81e4995d 100644 (file)
@@ -1,3 +1,9 @@
+2014-02-08  Yao Qi  <yao@codesourcery.com>
+
+       * gdb.mi/mi-breakpoint-changed.exp (test_insert_delete_modify): Test
+       that no =breakpoint-modified is emitted when breakpoints are
+       modified through MI commands.
+
 2014-02-07  Pedro Alves  <pedro@codesourcery.com>
            Pedro Alves  <palves@redhat.com>
 
index cb2f7f68a7d64994a36ec2fbf3179a28e4823c37..aa991cf58f290314e7222c0f1c3b9448a9101306 100644 (file)
@@ -104,6 +104,9 @@ proc test_insert_delete_modify { } {
     mi_gdb_test $test \
        {.*=breakpoint-modified,bkpt=\{number="2",.*,cond=\"main > 0x0\".*\}.*\n\^done} \
        $test
+    # Modify condition through MI command shouldn't trigger MI notification.
+    mi_gdb_test "-break-condition 2 main == 0x0" "\\^done" \
+       "-break-condition 2 main == 0x0"
 
     # 3. when modifying enableness
     set test "disable 3"
@@ -114,16 +117,30 @@ proc test_insert_delete_modify { } {
     mi_gdb_test $test \
        {.*=breakpoint-modified,bkpt=\{number="3",.*,enabled=\"y\".*\}.*\n\^done} \
        $test
+    # Modify enableness through MI commands shouldn't trigger MI
+    # notification.
+    mi_gdb_test "-break-enable 3" "\\^done" "-break-enable 3"
+    mi_gdb_test "-break-disable 3" "\\^done" "-break-disable 3"
+
     # 4. when modifying ignore count.
     set test "ignore 5 1"
     mi_gdb_test $test \
        {.*=breakpoint-modified,bkpt=\{number="5",.*,ignore=\"1\".*\}.*\n\^done} \
        $test
+    # Modify ignore count through MI command shouldn't trigger MI
+    # notification.
+    mi_gdb_test "-break-after 5 1" "\\^done" \
+       "-break-after 5 1"
+
     # 5. when modifying pass count.
     set test "passcount 1 4"
     mi_gdb_test $test \
        {.*=breakpoint-modified,bkpt=\{number="4",.*pass="1".*\}.*\n\^done} \
        $test
+    # Modify pass count through MI command shouldn't trigger MI
+    # notification.
+    mi_gdb_test "-break-passcount 4 1" "\\^done" \
+       "-break-passcount 4 1"
 
     # Delete some breakpoints and verify that '=breakpoint-deleted
     # notification is correctly emitted.
This page took 0.036152 seconds and 4 git commands to generate.