2012-07-19 Pedro Alves <palves@redhat.com>
authorPedro Alves <palves@redhat.com>
Thu, 19 Jul 2012 17:05:49 +0000 (17:05 +0000)
committerPedro Alves <palves@redhat.com>
Thu, 19 Jul 2012 17:05:49 +0000 (17:05 +0000)
* gdb.reverse/sigall-precsave.exp: Set a breakpoint at each signal
handler before recording.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.reverse/sigall-precsave.exp

index 593eae8bfd4048978d68bb565c826cef675ffe71..2e5d2486b03c5a511b95855c938885cd61cb7290 100644 (file)
@@ -1,3 +1,8 @@
+2012-07-19  Pedro Alves  <palves@redhat.com>
+
+       * gdb.reverse/sigall-precsave.exp: Set a breakpoint at each signal
+       handler before recording.
+
 2012-07-19  Tom Tromey  <tromey@redhat.com>
 
        * gdb.cp/casts.exp: Add tests for typeof and decltype.
index e2dabf94ac75b804d9f911d17fd6ee4ee44d2395..ee3240b65c4379f7537d5ef32934559352a07a39 100644 (file)
@@ -254,7 +254,32 @@ set signals {
     TERM
 }
 
-gdb_test "continue" "Breakpoint .* end of main .*" "run to end of main"
+# Software single-step targets can't step into signal handlers.  Since
+# later, when replaying the execution log, the test wants to set
+# breakpoints on handlers, we need to make sure that while recording,
+# GDB steps through the handlers too, so that the execution log covers
+# them.  Setting breakpoints in all handlers takes care of it.  This
+# is harmless for hardware-step targets.
+foreach sig $signals {
+    set test "break *handle_$sig"
+    gdb_test_multiple $test $test {
+       -re "Breakpoint .*$gdb_prompt $" {
+           # No need to record a pass for each breakpoint.
+       }
+    }
+}
+
+gdb_test_multiple "continue" "continue" {
+    -re "Breakpoint .* end of main .*$gdb_prompt $" {
+       pass "run to end of main"
+    }
+    -re "Breakpoint .* handle_.*$gdb_prompt $" {
+       send_gdb "continue\n"
+       exp_continue
+    }
+}
+
+delete_breakpoints
 
 gdb_test "record save $precsave" \
     "Saved core file $precsave with execution log\."  \
This page took 0.044124 seconds and 4 git commands to generate.