This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA/resubmit] shlib-call.exp: stepping out...
- From: Fernando Nasser <fnasser at redhat dot com>
- To: Kevin Buettner <kevinb at redhat dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Wed, 25 Sep 2002 15:17:59 -0400
- Subject: Re: [RFA/resubmit] shlib-call.exp: stepping out...
- Organization: Red Hat , Inc. - Toronto
- References: <1020730190942.ZM16441@localhost.localdomain>
Kevin Buettner wrote:
This is a resubmission of
http://sources.redhat.com/ml/gdb-patches/2002-07/msg00566.html
The current patch (below) is identical to the previous patch with the
exception that the "obvious" portion has been committed (and therefore
no longer shows up in the patch).
Here's what I said about this patch in my previous post:
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?
Yes, go ahead. But please send context diffs next time.
Fernando
* gdb.base/shlib-call.exp (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.6
diff -u -p -r1.6 shlib-call.exp
--- testsuite/gdb.base/shlib-call.exp 30 Jul 2002 18:51:23 -0000 1.6
+++ testsuite/gdb.base/shlib-call.exp 30 Jul 2002 18:56:55 -0000
@@ -239,18 +239,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"
--
Fernando Nasser
Red Hat - Toronto E-Mail: fnasser@redhat.com
2323 Yonge Street, Suite #300
Toronto, Ontario M4P 2C9