2004-04-23 Andrew Cagney <cagney@redhat.com>
authorAndrew Cagney <cagney@redhat.com>
Fri, 23 Apr 2004 16:44:25 +0000 (16:44 +0000)
committerAndrew Cagney <cagney@redhat.com>
Fri, 23 Apr 2004 16:44:25 +0000 (16:44 +0000)
* gdb.base/siginfo.exp: Clean up step out of signal.
* gdb.base/sigstep.exp: Ditto.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/siginfo.exp
gdb/testsuite/gdb.base/sigstep.exp

index 2b5e05d87df7157ba21c706ecd6191d6863658bf..17a37aa43869b8cab085e8a61e9964374723a1e4 100644 (file)
@@ -1,3 +1,8 @@
+2004-04-23  Andrew Cagney  <cagney@redhat.com>
+
+       * gdb.base/siginfo.exp: Better handle step out of signal.
+       * gdb.base/sigstep.exp: Ditto.
+
 2004-04-22  Jeff Johnston  <jjohnstn@redhat.com>
             Daniel Jacobowitz  <drow@mvista.com>
 
index f335bc7399914a50bba684eb3fc66d4445df4239..a081ab8e8877530597bd47b6defdc7320df0ba35 100644 (file)
@@ -83,9 +83,16 @@ gdb_test_multiple "step" "${test}" {
        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 6f94329c8c61b7700323f43d70b46281a9a7ee0c..e0eaf759df31e6aa6ae1e23e163ad77c737e494f 100644 (file)
@@ -87,17 +87,15 @@ proc advance { i } {
            exp_continue
        }
        -re "Program exited normally.*${gdb_prompt} $" {
-           kfail gdb/1613 "$test (Program exited normally)"
-       }
-       -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.
+           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"
        }
     }
@@ -125,7 +123,7 @@ proc advancei { i } {
            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} $" {
This page took 0.033149 seconds and 4 git commands to generate.