Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Kevin Buettner <kevinb@redhat.com>
To: gdb-patches@sources.redhat.com
Subject: [RFA] gdb.base/shlib-call.exp changes for IRIX
Date: Mon, 29 Jul 2002 15:54:00 -0000	[thread overview]
Message-ID: <1020729221547.ZM11554@localhost.localdomain> (raw)

Some more IRIX related changes.  I can break this change up into two
parts if necessary.  (The linker flag change is probably reasonably
obvious, but the change to the "step out of shr2" test should be
reviewed.)

Anyway, regarding the "step out of shr2" test changes, the IRIX
compiler doesn't emit line number information for the epilogue, so we
don't see the step onto the final ``}'' of the function.  I don't
see a problem with this behavior.  I've revised the test to accept
either behavior.

I've also revised the messages a little bit to account for the
restructuring of the test.

Okay to commit?

	* gdb.base/shlib-call.exp (additional_flags): Add linker flags
	so that shared libraries created by test will be found.
	(step inside shr2): Don't fail if first step ends up stepping
	out of the function instead of stopping on the epilogue.

Index: testsuite/gdb.base/shlib-call.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/shlib-call.exp,v
retrieving revision 1.5
diff -u -p -r1.5 shlib-call.exp
--- testsuite/gdb.base/shlib-call.exp	18 Apr 2002 21:07:20 -0000	1.5
+++ testsuite/gdb.base/shlib-call.exp	29 Jul 2002 21:37:35 -0000
@@ -103,6 +103,8 @@ if { ($gcc_compiled 
       &&  ([istarget "powerpc*-*-aix*"]
 	|| [istarget "rs6000*-*-aix*"] )) } {
     set additional_flags "additional_flags=-L${objdir}/${subdir}"
+} elseif { [istarget "mips-sgi-irix*"] } {
+    set additional_flags "additional_flags=-rpath ${objdir}/${subdir}"
 } else {
     set additional_flags ""
 }
@@ -234,18 +236,27 @@ gdb_expect {
 
 #step -return
     send_gdb "step\n"
+    # A step at this point will either take us entirely out of
+    # the function or into the function's epilogue.  The exact
+    # behavior will differ depending upon upon whether or not
+    # the compiler emits line number information for the epilogue.
     gdb_expect {
-        -re ".*\\\}.*$gdb_prompt $" { pass "step inside shr2 (shlib func)"}
-        -re ".*$gdb_prompt $" { fail "step inside shr2 (shlib func)" }
-        timeout { fail "step inside shr2 (shlib func) (timeout)" }
-    }
-    
-    send_gdb "step\n"
-    gdb_expect {
-        -re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" { pass "step out of shr2 to main"}
-        -re ".*$gdb_prompt $" { fail "step out of shr2 to main" }
+        -re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" { 
+	    pass "step out of shr2 to main"
+	}
+        -re ".*\\\}.*$gdb_prompt $" {
+	    pass "step out of shr2 to main (stopped in shr2 epilogue)"
+	    send_gdb "step\n"
+	    gdb_expect {
+		-re "main \\(\\) at.*g = mainshr1\\(g\\);.*$gdb_prompt $" { pass "step out of shr2 epilogue to main"}
+		-re ".*$gdb_prompt $" { fail "step out of shr2 epilogue to main" }
+		timeout { fail "step out of shr2 epilogue to main (timeout)" }
+	    }
+	}
+        -re ".*$gdb_prompt $" { fail "step out of shr2" }
         timeout { fail "step out of shr2 to main (timeout)" }
     }
+    
 
 #print mainshr1(1)
 send_gdb "print mainshr1(1)\n"


             reply	other threads:[~2002-07-29 22:45 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-29 15:54 Kevin Buettner [this message]
2002-07-30 11:55 ` Kevin Buettner

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=1020729221547.ZM11554@localhost.localdomain \
    --to=kevinb@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