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]

[commit] Cleanup step out of signal tests


Hello,

This cleans up the step-out-of-signal tests, in particular:

- inferior instead exiting (gdb/1613)
- inferior can land in two places

I've not tweaked things for:

finish
Run till exit from #0  catcher (signal=26) at /opt/src/gdb/src/gdb/testsuite/gdb.base/sigaltstack.c:71
Warning:
Cannot insert breakpoint 0.
Error accessing memory address 0xffffe420: Input/output error.
(gdb) FAIL: gdb.base/sigaltstack.exp: finish from catch LEAF

As the test passes on my RHEL 3 GNU/Linux box.


committed,
Andrew
2004-04-23  Andrew Cagney  <cagney@redhat.com>

	* gdb.base/siginfo.exp: Clean up step out of signal.
	* gdb.base/sigstep.exp: Ditto.
 
Index: gdb.base/siginfo.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/siginfo.exp,v
retrieving revision 1.1
diff -u -r1.1 siginfo.exp
--- gdb.base/siginfo.exp	15 Apr 2004 21:14:00 -0000	1.1
+++ gdb.base/siginfo.exp	23 Apr 2004 16:40:30 -0000
@@ -83,9 +83,16 @@
 	send_gdb "step\n"
 	exp_continue
     }
-    -re "return 0.*${gdb_prompt} $" {
-	# Stepping out of a function GDB advances the inferior to the
-	# start of the next line
+    -re "Program exited normally.*${gdb_prompt} $" {
+	kfail gdb/1613 "$test (program exited)"
+    }
+    -re "(while ..done|return 0).*${gdb_prompt} $" {
+	# After stepping out of a function /r signal-handler, GDB will
+	# advance the inferior until it is at the first instruction of
+	# a code-line.  While typically things return to the middle of
+	# the "while..." (and hence GDB advances the inferior to the
+	# "return..." line) it is also possible for the return to land
+	# on the first instruction of "while...".  Accept both cases.
 	pass "$test"
     }
 }
Index: gdb.base/sigstep.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.base/sigstep.exp,v
retrieving revision 1.1
diff -u -r1.1 sigstep.exp
--- gdb.base/sigstep.exp	21 Apr 2004 17:19:28 -0000	1.1
+++ gdb.base/sigstep.exp	23 Apr 2004 16:40:30 -0000
@@ -87,17 +87,15 @@
 	    exp_continue
 	}
 	-re "Program exited normally.*${gdb_prompt} $" {
-	    kfail gdb/1613 "$test (Program exited normally)"
+	    kfail gdb/1613 "$test (program exited)"
 	}
-	-re "while ..done.*${gdb_prompt} $" {
-	    # After stepping out of a function, GDB might find that
-	    # the inferior is already at the first instruction of this
-	    # line.
-	    pass "$test"
-	}
-	-re "return 0.*${gdb_prompt} $" {
-	    # After stepping out of a function, GDB will advance the
-	    # inferior to the start of the next line.
+	-re "(while ..done|return 0).*${gdb_prompt} $" {
+	    # After stepping out of a function /r signal-handler, GDB will
+	    # advance the inferior until it is at the first instruction of
+	    # a code-line.  While typically things return to the middle of
+	    # the "while..." (and hence GDB advances the inferior to the
+	    # "return..." line) it is also possible for the return to land
+	    # on the first instruction of "while...".  Accept both cases.
 	    pass "$test"
 	}
     }
@@ -125,7 +123,7 @@
 	    pass "$test"
 	}
 	-re "Program exited normally.*${gdb_prompt} $" {
-	    kfail gdb/1613 "$test (Program exited normally)"
+	    kfail gdb/1613 "$test (program exited)"
 	    set program_exited 1
 	}
 	-re "main .*${gdb_prompt} $" {

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