Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Daniel Jacobowitz <drow@mvista.com>
To: gdb-patches@sources.redhat.com
Cc: fnasser@redhat.com
Subject: [RFA/testsuite] Handle MIPS in step-test.exp
Date: Mon, 21 Oct 2002 19:02:00 -0000	[thread overview]
Message-ID: <20021022020218.GA22839@nevyn.them.org> (raw)

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  <drow@mvista.com>

	* 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


             reply	other threads:[~2002-10-22  2:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-21 19:02 Daniel Jacobowitz [this message]
2002-10-22  7:19 ` Andrew Cagney
2002-10-22  7:25   ` Daniel Jacobowitz
2002-11-27 10:55     ` Andrew Cagney
2002-12-03  7:18       ` Fernando Nasser
2002-12-03  7:55         ` Andrew Cagney

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20021022020218.GA22839@nevyn.them.org \
    --to=drow@mvista.com \
    --cc=fnasser@redhat.com \
    --cc=gdb-patches@sources.redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox