From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4404 invoked by alias); 10 Sep 2002 21:58:30 -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 4394 invoked from network); 10 Sep 2002 21:58:29 -0000 Received: from unknown (HELO localhost.redhat.com) (66.30.197.194) by sources.redhat.com with SMTP; 10 Sep 2002 21:58:29 -0000 Received: by localhost.redhat.com (Postfix, from userid 469) id 691C4106CE; Tue, 10 Sep 2002 17:56:39 -0400 (EDT) From: Elena Zannoni MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15742.27287.297281.525517@localhost.redhat.com> Date: Tue, 10 Sep 2002 14:58:00 -0000 To: Keith Seitz Cc: Elena Zannoni , gdb-patches@sources.redhat.com Subject: Re: [RFA/MI testsuite] mi_run_to_main/mi_next/mi_step In-Reply-To: References: X-SW-Source: 2002-09/txt/msg00160.txt.bz2 Keith Seitz writes: > On Tue, 10 Sep 2002, Keith Seitz wrote: > > > This patch just fixes what is already in mi-support.exp, which doesn't > > work at all. As an alternative, we could whack mi_step and mi_next (or I > > we could even re-write those to use mi_step_to and mi_next_to, come to > > think of it). > > Ok, here's the same patch but using mi_next_to and mi_step_to. > Yes. Thanks! Elena > Keith > > ChangeLog > 2002-09-10 Keith Seitz > > * lib/mi-support.exp: (mi_run_to_main): Allow anything to precede > regexp for stopping at main. Could have multiple event notifications. > Don't assume that main was declared with no parameters. > (mi_next): Use mi_step_to. > (mi_step): Use mi_next_to. > > Index: testsuite/lib/mi-support.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/lib/mi-support.exp,v > retrieving revision 1.15 > diff -p -r1.15 mi-support.exp > *** testsuite/lib/mi-support.exp 4 Sep 2002 21:05:07 -0000 1.15 > --- testsuite/lib/mi-support.exp 10 Sep 2002 14:54:55 -0000 > *************** proc mi_run_to_main { } { > *** 656,701 **** > > > # Next to the next statement > > proc mi_next { test } { > ! global suppress_flag > ! if { $suppress_flag } { > ! return -1 > ! } > ! global mi_gdb_prompt > ! send_gdb "220-exec-next\n" > ! gdb_expect { > ! -re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{].*[\\\]\}\],file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" { > ! pass "$test" > ! return 0 > ! } > ! timeout { > ! fail "$test" > ! return -1 > ! } > ! } > } > > > # Step to the next statement > > proc mi_step { test } { > ! global suppress_flag > ! if { $suppress_flag } { > ! return -1 > ! } > ! global mi_gdb_prompt > ! send_gdb "220-exec-step\n" > ! gdb_expect { > ! -re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"end-stepping-range\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],file=\".*\",line=\"\[0-9\]*\"\}\r\n$mi_gdb_prompt$" { > ! pass "$test" > ! return 0 > ! } > ! timeout { > ! fail "$test" > ! return -1 > ! } > ! } > } > > # cmd should not include the number or newline (i.e. "exec-step 3", not > --- 656,673 ---- > > > # Next to the next statement > + # For return values, see mi_run_to_helper > > proc mi_next { test } { > ! return [mi_next_to {.*} {.*} {.*} {.*} $test] > } > > > # Step to the next statement > + # For return values, see mi_run_to_helper > > proc mi_step { test } { > ! return [mi_step_to {.*} {.*} {.*} {.*} $test] > } > > # cmd should not include the number or newline (i.e. "exec-step 3", not > *************** proc mi_run_to_helper { cmd reason func > *** 714,724 **** > global decimal > send_gdb "220-$cmd\n" > gdb_expect { > ! -re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"$reason\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",line=\"$line\"\}$extra\r\n$mi_gdb_prompt$" { > pass "$test" > return 0 > } > ! -re "220\\^running\r\n${mi_gdb_prompt}220\\*stopped,reason=\"$reason\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],file=\".*\",line=\"\[0-9\]*\"\}.*\r\n$mi_gdb_prompt$" { > fail "$test (stopped at wrong place)" > return -1 > } > --- 686,696 ---- > global decimal > send_gdb "220-$cmd\n" > gdb_expect { > ! -re ".*220\\^running\r\n${mi_gdb_prompt}.*220\\*stopped,reason=\"$reason\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\"$func\",args=$args,file=\".*$file\",line=\"$line\"\}$extra\r\n$mi_gdb_prompt$" { > pass "$test" > return 0 > } > ! -re ".*220\\^running\r\n${mi_gdb_prompt}.*220\\*stopped,reason=\"$reason\",thread-id=\"$decimal\",frame=\{addr=\"$hex\",func=\".*\",args=\[\\\[\{\].*\[\\\]\}\],file=\".*\",line=\"\[0-9\]*\"\}.*\r\n$mi_gdb_prompt$" { > fail "$test (stopped at wrong place)" > return -1 > }