From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8429 invoked by alias); 23 Nov 2003 20:51:04 -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 8413 invoked from network); 23 Nov 2003 20:51:00 -0000 Received: from unknown (HELO walton.kettenis.dyndns.org) (213.93.115.144) by sources.redhat.com with SMTP; 23 Nov 2003 20:51:00 -0000 Received: from elgar.kettenis.dyndns.org (elgar.kettenis.dyndns.org [192.168.0.2]) by walton.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hANKoRjW000378; Sun, 23 Nov 2003 21:50:27 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: from elgar.kettenis.dyndns.org (localhost [127.0.0.1]) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6) with ESMTP id hANKoRTW009600; Sun, 23 Nov 2003 21:50:27 +0100 (CET) (envelope-from kettenis@elgar.kettenis.dyndns.org) Received: (from kettenis@localhost) by elgar.kettenis.dyndns.org (8.12.6p3/8.12.6/Submit) id hANKoRPN009597; Sun, 23 Nov 2003 21:50:27 +0100 (CET) Date: Sun, 23 Nov 2003 20:51:00 -0000 Message-Id: <200311232050.hANKoRPN009597@elgar.kettenis.dyndns.org> From: Mark Kettenis To: drow@mvista.com CC: gdb-patches@sources.redhat.com In-reply-to: <20031123203105.GA21805@nevyn.them.org> (message from Daniel Jacobowitz on Sun, 23 Nov 2003 15:31:05 -0500) Subject: Re: [PATCH] Don't use runto_main in i386-unwind.exp References: <200311231937.hANJb4Zu009335@elgar.kettenis.dyndns.org> <20031123203105.GA21805@nevyn.them.org> X-SW-Source: 2003-11/txt/msg00495.txt.bz2 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. Mark 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.*" \