This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[RFA] gdb.base/shlib-call.exp changes for IRIX


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"


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]