From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13637 invoked by alias); 23 Nov 2003 20:57: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 13630 invoked from network); 23 Nov 2003 20:57:13 -0000 Received: from unknown (HELO nevyn.them.org) (66.93.172.17) by sources.redhat.com with SMTP; 23 Nov 2003 20:57:13 -0000 Received: from drow by nevyn.them.org with local (Exim 4.24 #1 (Debian)) id 1AO1I8-0005pe-T9; Sun, 23 Nov 2003 15:57:12 -0500 Date: Sun, 23 Nov 2003 20:57:00 -0000 From: Daniel Jacobowitz To: Mark Kettenis Cc: gdb-patches@sources.redhat.com Subject: Re: [PATCH] Don't use runto_main in i386-unwind.exp Message-ID: <20031123205712.GA22403@nevyn.them.org> Mail-Followup-To: Mark Kettenis , gdb-patches@sources.redhat.com References: <200311231937.hANJb4Zu009335@elgar.kettenis.dyndns.org> <20031123203105.GA21805@nevyn.them.org> <200311232050.hANKoRPN009597@elgar.kettenis.dyndns.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200311232050.hANKoRPN009597@elgar.kettenis.dyndns.org> User-Agent: Mutt/1.5.1i X-SW-Source: 2003-11/txt/msg00496.txt.bz2 On Sun, Nov 23, 2003 at 09:50:27PM +0100, Mark Kettenis wrote: > Date: Sun, 23 Nov 2003 15:31:05 -0500 > From: Daniel Jacobowitz > > On Sun, Nov 23, 2003 at 08:37:04PM +0100, Mark Kettenis wrote: > > There is no real reson to use runto_main in this testcase, so I > > removed it. > > > > Committed, > > > > Mark > > Please don't do this. runto_main works (suboptimally, but it works) > for remote targets which use a "target foo; load; continue" sequence, > but "run" doesn't. > > How about gdb_run_cmd followed by a gdb_expect looking for the SIGTRAP? > > Like the attached patch? Works for me. Thanks - that's just what I had in mind. I'll try to go back to making the testsuite work with gdbserver so that others can test this (I have some comments from Elena that I still need to address). > Index: testsuite/gdb.arch/i386-unwind.exp > =================================================================== > RCS file: /cvs/src/src/gdb/testsuite/gdb.arch/i386-unwind.exp,v > retrieving revision 1.2 > diff -u -p -r1.2 i386-unwind.exp > --- testsuite/gdb.arch/i386-unwind.exp 23 Nov 2003 19:30:52 -0000 1.2 > +++ testsuite/gdb.arch/i386-unwind.exp 23 Nov 2003 20:49:39 -0000 > @@ -47,8 +47,19 @@ gdb_load ${binfile} > > # Testcase for backtrace/1435. > > -gdb_test "run" "Program received signal SIGTRAP.*" \ > - "run past gdb1435" > +gdb_run_cmd > + > +gdb_expect { > + -re "Program received signal SIGTRAP.*$gdb_prompt $" { > + pass "run past gdb1435" > + } > + -re ".*$gdb_prompt $" { > + fail "run past gdb1435" > + } > + timeout { > + fail "run past gdb1435 (timeout)" > + } > +} > > gdb_test "backtrace 10" \ > "#1\[ \t]*$hex in gdb1435.*\r\n#2\[ \t\]*$hex in main.*" \ > > -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer