From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25973 invoked by alias); 22 Jan 2004 22:40:24 -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 25964 invoked from network); 22 Jan 2004 22:40:23 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 22 Jan 2004 22:40:23 -0000 Received: from drow by nevyn.them.org with local (Exim 4.30 #1 (Debian)) id 1AjnUt-0004qK-38 for ; Thu, 22 Jan 2004 17:40:23 -0500 Date: Thu, 22 Jan 2004 22:40:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Subject: Re: [RFA]: pending breakpoint support [2/3] Message-ID: <20040122224023.GB18400@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com References: <400EE920.4050705@redhat.com> <20040121222044.GB3324@nevyn.them.org> <400F075D.7070904@redhat.com> <20040122002033.GB12047@nevyn.them.org> <400F227F.9040004@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <400F227F.9040004@redhat.com> User-Agent: Mutt/1.5.1i X-SW-Source: 2004-01/txt/msg00619.txt.bz2 On Wed, Jan 21, 2004 at 08:08:15PM -0500, J. Johnston wrote: > @@ -269,6 +269,9 @@ proc gdb_breakpoint { function } { > -re "Breakpoint \[0-9\]* at .*: file .*, line $decimal.\r\n$gdb_prompt $" {} > -re "Breakpoint \[0-9\]*: file .*, line $decimal.\r\n$gdb_prompt $" {} > -re "Breakpoint \[0-9\]* at .*$gdb_prompt $" {} > + -re "Make breakpoint pending.*y or n. $" { > + return gdb_test "n" "" "setting breakpoint at $function" > + } > -re "$gdb_prompt $" { fail "setting breakpoint at $function" ; return 0 } > timeout { fail "setting breakpoint at $function (timeout)" ; return 0 } > } Well, that's not valid TCL. Stick to gdb_test on one line and return on the next. > +# > +# Test setting, querying, and modifying pending breakpoints > +# > + > +# Test deleting all breakpoints when there are none installed, > +# GDB should not prompt for confirmation. > +# Note that gdb-init.exp provides a "delete_breakpoints" proc FYI, it's gdb.exp. Also this comment doesn't apply to this test script... > +# for general use elsewhere. > + > +gdb_test_multiple "break pendfunc1" "set pending breakpoint" { > + -re ".*Make breakpoint pending.*y or n. $" { > + gdb_test "y" "Breakpoint.*pendfunc1.*pending." "set pending breakpoint" > + } > +} > + > +send_gdb "commands 1\n" > +send_gdb "print k\n" > +send_gdb "end\n" > + > +gdb_test "info break" \ > + "Num Type\[ \]+Disp Enb Address\[ \]+What.* > +\[0-9\]+\[\t \]+breakpoint keep n.*PENDING.*pendfunc1.* > +\[\t \]+stop only if k == 1.* > +\[\t \]+print k.* > +\[0-9\]+\[\t \]+breakpoint keep y.* in main at .*$srcfile:$mainline" \ > +"pending disabled plus commands" Again, whenever you use send_gdb you need to eat the output. I think you can just use gdb_test for this; see commands.exp. -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer