From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14216 invoked by alias); 26 Aug 2004 16:34:35 -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 14195 invoked from network); 26 Aug 2004 16:34:33 -0000 Received: from unknown (HELO us.ibm.com) (32.97.110.142) by sourceware.org with SMTP; 26 Aug 2004 16:34:33 -0000 Received: by us.ibm.com (Postfix, from userid 1000) id 8067B11B6C; Thu, 26 Aug 2004 09:32:23 -0700 (PDT) From: Paul Gilliam Reply-To: pgilliam@us.ibm.com To: Michael Chastain Subject: Re: Avoid timeouts in call-sc.exp Date: Thu, 26 Aug 2004 16:34:00 -0000 User-Agent: KMail/1.6.2 Cc: gdb-patches@sources.redhat.com References: <200408181426.30208.pgilliam@us.ibm.com> <200408260914.50276.pgilliam@us.ibm.com> <412E0F2D.nail38C1BTHS0@mindspring.com> In-Reply-To: <412E0F2D.nail38C1BTHS0@mindspring.com> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200408260932.23406.pgilliam@us.ibm.com> X-SW-Source: 2004-08/txt/msg00711.txt.bz2 On Thursday 26 August 2004 09:26, Michael Chastain wrote: > Paul Gilliam wrote: > > Not to be a pain, but I am a CVS virgin. Could you check it in inside of > > a 'script' and send me (or post) the transcript? > > Sure, I can do that. > > Just fix the syncHronize and "gdb.base/call-sc.exp" bits and send me a > fresh patch, and I'll commit it and send you a script. Also I'll dig > up some CVS references for you. Thanks a lot. Here is the new patch.. synchronized and 'exp'idited. I also updated the date. -=# Paul #=- 2004-08-26 Paul Gilliam * gdb.base/call-sc.exp: 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; synchronize 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.