From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3170 invoked by alias); 1 Aug 2005 18:31:55 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 3148 invoked by uid 22791); 1 Aug 2005 18:31:47 -0000 Received: from centrmmtao05vip.cox.net (HELO centrmmtao05.cox.net) (68.1.16.143) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Mon, 01 Aug 2005 18:31:47 +0000 Received: from white ([68.9.64.121]) by centrmmtao05.cox.net (InterMail vM.6.01.04.00 201-2131-118-20041027) with ESMTP id <20050801183134.RAII19684.centrmmtao05.cox.net@white> for ; Mon, 1 Aug 2005 14:31:34 -0400 Received: from bob by white with local (Exim 3.35 #1 (Debian)) id 1Dzf4j-0007B0-00 for ; Mon, 01 Aug 2005 14:31:45 -0400 Date: Mon, 01 Aug 2005 18:31:00 -0000 From: Bob Rossi To: gdb-patches@sources.redhat.com Subject: mi_gdb_test MESSAGE parameter Message-ID: <20050801183145.GA27427@white> Mail-Followup-To: gdb-patches@sources.redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i X-SW-Source: 2005-08/txt/msg00024.txt.bz2 Hi, Here is a pre-patch to my previous testsuite patch. I think it makes a lot of sense to make the MESSAGE parameter to mi_gdb_test necessary. There was only 1 testcase not using the MESSAGE parameter, and it was using it 1/2 the time. Thanks, Bob Rossi 2005-08-1 Bob Rossi * gdb.mi/mi-syn-frame.exp, gdb.mi/mi2-syn-frame.exp: Add MESSAGE parameter to mi_gdb_test. * lib/mi-support.exp (mi_gdb_test): Make MESSAGE parameter necessary. Index: gdb/testsuite/gdb.mi/mi-syn-frame.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi-syn-frame.exp,v retrieving revision 1.4 diff -u -r1.4 mi-syn-frame.exp --- gdb/testsuite/gdb.mi/mi-syn-frame.exp 13 Jun 2005 02:41:51 -0000 1.4 +++ gdb/testsuite/gdb.mi/mi-syn-frame.exp 1 Aug 2005 18:24:24 -0000 @@ -44,7 +44,9 @@ mi_gdb_load ${binfile} mi_run_to_main -mi_gdb_test "400-break-insert foo" "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" +mi_gdb_test "400-break-insert foo" \ +"400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \ +"insert breakpoint foo" # @@ -69,21 +71,29 @@ } } -mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "404-stack-list-frames 0 0" \ +"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" # # Call have_a_very_merry_interrupt() which will eventually raise a signal # that's caught by handler() which calls subroutine(). -mi_gdb_test "405-break-insert subroutine" "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" - -mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" +mi_gdb_test "405-break-insert subroutine" \ +"405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \ +"insert breakpoint subroutine" + +mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \ +"Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \ +"evaluate expression have_a_very_merry_interrupt" # We should have both a signal handler and a call dummy frame # in this next output. -mi_gdb_test "407-stack-list-frames" "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "407-stack-list-frames" \ +"407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" send_gdb "408-exec-continue\n" @@ -96,7 +106,9 @@ } } -mi_gdb_test "409-stack-list-frames 0 0" "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "409-stack-list-frames 0 0" \ +"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" # # Call bar() by hand, which should get an exception while running. Index: gdb/testsuite/gdb.mi/mi2-syn-frame.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.mi/mi2-syn-frame.exp,v retrieving revision 1.3 diff -u -r1.3 mi2-syn-frame.exp --- gdb/testsuite/gdb.mi/mi2-syn-frame.exp 13 Jun 2005 02:41:51 -0000 1.3 +++ gdb/testsuite/gdb.mi/mi2-syn-frame.exp 1 Aug 2005 18:24:24 -0000 @@ -45,7 +45,9 @@ mi_gdb_load ${binfile} mi_run_to_main -mi_gdb_test "400-break-insert foo" "400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" +mi_gdb_test "400-break-insert foo" \ +"400\\^done,bkpt=\{number=\"2\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"foo\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \ +"insert breakpoint foo" # @@ -70,21 +72,29 @@ } } -mi_gdb_test "404-stack-list-frames 0 0" "404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "404-stack-list-frames 0 0" \ +"404\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" # # Call have_a_very_merry_interrupt() which will eventually raise a signal # that's caught by handler() which calls subroutine(). -mi_gdb_test "405-break-insert subroutine" "405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" - -mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" "Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" +mi_gdb_test "405-break-insert subroutine" \ +"405\\^done,bkpt=\{number=\"3\",type=\"breakpoint\",disp=\"keep\",enabled=\"y\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\",times=\"0\"\}" \ +"insert breakpoint subroutine" + +mi_gdb_test "406-data-evaluate-expression have_a_very_merry_interrupt()" \ +"Waiting to get a signal\[\r\n\]+\\&\"The program being debugged stopped while in a function called from GDB.\\\\n\"\[\r\n\]+\\&\"When the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\n\"\[\r\n\]+\\&\"stop \\(instead of continuing to evaluate the expression containing\\\\n\"\[\r\n\]+\\&\"the function call\\).\\\\n\"\[\r\n\]+406\\^error,msg=\"The program being debugged stopped while in a function called from GDB.\\\\nWhen the function \\(have_a_very_merry_interrupt\\) is done executing, GDB will silently\\\\nstop \\(instead of continuing to evaluate the expression containing\\\\nthe function call\\).\"" \ +"evaluate expression have_a_very_merry_interrupt" # We should have both a signal handler and a call dummy frame # in this next output. -mi_gdb_test "407-stack-list-frames" "407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "407-stack-list-frames" \ +"407\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"subroutine\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"1\",addr=\"$hex\",func=\"handler\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"2\",addr=\"$hex\",func=\"\"\},.*frame=\{level=\"$decimal\",addr=\"$hex\",func=\"have_a_very_merry_interrupt\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"\"\},frame=\{level=\"$decimal\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" send_gdb "408-exec-continue\n" @@ -97,7 +107,9 @@ } } -mi_gdb_test "409-stack-list-frames 0 0" "409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" +mi_gdb_test "409-stack-list-frames 0 0" \ +"409\\^done,stack=\\\[frame=\{level=\"0\",addr=\"$hex\",func=\"main\",file=\".*mi-syn-frame.c\",fullname=\"${fullname_syntax}${srcfile}\",line=\"$decimal\"\}.*\\\]" \ +"list stack frames" # # Call bar() by hand, which should get an exception while running. Index: gdb/testsuite/lib/mi-support.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v retrieving revision 1.27 diff -u -r1.27 mi-support.exp --- gdb/testsuite/lib/mi-support.exp 18 May 2005 03:41:59 -0000 1.27 +++ gdb/testsuite/lib/mi-support.exp 1 Aug 2005 18:24:24 -0000 @@ -517,10 +517,9 @@ # this is the null string no command is sent. # PATTERN is the pattern to match for a PASS, and must NOT include # the \r\n sequence immediately before the gdb prompt. -# MESSAGE is an optional message to be printed. If this is -# omitted, then the pass/fail messages use the command string as the -# message. (If this is the empty string, then sometimes we don't -# call pass or fail at all; I don't understand this at all.) +# MESSAGE is the message to be printed. (If this is the empty string, +# then sometimes we don't call pass or fail at all; I don't +# understand this at all.) # # Returns: # 1 if the test failed, @@ -533,13 +532,9 @@ global GDB expect_out upvar timeout timeout - if [llength $args]>2 then { - set message [lindex $args 2] - } else { - set message [lindex $args 0] - } set command [lindex $args 0] set pattern [lindex $args 1] + set message [lindex $args 2] if [llength $args]==5 { set question_string [lindex $args 3];