From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10857 invoked by alias); 4 May 2005 21:59:14 -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 10542 invoked from network); 4 May 2005 21:59:09 -0000 Received: from unknown (HELO e35.co.us.ibm.com) (32.97.110.133) by sourceware.org with SMTP; 4 May 2005 21:59:09 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.195.11]) by e35.co.us.ibm.com (8.12.10/8.12.9) with ESMTP id j44Lx8T9470038 for ; Wed, 4 May 2005 17:59:09 -0400 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by westrelay02.boulder.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id j44Lx8mf358918 for ; Wed, 4 May 2005 15:59:08 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11/8.13.3) with ESMTP id j44Lx8WU008463 for ; Wed, 4 May 2005 15:59:08 -0600 Received: from austin.ibm.com (netmail2.austin.ibm.com [9.41.248.176]) by d03av02.boulder.ibm.com (8.12.11/8.12.11) with ESMTP id j44Lx8J6008458 for ; Wed, 4 May 2005 15:59:08 -0600 Received: from lazy.austin.ibm.com (lazy.austin.ibm.com [9.53.94.97]) by austin.ibm.com (8.12.10/8.12.10) with ESMTP id j44Lx7Vi065534 for ; Wed, 4 May 2005 16:59:07 -0500 Date: Wed, 04 May 2005 21:59:00 -0000 From: Manoj Iyer X-X-Sender: manjo@lazy To: gdb-patches@sources.redhat.com Subject: Re: [RFC] new GDB server testcase In-Reply-To: <20050504184620.GA19639@nevyn.them.org> Message-ID: References: <20050504144044.GA14120@nevyn.them.org> <20050504184620.GA19639@nevyn.them.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2005-05/txt/msg00144.txt.bz2 Daniel, > > +gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*" > > + > > +gdb_test "step 3" ".*${decimal}.*y = x.* y;.*" > > That's a lot of wildcards. Can't you put a marker comment on the lines > you want to reach? > I want to test vanilla step and step with value separately, this is why I did what I did. Also, I referred some of the existing testcases and followed the style of doing things there. Anyways here is the patch with most of the mods. 2005-05-05 Manoj Iyer * gdb.server/server-run.exp: Added new testcases * gdb.server/server.c: Added nested function call for backtrace testing. Common subdirectories: ./new/src/gdb/testsuite/gdb.server/CVS and ./old/src/gdb/testsuite/gdb.server/CVS diff ./new/src/gdb/testsuite/gdb.server/server-run.exp ./old/src/gdb/testsuite/gdb.server/server-run.exp 41d40 < # test setting a breakpoint 43,65c42 < < gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\]+, main.*at.*$srcfile:\[0-9\].*" < < # test if list command displays source code < gdb_test "list\n" ".*main.*\{.*" < < # set breakpoint at a function and test backtrace command < gdb_test "break function3" "Breakpoint 2 at.*file .*$srcfile, line \[0-9\]+.*" < < gdb_test "continue" ".*Continuing\\..*Breakpoint \[0-9\]+, function3.*at.*$srcfile:\[0-9\].*" < < gdb_test "backtrace" "\#0.*function3.*at.*server.c:\[0-9\]+.*\#1.*function2.*at.*server.c:\[0-9\]+.*\#2.*function1.*at.*server.c:\[0-9\]+.*\#3.*main.*at.*server.c:\[0-9\]+" < < # test vanilla step < gdb_test "step" "function4.*at .*$srcfile:\[0-9\]+.*" < < # test step with a count < gdb_test "step 3" ".*${decimal}.*y = x.* y;.*" < < # test if print command can display value of variable. < gdb_test "print x" ".\[0-9\]* = 3.*" < < gdb_exit --- > gdb_test "continue" "Breakpoint.* main .*" "continue to main" diff ./new/src/gdb/testsuite/gdb.server/server.c ./old/src/gdb/testsuite/gdb.server/server.c 20,52d19 < static void < function4() < { < < int x = 1; < int y = 2; < < x = x + y; < y = x * y; < return; < } < < < static void < function3() < { < function4(); < } < < < static void < function2() < { < function3(); < } < < < static void < function1() < { < function2(); < } < 56,57c23 < function1(); < return 0; --- > return 0; Thanks Manjo