[PATCH] check breakpoint notifications in mi2-cli.exp

Yao Qi yao@codesourcery.com
Fri Sep 21 13:03:00 GMT 2012


Hi,
Andrew Cagney commented out some tests in mi2-cli.exp about various
MI notifications, which didn't exist at that moment.  Now, we have
breakpoint notifications, so this patch is to move these tests
out of comments.

There are three chunks in this patch.  The first two chunks are about
breakpoint notifications.  The last chunk is to remove checking on
notification, because it is suppressed.  OK?

gdb/testsuite:

2012-09-21  Yao Qi  <yao@codesourcery.com>

	* gdb.mi/mi2-cli.exp: Check breakpoint notification.
---
 gdb/testsuite/gdb.mi/mi2-cli.exp |   20 ++++----------------
 1 files changed, 4 insertions(+), 16 deletions(-)

diff --git a/gdb/testsuite/gdb.mi/mi2-cli.exp b/gdb/testsuite/gdb.mi/mi2-cli.exp
index 73a79b5..5bf94a1 100644
--- a/gdb/testsuite/gdb.mi/mi2-cli.exp
+++ b/gdb/testsuite/gdb.mi/mi2-cli.exp
@@ -77,13 +77,9 @@ mi_gdb_test "-interpreter-exec console \"show args\"" \
   {\~"Argument list to give program being debugged when it is started is \\\"foobar\\\"\.\\n".*\^done} \
   "-interpreter-exec console \"show args\""
 
-# NOTE: cagney/2003-02-03: Not yet.
-# mi_gdb_test "-interpreter-exec console \"break callee4\"" \
-#   {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-create,number="2".*\^done} \
-#   "-interpreter-exec console \"break callee4\""
 mi_gdb_test "-interpreter-exec console \"break callee4\"" \
-  {(&.*)*.*~"Breakpoint 2 at.*\\n".*\^done} \
-  "-interpreter-exec console \"break callee4\""
+    {(&.*)*.*~"Breakpoint 2 at.*\\n".*=breakpoint-created,bkpt=\{number="2",type="breakpoint".*\}.*\n\^done} \
+    "-interpreter-exec console \"break callee4\""
 
 mi_gdb_test "-interpreter-exec console \"info break\"" \
   {\~"Num[ \t]*Type[ \t]*Disp[ \t]*Enb[ \t]*Address[ \t]*What\\n".*~"2[ \t]*breakpoint[ \t]*keep[ \t]*y[ \t]*0x[0-9A-Fa-f]+[ \t]*in callee4 at .*basics.c:[0-9]+\\n".*\^done} \
@@ -102,13 +98,9 @@ mi_execute_to "exec-continue" "breakpoint-hit" "callee4" "" ".*basics.c" $line_c
     { "" "disp=\"keep\"" } \
     "continue to callee4"
 
-# NOTE: cagney/2003-02-03: Not yet.
-# mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
-#   {.*=breakpoint-delete,number=\"2\".*\^done} \
-#   "-interpreter-exec console \"delete 2\""
 mi_gdb_test "100-interpreter-exec console \"delete 2\"" \
-  {=breakpoint-deleted,id=\"2\"\r\n100\^done} \
-  "-interpreter-exec console \"delete 2\""
+    {.*=breakpoint-deleted,id=\"2\".*\^done} \
+    "-interpreter-exec console \"delete 2\""
 
 # NOTE: cagney/2003-02-03: Not yet.
 # mi_gdb_test "200-interpreter-exec console \"up\"" \
@@ -160,10 +152,6 @@ if {$async} {
 mi_execute_to "interpreter-exec console step" $reason "callee4" "" ".*basics.c" $line_callee4_next \
     "" "check *stopped from CLI command"
 
-# NOTE: cagney/2003-02-03: Not yet.
-# mi_gdb_test "-break-insert -t basics.c:$line_main_hello" \
-#   {.*=breakpoint-create,number="3".*\^done} \
-#   "-break-insert -t basics.c:\$line_main_hello"
 mi_gdb_test "600-break-insert -t basics.c:$line_main_hello" \
 	{600\^done,bkpt=.number="3",type="breakpoint".*\}} \
 	"-break-insert -t basics.c:\$line_main_hello"
-- 
1.7.7.6



More information about the Gdb-patches mailing list