* gdb-6.3-test-self-20050110.patch * gdb-bz1219747-attach-kills.patch * gdb-6.6-buildid-locate-core-as-arg.patch * gdb-attach-fail-reasons-5of5.patch * gdb-archer-pie-addons.patch * gdb-jit-reader-multilib.patch * gdb-6.5-bz218379-solib-trampoline-lookup-lock-fix.patch * gdb-archer.patch * gdb-config.patch * gdb-6.8-quit-never-aborts.patch - Mention removed patches: * gdb-breakpoint-fix-assert-in-jit_event_handler.patch * gdb-fix-section-matching-in-find_pc_sect_compunit.patch * gdb-fortran-fix-print-dynamic-array.patch * gdb-build-hardcode-with-included-regex.patch * gdb-handle-no-upper-bound-in-value-subscript.patch * gdb-fix-internal-error-in-process_event_stop_test.patch * gdb-don-t-return-non-existing-path-in-debuginfod-source-query.patch * gdb-archer-pie-addons-keep-disabled.patch * gdb-fix-filename-in-not-in-executable-format-error.patch * gdb-fix-use-of-invalid-pointer-in-remote-async-inferior-event-handler.patch * gdb-breakpoints-handle-glibc-with-debuginfo-in-create_exception_master_breakpoint.patch - Maintenance scripts: * Add KFAILs in qa.sh. * Add missing '-a' in gdb.log greps in qa.sh. * Fix error handling in qa.sh. - Patches added: * gdb-testsuite-handle-sigill-in-two-gdb.arch-powerpc-test-cases.patch * gdb-testsuite-work-around-skip_prologue-problems-in-gdb.threads-process-dies-while-detaching.exp.patch OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=291
74 lines
2.3 KiB
Diff
74 lines
2.3 KiB
Diff
[gdb/testsuite] Handle SIGILL in two gdb.arch powerpc test-cases
|
|
|
|
On powerpc64le-linux, with test-case gdb.arch/powerpc-addpcis.exp I run into
|
|
SIGILL:
|
|
...
|
|
(gdb) PASS: gdb.arch/powerpc-addpcis.exp: get hexadecimal valueof "$r3"
|
|
stepi^M
|
|
^M
|
|
Program terminated with signal SIGILL, Illegal instruction.^M
|
|
The program no longer exists.^M
|
|
(gdb) PASS: gdb.arch/powerpc-addpcis.exp: set r4
|
|
...
|
|
because it's a power9 insn, and I'm running on a power8 machine.
|
|
|
|
Fix this by handling the SIGILL. Likewise in gdb.arch/powerpc-lnia.exp.
|
|
|
|
Tested on powerpc64le-linux.
|
|
|
|
---
|
|
gdb/testsuite/gdb.arch/powerpc-addpcis.exp | 14 +++++++++++++-
|
|
gdb/testsuite/gdb.arch/powerpc-lnia.exp | 14 +++++++++++++-
|
|
2 files changed, 26 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
|
|
index d1bc7f49ce6..ff7052ce475 100644
|
|
--- a/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
|
|
+++ b/gdb/testsuite/gdb.arch/powerpc-addpcis.exp
|
|
@@ -50,7 +50,19 @@ gdb_breakpoint $bp1
|
|
gdb_breakpoint $bp2
|
|
gdb_breakpoint $bp3
|
|
|
|
-gdb_test "stepi" "" "set r3 "
|
|
+set insn_supported 1
|
|
+gdb_test_multiple "stepi" "set r3" {
|
|
+ -re "Program received signal SIGILL, Illegal instruction\\..*" {
|
|
+ set insn_supported 0
|
|
+ }
|
|
+ -re -wrap "" {
|
|
+ pass $gdb_test_name
|
|
+ }
|
|
+}
|
|
+if { ! $insn_supported } {
|
|
+ unsupported "illegal instruction"
|
|
+ return
|
|
+}
|
|
set check_r3 [get_hexadecimal_valueof "\$r3" "default0"]
|
|
gdb_test "stepi" "" "set r4"
|
|
set check_r4 [get_hexadecimal_valueof "\$r4" "default0"]
|
|
diff --git a/gdb/testsuite/gdb.arch/powerpc-lnia.exp b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
|
|
index 0f56d834046..4ab4f8d92be 100644
|
|
--- a/gdb/testsuite/gdb.arch/powerpc-lnia.exp
|
|
+++ b/gdb/testsuite/gdb.arch/powerpc-lnia.exp
|
|
@@ -54,7 +54,19 @@ gdb_breakpoint $bp3
|
|
|
|
# single-step through the lnia instructions, and retrieve the
|
|
# register values as we proceed.
|
|
-gdb_test "stepi" "" "set r3"
|
|
+set insn_supported 1
|
|
+gdb_test_multiple "stepi" "set r3" {
|
|
+ -re "Program received signal SIGILL, Illegal instruction\\..*" {
|
|
+ set insn_supported 0
|
|
+ }
|
|
+ -re -wrap "" {
|
|
+ pass $gdb_test_name
|
|
+ }
|
|
+}
|
|
+if { ! $insn_supported } {
|
|
+ unsupported "illegal instruction"
|
|
+ return
|
|
+}
|
|
set check_r3 [get_hexadecimal_valueof "\$r3" "default0"]
|
|
gdb_test "stepi" "" "set r4"
|
|
set check_r4 [get_hexadecimal_valueof "\$r4" "default0"]
|