From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2497 invoked by alias); 25 Aug 2004 19:08:55 -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 2489 invoked from network); 25 Aug 2004 19:08:54 -0000 Received: from unknown (HELO us.ibm.com) (32.97.110.142) by sourceware.org with SMTP; 25 Aug 2004 19:08:54 -0000 Received: by us.ibm.com (Postfix, from userid 1000) id 875F812BAE; Wed, 25 Aug 2004 12:06:41 -0700 (PDT) From: Paul Gilliam Reply-To: pgilliam@us.ibm.com To: Michael Chastain Subject: Re: Avoid timeouts in call-sc.exp Date: Wed, 25 Aug 2004 19:08:00 -0000 User-Agent: KMail/1.6.2 Cc: gdb-patches@sources.redhat.com References: <200408181426.30208.pgilliam@us.ibm.com> <200408251052.47571.pgilliam@us.ibm.com> <412CD652.nail1O31PAOF7@mindspring.com> In-Reply-To: <412CD652.nail1O31PAOF7@mindspring.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408251206.41425.pgilliam@us.ibm.com> X-SW-Source: 2004-08/txt/msg00701.txt.bz2 Here is another try. -=# Paul #=- PS: I only did the ${....} because that seemed to be the usage in call-sc.exp 2004-08-25 Paul Gilliam * gdb.base/call-sc: Make sure PC is syncronized after the "return". diff -Naur old/call-sc.exp new/call-sc.exp --- old/call-sc.exp 2004-08-24 01:11:59.000000000 +0000 +++ new/call-sc.exp 2004-08-25 22:27:04.089926216 +0000 @@ -281,6 +281,30 @@ } } + # If the previous test did not work, the program counter might + # still be inside foo() rather than main(). Make sure the program + # counter is is main(). + # + # This happens on ppc64 GNU/Linux with gcc 3.4.1 and a buggy GDB + + set test "return foo; syncronize pc to main()" + for {set loop_count 0} {$loop_count < 2} {incr loop_count} { + gdb_test_multiple "backtrace 1" $test { + -re "#0.*main \\(\\).*${gdb_prompt} $" { + pass $test + set loop_count 2 + } + -re "#0.*fun \\(\\).*${gdb_prompt} $" { + if {$loop_count < 1} { + gdb_test "finish" ".*" "" + } else { + fail $test + set loop_count 2 + } + } + } + } + # Check that the return-value is as expected. At this stage we're # just checking that GDB has returned a value consistent with # "return_value_unknown" set above. On Wednesday 25 August 2004 11:11, Michael Chastain wrote: > It's a little weird, but it's much better. > > . "synchronize" is spelled with an h. > . include a changelog entry with the submission > . you don't need ${...} for each variable access. > just $loop_count, $test, and so on. > . this is the fsf version of gdb, it's better to work with > fsf sources -- either gdb 6.2 or the cvs version of gdb, > not a red hat gdb. > > Can you fix those things up, then download gdb 6.2 or the > cvs version of gdb, and do your work against that.