Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [RFA] gdb.base/shlib-call.exp changes for IRIX
@ 2002-07-29 15:54 Kevin Buettner
  2002-07-30 11:55 ` Kevin Buettner
  0 siblings, 1 reply; 2+ messages in thread
From: Kevin Buettner @ 2002-07-29 15:54 UTC (permalink / raw)
  To: gdb-patches

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"


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [RFA] gdb.base/shlib-call.exp changes for IRIX
  2002-07-29 15:54 [RFA] gdb.base/shlib-call.exp changes for IRIX Kevin Buettner
@ 2002-07-30 11:55 ` Kevin Buettner
  0 siblings, 0 replies; 2+ messages in thread
From: Kevin Buettner @ 2002-07-30 11:55 UTC (permalink / raw)
  To: gdb-patches

On Jul 29,  3:15pm, Kevin Buettner wrote:

> 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.

I'm also (temporarily) withdrawing this patch since I now have some
other changes to make to shlib-call.exp.  I'll commit the obvious
portions and then repost the part that I want reviewed.

Kevin


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-07-30 18:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-07-29 15:54 [RFA] gdb.base/shlib-call.exp changes for IRIX Kevin Buettner
2002-07-30 11:55 ` Kevin Buettner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox