From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26115 invoked by alias); 22 Oct 2002 02:02:00 -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 26107 invoked from network); 22 Oct 2002 02:02:00 -0000 Received: from unknown (HELO crack.them.org) (65.125.64.184) by sources.redhat.com with SMTP; 22 Oct 2002 02:02:00 -0000 Received: from nevyn.them.org ([66.93.61.169] ident=mail) by crack.them.org with asmtp (Exim 3.12 #1 (Debian)) id 183pIV-0003fv-00; Mon, 21 Oct 2002 22:01:36 -0500 Received: from drow by nevyn.them.org with local (Exim 3.35 #1 (Debian)) id 183oN8-0005xL-00; Mon, 21 Oct 2002 22:02:18 -0400 Date: Mon, 21 Oct 2002 19:02:00 -0000 From: Daniel Jacobowitz To: gdb-patches@sources.redhat.com Cc: fnasser@redhat.com Subject: [RFA/testsuite] Handle MIPS in step-test.exp Message-ID: <20021022020218.GA22839@nevyn.them.org> Mail-Followup-To: gdb-patches@sources.redhat.com, fnasser@redhat.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.1i X-SW-Source: 2002-10/txt/msg00382.txt.bz2 The MIPS PIC calling conventions have a $gp register which needs to be reloaded after function calls, so they need the same treatment IA-64 and PA do in step-test. I also needed to finish stepping past one call before looking for the next or the test showed a bogus failure. Is this OK? -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer 2002-10-21 Daniel Jacobowitz * gdb.base/step-test.exp: Allow MIPS to return to the line of a function call. Index: testsuite/gdb.base/step-test.exp =================================================================== RCS file: /cvs/src/src/gdb/testsuite/gdb.base/step-test.exp,v retrieving revision 1.5 diff -u -p -r1.5 step-test.exp --- testsuite/gdb.base/step-test.exp 5 Apr 2002 00:30:09 -0000 1.5 +++ testsuite/gdb.base/step-test.exp 13 Oct 2002 22:55:02 -0000 @@ -78,7 +78,8 @@ gdb_test "step" ".*${decimal}.*myglob.*" # On PA64, we end up at a different instruction than PA32. # On IA-64, we also end up on callee instead of on the next line due # to the restoration of the global pointer (which is a caller-save). -if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"]} { +# Similarly on MIPS PIC targets. +if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"]} { send_gdb "finish\n" gdb_expect { -re ".*${decimal}.*a.*5.*= a.*3.*$gdb_prompt $" { pass "step out 1" } @@ -176,8 +177,11 @@ gdb_expect { # On PA64, we end up at a different instruction than PA32. # On IA-64, we end up on callee instead of on the following line due # to the restoration of the global pointer. - if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] } { + # Similarly on MIPS PIC targets. + if { [istarget "hppa2.0w-hp-hpux*"] || [istarget "ia64-*-*"] || [istarget "mips*-*-*"] } { pass "stepi: finish call 2" + test_i "stepi: past call" "stepi" \ + ".*${decimal}.*callee.*STEPI" ".*${decimal}.*callee.*NEXTI" } else { fail "stepi: finish call 2" return