diff options
author | Yao Qi <yao@codesourcery.com> | 2014-01-24 11:05:06 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-02-08 09:41:01 +0800 |
commit | 6e854735132978038000f951f3c7a464fa44906c (patch) | |
tree | a27f7feb633596a48f6e3588fb7043e722591885 | |
parent | 1a84070136191d2da421421af86561458fd8eb86 (diff) | |
download | gdb-6e854735132978038000f951f3c7a464fa44906c.zip gdb-6e854735132978038000f951f3c7a464fa44906c.tar.gz gdb-6e854735132978038000f951f3c7a464fa44906c.tar.bz2 |
Test no =breakpoint-modified is emitted for modifications from MI commands
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.
-rw-r--r-- | gdb/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp | 17 |
2 files changed, 23 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 7c1fd10..55b735a 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -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> diff --git a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp index cb2f7f6..aa991cf 100644 --- a/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp +++ b/gdb/testsuite/gdb.mi/mi-breakpoint-changed.exp @@ -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. |