67695ab596
* gdb-testsuite-add-gdb.opt-break-on-_exit.exp.patch * gdb-tdep-rs6000-don-t-skip-system-call-in-skip_prologue.patch * gdb-testsuite-fix-stepi-test-cases-with-unix-m32-fpie-pie.patch * gdb-testsuite-fix-assembly-comments-in-gdb.dwarf2-clang-debug-names.exp.tcl.patch * gdb-doc-fix-print-inferior-events-default.patch * gdb-testsuite-fix-gdb.guile-scm-type.exp-with-gcc-4.8.patch * gdb-testsuite-add-gdb.arch-ppc64-break-on-_exit.exp.patch * gdb-testsuite-don-t-error-when-trying-to-unset-last_spawn_tty_name.patch * gdb-exp-improve-error-reading-variable-message.patch * fix-gdb.base-sigstep.exp-test-for-ppc.patch * gdb-testsuite-fix-regexp-in-gdb.base-foll-vfork.exp.patch - Patches added (backports from ml): * gdb-testsuite-disable-inferior-output-in-gdb.base-foll-vfork.exp.patch - Maintenance script qa.sh: - Add -m32/-pie to known clean configs. - Add kfail for PR28467. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=303
59 lines
2.1 KiB
Diff
59 lines
2.1 KiB
Diff
Fix gdb.base/sigstep.exp test for ppc
|
|
|
|
The test stops at <signal_handler called> which is the call to the handler
|
|
rather than in the handler as intended. This patch replaces the
|
|
gdb_test "$enter_cmd to handler" with a gdb_test_multiple test. The multiple
|
|
test looks for the stop at <signal_handler called>. If found, the command
|
|
is issued again. The test passes if gdb stops in the handler as expected.
|
|
|
|
(gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler, step
|
|
from handler: continue to signal
|
|
stepi
|
|
<signal handler called>
|
|
1: x/i $pc
|
|
=> 0x7ffff7f80440 <__kernel_start_sigtramp_rt64>: bctrl
|
|
(gdb) stepi
|
|
handler (sig=551) at sigstep.c:32
|
|
32 {
|
|
1: x/i $pc
|
|
=> 0x10000097c <handler>: addis r2,r12,2
|
|
(gdb) PASS: gdb.base/sigstep.exp: stepi to handler, nothing in handler,
|
|
step from handler: stepi to handler
|
|
|
|
Patch has been tested on x86_64-linux and ppc64le-linux with no test failures.
|
|
|
|
---
|
|
gdb/testsuite/gdb.base/sigstep.exp | 12 +++++++++++-
|
|
1 file changed, 11 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/gdb/testsuite/gdb.base/sigstep.exp b/gdb/testsuite/gdb.base/sigstep.exp
|
|
index ea254af5297..176918b67d6 100644
|
|
--- a/gdb/testsuite/gdb.base/sigstep.exp
|
|
+++ b/gdb/testsuite/gdb.base/sigstep.exp
|
|
@@ -79,6 +79,7 @@ validate_backtrace
|
|
proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } {
|
|
global gdb_prompt inferior_exited_re
|
|
global clear_done other_handler_location
|
|
+ global decimal
|
|
|
|
set prefix "$enter_cmd to handler, $in_handler_prefix in handler, $exit_cmd from handler"
|
|
|
|
@@ -93,7 +94,16 @@ proc advance { enter_cmd in_handler_prefix in_handler exit_cmd } {
|
|
gdb_test "handle SIGVTALRM print pass stop"
|
|
gdb_test "continue" "Program received signal.*" "continue to signal"
|
|
}
|
|
- gdb_test "$enter_cmd" ".*handler .*" "$enter_cmd to handler"
|
|
+
|
|
+ gdb_test_multiple "$enter_cmd" "$enter_cmd to handler" {
|
|
+ -re -wrap "\r\n<signal handler called>.*" {
|
|
+ send_gdb "$enter_cmd\n"
|
|
+ exp_continue
|
|
+ }
|
|
+ -re -wrap "\r\n(Breakpoint $decimal, )?handler \\(sig=.*" {
|
|
+ pass $gdb_test_name
|
|
+ }
|
|
+ }
|
|
|
|
delete_breakpoints
|
|
|