Patched dropped: * gdb-6.6-buildid-locate-tests.patch Patches modified: * gdb-add-rpm-suggestion-script.patch - Update to fedora rawhide @ 12e32a6. Patches modified: * gdb-add-rpm-suggestion-script.patch * gdb-backport-buildid-related-changes.patch * gdb-remove-qnx-neutrino-support.patch - Update to fedora rawhide @ 264209d. Maintenance script import-fedora.sh: * Drop gdb-rhbz1156192-recursive-dlopen-test.patch from skip_patches. - Update to fedora rawhide @ 020018c. Maintenance script import-fedora.sh: * Drop gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch from skip_patches. - Update to fedora rawhide @ 1e3eb79. Maintenance script import-fedora.sh: * Drop gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch from skip_patches. - Update to fedora rawhide @ 1a098a7. Patches dropped: * gdb-6.3-gstack-20050411.patch * gdb-testsuite-require-can_spawn_for_attach-in-gdb.ba.patch - Update to fedora rawhide @ 5fc2d96. Patches dropped: * gdb-backport-buildid-related-changes.patch * gdb-catchpoint-re-set.patch * gdb-remove-qnx-neutrino-support.patch - Update to fedora rawhide @ 6b0ca99 (gdb 16.2). Patches updated (fedora): * gdb-add-rpm-suggestion-script.patch Maintenance script qa-local.sh: * Update version to 16.2. Patches updated: * gdb-testsuite-ada-pie.patch * gdb-tui-enable-work-around-libncurses-segfault.patch * gdb-guile-use-scm_debug_typing_strictness-0.patch * add-gdbarch_dwarf2_reg_piece_offset-hook.patch * gdb-testsuite-fix-gdb.ada-big_packed_array.exp-on-s3.patch * gdb-cli-add-ignore-errors-command.patch * fixup-gdb-add-rpm-suggestion-script.patch Patches dropped: * gdb-testsuite-fix-another-regexp-in-gdb.threads-step.patch * gdb-testsuite-fix-error-in-gdb.server-server-kill-py.patch * gdb-testsuite-fix-timeout-in-gdb.tui-resize-2.exp.patch * fix-gdb.dap-step-out.exp-on-s390x.patch * fix-gdb.dwarf2-shortpiece.exp-on-s390x.patch * gdb-build-fix-unused-var-in-corelow.c.patch * gdb-exp-fix-gdb.fortran-intrinsics.exp-fail-on-arm.patch * gdb-prune-inferior-after-switching-inferior.patch * gdb-record-fix-out-of-bounds-write-in-aarch64_record.patch * gdb-symtab-fix-target-type-of-complex-long-double-on.patch * gdb-symtab-return-correct-reader-for-top-level-cu-in.patch * gdb-tdep-fix-arm-thumb2-hw-breakpoint.patch * gdb-tdep-fix-recording-of-t1-push.patch * gdb-tdep-handle-sycall-statx-for-arm-linux.patch * gdb-tdep-handle-syscall-clock_gettime64-for-arm-linu.patch * gdb-tdep-s390-add-arch15-record-replay-support.patch * gdb-testsuite-avoid-intermittent-failures-on-a-debug.patch * gdb-testsuite-don-t-use-set-auto-solib-add-off.patch * gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-on-arm-lin.patch * gdb-testsuite-fix-gdb.arch-arm-pseudo-unwind.exp-wit.patch * gdb-testsuite-fix-gdb.arch-arm-single-step-kernel-he.patch * gdb-testsuite-fix-gdb.arch-riscv-tdesc-regs.exp.patch * gdb-testsuite-fix-gdb.base-empty-host-env-vars.exp.patch * gdb-testsuite-fix-gdb.base-list-dot-nodebug-and-make.patch * gdb-testsuite-fix-gdb.cp-m-static.exp-on-arm.patch * gdb-testsuite-fix-gdb.dwarf2-dw2-fixed-point.exp-on-.patch * gdb-testsuite-fix-gdb.dwarf2-dw2-lines.exp-on-arm-li.patch * gdb-testsuite-fix-gdb.fortran-array-bounds.exp-on-ar.patch * gdb-testsuite-fix-gdb.python-py-format-address.exp-o.patch * gdb-testsuite-fix-gdb.python-py-format-string.exp-wi.patch * gdb-testsuite-fix-gdb.python-py-mi-cmd.exp-with-pyth.patch * gdb-testsuite-fix-gdb.threads-leader-exit-attach.exp.patch * gdb-testsuite-fix-regexp-in-gdb.ada-mi_var_access.ex.patch * gdb-testsuite-fix-regexp-in-gdb.arch-i386-disp-step-.patch * gdb-testsuite-fix-regexp-in-gdb.threads-stepi-over-c.patch * gdb-testsuite-fix-timeout-in-gdb.mi-mi-multi-command.patch * handle-address-class-annotation-for-s390x-in-some-te.patch * opcodes-fix-std-gnu23-compatibility-wrt-static_asser.patch * s390-add-arch15-concurrent-functions-facility-insns.patch * s390-add-arch15-instruction-names.patch * s390-add-arch15-instructions.patch * s390-align-opcodes-to-lower-case.patch * s390-fix-disassembly-of-optional-addressing-operands.patch * s390-relax-risbg-n-z-risb-h-l-gz-rns-ros-rxs-bgt-ope.patch * s390-simplify-dis-assembly-of-insn-operands-with-con.patch * s390-treat-addressing-operand-sequence-as-one-in-dis.patch * use-setvariable-in-gdb.dap-scopes.exp.patch Patches added: * gdb-testsuite-fix-gdb.dwarf2-implptr.exp-regression.patch * gdb-testsuite-work-around-pr32850.patch * gdb-symtab-fix-gdb.base-fission-macro.exp-with-unix-.patch * gdb-testsuite-fix-another-timeout-in-gdb.base-bg-exe.patch - Add "BuildRequires: glibc-locale" for gdb:testsuite to fix SLFO testsuite failures. OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=454
121 lines
3.6 KiB
Diff
121 lines
3.6 KiB
Diff
From da210b312eab6444f6d20d62dc6c3c47413b93b2 Mon Sep 17 00:00:00 2001
|
|
From: Tom de Vries <tdevries@suse.de>
|
|
Date: Mon, 7 Apr 2025 13:53:56 +0200
|
|
Subject: [PATCH 15/48] [gdb/testsuite] Compile ada hello world for
|
|
skip_ada_tests
|
|
|
|
For openSUSE Leap 15.0 with gcc-PIE installed (which makes gcc create PIE
|
|
executables by default) we get:
|
|
...
|
|
FAIL: gdb.ada/O2_float_param.exp: compilation foo.adb
|
|
...
|
|
|
|
The problem is that while gcc-PIE affects gcc, it does not affect gnatlink,
|
|
so it links in the libgnat.a, rather than libgnat_pic.a. [ This is
|
|
bsc#1115034. ]
|
|
|
|
[ Without gcc-PIE, we have a related problem: if we run ada tests with
|
|
--target_board=unix/-fPIE/-pie, which makes sure PIE executables are generated
|
|
for c/c++ test-cases, still we get non-PIE ada executables, because gnatmake
|
|
does not pass -pie to gnatlink. And if gnatmake would pass -pie to gnatlink,
|
|
we'd run into the same FAIL as above because gnatlink does not use use
|
|
libgnat_pic.a when -pie is specified (this is PR gcc/87936). So, in order to
|
|
have ada tests generate PIE executables, we need
|
|
--target_board=unix/-fPIE/-largs/-pie/-lgnat_pic/-margs, which will not work
|
|
with c/c++ test-cases. ]
|
|
|
|
For now, we check whether we can compile an ada hello world, and if not,
|
|
generate an UNSUPPORTED in either skip_ada_tests or gdb_compile_ada, to
|
|
not have this problem result in ~200 FAILs.
|
|
|
|
gdb/testsuite/ChangeLog:
|
|
|
|
2020-11-06 Tom de Vries <tdevries@suse.de>
|
|
|
|
* lib/ada.exp (gdb_compile_ada): Call gdb_can_compile_ada.
|
|
(gdb_can_compile_ada): New gdb_caching_proc.
|
|
* lib/gdb.exp: Add load_lib ada.exp.
|
|
(skip_ada_tests): Return 1 if !gdb_can_compile_ada.
|
|
---
|
|
gdb/testsuite/lib/ada.exp | 31 +++++++++++++++++++++++++++++++
|
|
gdb/testsuite/lib/gdb.exp | 8 ++++++++
|
|
2 files changed, 39 insertions(+)
|
|
|
|
diff --git a/gdb/testsuite/lib/ada.exp b/gdb/testsuite/lib/ada.exp
|
|
index 05151d3d8f1..4d04d597474 100644
|
|
--- a/gdb/testsuite/lib/ada.exp
|
|
+++ b/gdb/testsuite/lib/ada.exp
|
|
@@ -109,12 +109,43 @@ proc gdb_compile_ada_1 {source dest type options} {
|
|
# compile was successful.
|
|
|
|
proc gdb_compile_ada {source dest type options} {
|
|
+ if { [gdb_can_compile_ada] == 0 } {
|
|
+ global gdb_test_file_name
|
|
+ unsupported "$gdb_test_file_name"
|
|
+ return "Cannot compile ada"
|
|
+ }
|
|
set result [gdb_compile_ada_1 $source $dest $type $options]
|
|
|
|
gdb_compile_test $source $result
|
|
return $result
|
|
}
|
|
|
|
+gdb_caching_proc gdb_can_compile_ada {} {
|
|
+ set name "hello"
|
|
+ set dir "[pwd]/tmp-ada-hello-[pid]"
|
|
+ set src "$dir/$name.adb"
|
|
+ set dest "$dir/$name"
|
|
+
|
|
+ set code {
|
|
+ with Ada.Text_IO;
|
|
+
|
|
+ procedure Hello is
|
|
+ begin
|
|
+ Ada.Text_IO.Put_Line("Hello, world!");
|
|
+ end Hello;
|
|
+ }
|
|
+
|
|
+ file mkdir $dir
|
|
+ gdb_produce_source $src $code
|
|
+ set res [gdb_compile_ada_1 $src $dest executable {debug}]
|
|
+ file delete -force $dir
|
|
+
|
|
+ if { $res != "" } {
|
|
+ return 0
|
|
+ }
|
|
+ return 1
|
|
+}
|
|
+
|
|
# Like standard_testfile, but for Ada. Historically the Ada tests
|
|
# used a different naming convention from many of the other gdb tests,
|
|
# and this difference was preserved during the conversion to
|
|
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
|
|
index 5d909e937db..fda55e06277 100644
|
|
--- a/gdb/testsuite/lib/gdb.exp
|
|
+++ b/gdb/testsuite/lib/gdb.exp
|
|
@@ -157,6 +157,7 @@ load_lib cache.exp
|
|
load_lib gdb-utils.exp
|
|
load_lib memory.exp
|
|
load_lib check-test-names.exp
|
|
+load_lib ada.exp
|
|
|
|
# The path to the GCORE script to test.
|
|
global GCORE
|
|
@@ -2715,6 +2716,13 @@ proc allow_ada_tests {} {
|
|
# Currently gdb_ada_compile doesn't support remote host.
|
|
return 0
|
|
}
|
|
+
|
|
+ if { [gdb_can_compile_ada] == 0 } {
|
|
+ global gdb_test_file_name
|
|
+ unsupported "$gdb_test_file_name"
|
|
+ return 0
|
|
+ }
|
|
+
|
|
return 1
|
|
}
|
|
|
|
--
|
|
2.43.0
|
|
|