diff options
author | Pedro Alves <palves@redhat.com> | 2012-07-19 17:05:49 +0000 |
---|---|---|
committer | Pedro Alves <palves@redhat.com> | 2012-07-19 17:05:49 +0000 |
commit | b7aefa4d2e50047a085e6d58cd9ee45e5e90d2ef (patch) | |
tree | 9221029d11a94ae11f4c4118689f1afe3d8b6b75 /gdb/testsuite/gdb.reverse/sigall-precsave.exp | |
parent | 0109304504e0b6d611e95fc9c1e7bccdd64a0fee (diff) | |
download | gdb-b7aefa4d2e50047a085e6d58cd9ee45e5e90d2ef.zip gdb-b7aefa4d2e50047a085e6d58cd9ee45e5e90d2ef.tar.gz gdb-b7aefa4d2e50047a085e6d58cd9ee45e5e90d2ef.tar.bz2 |
2012-07-19 Pedro Alves <palves@redhat.com>
* gdb.reverse/sigall-precsave.exp: Set a breakpoint at each signal
handler before recording.
Diffstat (limited to 'gdb/testsuite/gdb.reverse/sigall-precsave.exp')
-rw-r--r-- | gdb/testsuite/gdb.reverse/sigall-precsave.exp | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.reverse/sigall-precsave.exp b/gdb/testsuite/gdb.reverse/sigall-precsave.exp index e2dabf9..ee3240b 100644 --- a/gdb/testsuite/gdb.reverse/sigall-precsave.exp +++ b/gdb/testsuite/gdb.reverse/sigall-precsave.exp @@ -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\." \ |