Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Yao Qi <yao@codesourcery.com>
To: <gdb-patches@sourceware.org>
Subject: [PATCH] Test no =breakpoint-modified is emitted for modifications from MI commands
Date: Fri, 24 Jan 2014 07:48:00 -0000	[thread overview]
Message-ID: <1390549587-23625-1-git-send-email-yao@codesourcery.com> (raw)

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-01-24  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/gdb.mi/mi-breakpoint-changed.exp |   17 +++++++++++++++++
 1 files changed, 17 insertions(+), 0 deletions(-)

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.
-- 
1.7.7.6


             reply	other threads:[~2014-01-24  7:48 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-24  7:48 Yao Qi [this message]
2014-02-06 12:38 ` Yao Qi
2014-02-06 20:39   ` andre
2014-02-07  9:14     ` Yao Qi
2014-02-07 16:12       ` andre
2014-02-08  3:18         ` Joel Brobecker
2014-02-08  3:39           ` Yao Qi
2014-02-08 13:15             ` Joel Brobecker
2014-02-08 14:11               ` andre
2014-02-07 14:04 ` Pedro Alves
2014-02-08  1:49   ` Yao Qi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1390549587-23625-1-git-send-email-yao@codesourcery.com \
    --to=yao@codesourcery.com \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox