Sync from SUSE:ALP:Source:Standard:1.0 gdb revision f858c161cc424e8b285237d19fbccb81

This commit is contained in:
Adrian Schröter 2024-03-22 15:07:03 +01:00
parent 16b3d03efa
commit ba4c6612f6
5 changed files with 349 additions and 165 deletions

View File

@ -0,0 +1,45 @@
From 08ce0d63c343f7db9a504d37de25391a997b46e2 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Mon, 8 Jan 2024 13:01:50 +0100
Subject: [PATCH] [gdb/testsuite] Add missing -no-prompt-anchor in
gdb.base/vfork-follow-parent.exp
When running test-case gdb.base/vfork-follow-parent.exp it passes fine, but
when running it with "taskset -c 0" I run into:
...
(gdb) inferior 1^M
[Switching to inferior 1 [process 26606] (vfork-follow-parent-exit)]^M
[Switching to thread 1.1 (process 26606)]^M
(gdb) Reading symbols from vfork-follow-parent-exit...^M
FAIL: $exp: exec_file=vfork-follow-parent-exit: target-non-stop=on: \
non-stop=off: resolution_method=schedule-multiple: inferior 1 (timeout)
...
Fix this by using -no-prompt-anchor.
Tested on x86_64-linux.
PR testsuite/31166
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31166
---
gdb/testsuite/gdb.base/vfork-follow-parent.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.base/vfork-follow-parent.exp b/gdb/testsuite/gdb.base/vfork-follow-parent.exp
index 89c38001dac..ee6f2835d8e 100644
--- a/gdb/testsuite/gdb.base/vfork-follow-parent.exp
+++ b/gdb/testsuite/gdb.base/vfork-follow-parent.exp
@@ -64,7 +64,7 @@ proc do_test { resolution_method } {
gdb_test "set schedule-multiple on"
gdb_test "continue" "$::inferior_exited_re normally.*" \
"continue to end of inferior 2"
- gdb_test "inferior 1" ".*Switching to inferior 1.*"
+ gdb_test -no-prompt-anchor "inferior 1" ".*Switching to inferior 1.*"
gdb_test "print unblock_parent = 1" " = 1"
} else {
error "invalid resolution method: $resolution_method"
base-commit: 19185006cfe0901da907da4f09fbc197aba976a2
--
2.35.3

View File

@ -0,0 +1,53 @@
From d3fbb4d91ba2784df267fe1ac2e9ec42581a6fac Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Mon, 15 Jan 2024 16:23:42 +0000
Subject: [PATCH] gdb/testsuite: remove spurious $ in save_vars
I noticed that running the whole testsuite in serial mode (which means
all the .exp files are ran in the same TCL environment, one after the
other) with the native-extended-gdbserver board caused some weird
failures, for instance a lot of internal errors in the reverse tests,
like:
continue^M
Continuing.^M
/home/jenkins/workspace/binutils-gdb_master_linuxbuild/platform/deb12-amd64/target_board/native-extended-gdbserver/src/binutils-gdb/gdb/remot e.c:6922: internal-error: resume: Assertion `scope_ptid == inferior_ptid' failed.^M
A problem internal to GDB has been detected,^M
further debugging may prove unreliable.^M
----- Backtrace -----^M
FAIL: gdb.reverse/break-precsave.exp: run to end of main (GDB internal error)
This only happens after running gdb.multi/attach-while-running.exp.
That test does not restore GDBFLAGS properly when it's done, it leaves
`-ex \"maint set target-non-stop on\""` in there, which breaks some
subsequent tests. The problem is that this line:
save_vars { $::GDBFLAGS } {
should not use a `$` before the variable name. Passes the content of
`::GDBFLAGS` to save_vars, which is not what we want. We want to pass
the `::GDBFLAGS` string. Fix that.
Change-Id: I5ad32c527795fd10d0d94020e4fd15cebaca3a77
---
gdb/testsuite/gdb.multi/attach-while-running.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.multi/attach-while-running.exp b/gdb/testsuite/gdb.multi/attach-while-running.exp
index d3e0d462413..8fce34eaa65 100644
--- a/gdb/testsuite/gdb.multi/attach-while-running.exp
+++ b/gdb/testsuite/gdb.multi/attach-while-running.exp
@@ -46,7 +46,7 @@ if { [build_executable "failed to prepare" ${testfile} ${srcfile}] } {
}
proc do_test {} {
- save_vars { $::GDBFLAGS } {
+ save_vars { ::GDBFLAGS } {
append ::GDBFLAGS " -ex \"maint set target-non-stop on\""
clean_restart $::binfile
}
base-commit: 08ce0d63c343f7db9a504d37de25391a997b46e2
--
2.35.3

View File

@ -1,3 +1,37 @@
-------------------------------------------------------------------
Wed Mar 20 09:53:08 UTC 2024 - Richard Biener <rguenther@suse.com>
- Avoid using a %gcc macro to support using gcc 4.8 for building
on SLE11. Use the regular language compilers for testing.
-------------------------------------------------------------------
Tue Feb 27 11:24:51 UTC 2024 - Dominique Leuenberger <dimstar@opensuse.org>
- Use %patch -P N instead of deprecated %patchN.
-------------------------------------------------------------------
Wed Jan 10 13:40:34 UTC 2024 - Tom de Vries <tdevries@suse.com>
- Maintenance script qa.sh:
* Add PR31214 kfail.
* Add kfail for fails in gdb.reverse/solib-precsave.exp /
gdb.reverse/solib-reverse.exp fixed by commit fe6356def67
("PowerPC and aarch64: Fix reverse stepping failure").
* Extend PR31004 kfail.
- Don't require %{python}-base for gdb-testresults package.
- Fix debuginfod handling:
* Enable for sle_version >= 150400 (bsc#1185605, jsc#PED-1149,
jsc#PED-1138), SLE15-SP4 and later.
* Enable for suse_version >= 1600, ALP and Tumbleweed.
* Add back "BuildRequires: libdebuginfod1" to prevent selecting
dummy variant.
* Add "BuildRequires: debuginfod-client" to prevent unresolved
due to conflict with dummy variant.
* Add --with-debuginfod=yes to prevent silently dropping support.
- Patches added (backport from master):
* gdb-testsuite-add-missing-no-prompt-anchor-in-gdb.ba.patch
* gdb-testsuite-remove-spurious-in-save_vars.patch
-------------------------------------------------------------------
Wed Dec 13 14:58:14 UTC 2023 - Tom de Vries <tdevries@suse.com>

348
gdb.spec
View File

@ -1,7 +1,7 @@
#
# spec file
#
# Copyright (c) 2023 SUSE LLC
# Copyright (c) 2024 SUSE LLC
# Copyright (c) 2012 RedHat
#
# All modifications and additions to the file contributed by third parties
@ -349,6 +349,8 @@ Patch2071: gdb-symtab-add-producer_is_gas.patch
Patch2072: gdb-symtab-work-around-gas-pr28629.patch
Patch2073: gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
Patch2074: gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
Patch2075: gdb-testsuite-add-missing-no-prompt-anchor-in-gdb.ba.patch
Patch2076: gdb-testsuite-remove-spurious-in-save_vars.patch
# Backport from gdb-patches
@ -395,12 +397,11 @@ Patch2130: gdb-symtab-fix-dw_tag_inlined_subroutine-entries-in-.patch
BuildRequires: bison
BuildRequires: flex
%if 0%{suse_version} > 1110
%define gcc gcc
BuildRequires: gcc-c++
%else
%define gcc gcc48
BuildRequires: gcc48
BuildRequires: gcc48-c++
%endif
BuildRequires: %{gcc}
BuildRequires: %{gcc}-c++
BuildRequires: gettext
BuildRequires: glibc-devel
%if 0%{suse_version} > 1110 && 0%{suse_version} < 1330
@ -428,17 +429,28 @@ BuildRequires: rpm-devel
BuildRequires: xz-devel
%endif
BuildRequires: zlib-devel
%if 0%{!?_without_python:1}
%if %{build_testsuite}
BuildRequires: %{python}-base
%else
Requires: %{python}-base
%endif
BuildRequires: %{python}-devel
%endif # 0%{!?_without_python:1}
%global have_libdebuginfod 0
%if 0%{?suse_version} > 1500
# Enable for SLE15-SP4/Leap-15.4, ALP/Factory.
%if 0%{?sle_version} >= 150400 || 0%{?suse_version} >= 1600
%global have_libdebuginfod 1
%endif
%if 0%{have_libdebuginfod}
BuildRequires: libdebuginfod-devel
# Indicate that we prefer libdebuginfod1 over libdebuginfod1-dummy.
BuildRequires: libdebuginfod1
%endif
%global have_libipt 0
%if 0%{suse_version} > 1110
%ifarch %{ix86} x86_64
@ -514,12 +526,12 @@ BuildRequires: sharutils
# unresolvable: conflict for providers of libquadmath0
# needed by libgfortran3
# (provider libquadmath0-gcc5 is in conflict with libquadmath0)
BuildRequires: %{gcc}-fortran
BuildRequires: gcc-fortran
%endif
BuildRequires: %{gcc}-objc
BuildRequires: gcc-objc
%ifarch %ada_arch
BuildRequires: %{gcc}-ada
BuildRequires: gcc-ada
%endif
%define supported_32bit_arch x86_64 ppc64
@ -530,11 +542,11 @@ BuildRequires: %{gcc}-ada
%if 0%{suse_version} >= 1330
# Older distros miss this pseudo package, the Ada
# testsuite won't work completely
BuildRequires: %{gcc}-ada-32bit
BuildRequires: gcc-ada-32bit
%endif
%if 0%{suse_version} > 1110
BuildRequires: %{gcc}-c++-32bit
BuildRequires: gcc-c++-32bit
%endif
%if 0%{suse_version} >= 1210 && 0%{suse_version} != 1315
@ -586,6 +598,9 @@ BuildRequires: systemtap-sdt-devel
%if 0%{have_libdebuginfod}
BuildRequires: curl
BuildRequires: elfutils-debuginfod
# Fix: unresolvable: have choice for debuginfod-client needed by
# elfutils-debuginfod: debuginfod-client debuginfod-dummy-client.
BuildRequires: debuginfod-client
%endif
# SLE-10 doesn't have xz.
@ -676,168 +691,170 @@ rm -f gdb/jv-exp.c gdb/m2-exp.c gdb/objc-exp.c gdb/p-exp.c gdb/go-exp.c
find -name "*.info*"|xargs rm -f
#Fedora patching start
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch6 -p1
%patch8 -p1
%patch9 -p1
%patch11 -p1
%patch12 -p1
%patch13 -p1
%patch14 -p1
%patch15 -p1
%patch16 -p1
%patch17 -p1
%patch18 -p1
%patch19 -p1
%patch22 -p1
%patch23 -p1
%patch24 -p1
%patch25 -p1
%patch26 -p1
%patch27 -p1
%patch28 -p1
%patch30 -p1
%patch31 -p1
%patch32 -p1
%patch33 -p1
%patch35 -p1
%patch36 -p1
%patch37 -p1
%patch38 -p1
%patch39 -p1
%patch40 -p1
%patch42 -p1
%patch43 -p1
%patch44 -p1
%patch45 -p1
%patch46 -p1
%patch49 -p1
%patch50 -p1
%patch51 -p1
%patch52 -p1
%patch53 -p1
%patch54 -p1
%patch55 -p1
%patch57 -p1
%patch59 -p1
%patch60 -p1
%patch61 -p1
%patch62 -p1
%patch63 -p1
%patch64 -p1
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
%patch -P 2 -p1
%patch -P 3 -p1
%patch -P 4 -p1
%patch -P 6 -p1
%patch -P 8 -p1
%patch -P 9 -p1
%patch -P 11 -p1
%patch -P 12 -p1
%patch -P 13 -p1
%patch -P 14 -p1
%patch -P 15 -p1
%patch -P 16 -p1
%patch -P 17 -p1
%patch -P 18 -p1
%patch -P 19 -p1
%patch -P 22 -p1
%patch -P 23 -p1
%patch -P 24 -p1
%patch -P 25 -p1
%patch -P 26 -p1
%patch -P 27 -p1
%patch -P 28 -p1
%patch -P 30 -p1
%patch -P 31 -p1
%patch -P 32 -p1
%patch -P 33 -p1
%patch -P 35 -p1
%patch -P 36 -p1
%patch -P 37 -p1
%patch -P 38 -p1
%patch -P 39 -p1
%patch -P 40 -p1
%patch -P 42 -p1
%patch -P 43 -p1
%patch -P 44 -p1
%patch -P 45 -p1
%patch -P 46 -p1
%patch -P 49 -p1
%patch -P 50 -p1
%patch -P 51 -p1
%patch -P 52 -p1
%patch -P 53 -p1
%patch -P 54 -p1
%patch -P 55 -p1
%patch -P 57 -p1
%patch -P 59 -p1
%patch -P 60 -p1
%patch -P 61 -p1
%patch -P 62 -p1
%patch -P 63 -p1
%patch -P 64 -p1
%patch -P 65 -p1
%patch -P 66 -p1
%patch -P 67 -p1
%patch -P 68 -p1
#Fedora patching end
%patch1000 -p1
%patch1002 -p1
%patch1003 -p1
%patch1004 -p1
%patch1005 -p1
%patch1006 -p1
%patch1007 -p1
%patch1008 -p1
%patch1009 -p1
%patch1010 -p1
%patch1011 -p1
%patch1012 -p1
%patch -P 1000 -p1
%patch -P 1002 -p1
%patch -P 1003 -p1
%patch -P 1004 -p1
%patch -P 1005 -p1
%patch -P 1006 -p1
%patch -P 1007 -p1
%patch -P 1008 -p1
%patch -P 1009 -p1
%patch -P 1010 -p1
%patch -P 1011 -p1
%patch -P 1012 -p1
%patch1100 -p1
%patch1101 -p1
%patch -P 1100 -p1
%patch -P 1101 -p1
%patch1200 -p1
#%patch1201 -p1
%patch1202 -p1
%patch1203 -p1
%patch1204 -p1
%patch -P 1200 -p1
#%patch -P 1201 -p1
%patch -P 1202 -p1
%patch -P 1203 -p1
%patch -P 1204 -p1
%patch1500 -p1
%patch1501 -p1
%patch1503 -p1
%patch1504 -p1
%patch1505 -p1
%patch -P 1500 -p1
%patch -P 1501 -p1
%patch -P 1503 -p1
%patch -P 1504 -p1
%patch -P 1505 -p1
%patch2000 -p1
%patch2001 -p1
%patch2002 -p1
%patch2003 -p1
%patch2004 -p1
%patch2005 -p1
%patch2006 -p1
%patch2007 -p1
%patch2008 -p1
%patch2009 -p1
%patch2010 -p1
%patch2011 -p1
%patch2012 -p1
%patch2013 -p1
%patch2014 -p1
%patch2015 -p1
%patch2016 -p1
%patch2017 -p1
%patch2018 -p1
%patch2019 -p1
%patch2020 -p1
%patch2021 -p1
%patch2022 -p1
%patch2023 -p1
%patch2024 -p1
%patch2025 -p1
%patch2026 -p1
%patch2027 -p1
%patch2028 -p1
%patch2029 -p1
%patch2030 -p1
%patch2031 -p1
%patch2032 -p1
%patch2033 -p1
%patch2034 -p1
%patch2035 -p1
%patch2036 -p1
%patch2037 -p1
%patch2038 -p1
%patch2039 -p1
%patch2040 -p1
%patch2041 -p1
%patch2042 -p1
%patch2043 -p1
%patch2044 -p1
%patch2045 -p1
%patch2046 -p1
%patch2047 -p1
%patch2048 -p1
%patch2049 -p1
%patch -P 2000 -p1
%patch -P 2001 -p1
%patch -P 2002 -p1
%patch -P 2003 -p1
%patch -P 2004 -p1
%patch -P 2005 -p1
%patch -P 2006 -p1
%patch -P 2007 -p1
%patch -P 2008 -p1
%patch -P 2009 -p1
%patch -P 2010 -p1
%patch -P 2011 -p1
%patch -P 2012 -p1
%patch -P 2013 -p1
%patch -P 2014 -p1
%patch -P 2015 -p1
%patch -P 2016 -p1
%patch -P 2017 -p1
%patch -P 2018 -p1
%patch -P 2019 -p1
%patch -P 2020 -p1
%patch -P 2021 -p1
%patch -P 2022 -p1
%patch -P 2023 -p1
%patch -P 2024 -p1
%patch -P 2025 -p1
%patch -P 2026 -p1
%patch -P 2027 -p1
%patch -P 2028 -p1
%patch -P 2029 -p1
%patch -P 2030 -p1
%patch -P 2031 -p1
%patch -P 2032 -p1
%patch -P 2033 -p1
%patch -P 2034 -p1
%patch -P 2035 -p1
%patch -P 2036 -p1
%patch -P 2037 -p1
%patch -P 2038 -p1
%patch -P 2039 -p1
%patch -P 2040 -p1
%patch -P 2041 -p1
%patch -P 2042 -p1
%patch -P 2043 -p1
%patch -P 2044 -p1
%patch -P 2045 -p1
%patch -P 2046 -p1
%patch -P 2047 -p1
%patch -P 2048 -p1
%patch -P 2049 -p1
%patch2070 -p1
%patch2071 -p1
%patch2072 -p1
%patch2073 -p1
%patch2074 -p1
%patch -P 2070 -p1
%patch -P 2071 -p1
%patch -P 2072 -p1
%patch -P 2073 -p1
%patch -P 2074 -p1
%patch -P 2075 -p1
%patch -P 2076 -p1
%patch2100 -p1
%patch2101 -p1
%patch2104 -p1
%patch2105 -p1
%patch2106 -p1
%patch2107 -p1
%patch2108 -p1
%patch2109 -p1
%patch -P 2100 -p1
%patch -P 2101 -p1
%patch -P 2104 -p1
%patch -P 2105 -p1
%patch -P 2106 -p1
%patch -P 2107 -p1
%patch -P 2108 -p1
%patch -P 2109 -p1
%patch2120 -p1
%patch2121 -p1
%patch2122 -p1
%patch2123 -p1
%patch2124 -p1
%patch2125 -p1
%patch2126 -p1
%patch2127 -p1
%patch2128 -p1
%patch2129 -p1
%patch2130 -p1
%patch -P 2120 -p1
%patch -P 2121 -p1
%patch -P 2122 -p1
%patch -P 2123 -p1
%patch -P 2124 -p1
%patch -P 2125 -p1
%patch -P 2126 -p1
%patch -P 2127 -p1
%patch -P 2128 -p1
%patch -P 2129 -p1
%patch -P 2130 -p1
#unpack libipt
%if 0%{have_libipt}
@ -979,6 +996,9 @@ EXTRA_TARGETS=
%endif
%endif
--with-separate-debug-dir=/usr/lib/debug \
%if 0%{have_libdebuginfod}
--with-debuginfod=yes \
%endif
--disable-sim \
--disable-rpath \
--with-system-zlib \

34
qa.sh
View File

@ -491,7 +491,28 @@ kfail_factory=(
# Sets breakpoints in gdb build with lto. This is known to be slow, and
# likely to cause timeouts.
gdb.gdb/python-helper.exp
# Should be fixed by commit fe6356def67 ("PowerPC and aarch64: Fix reverse
# stepping failure"), available in gdb 15.
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step into solib function one"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step within solib function one"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step back to main one"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step into solib function two"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step within solib function two"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-step back to main two"
"FAIL: gdb.reverse/solib-precsave.exp: run until end part two"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-next over solib function one"
"FAIL: gdb.reverse/solib-precsave.exp: reverse-next over solib function two"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step into solib function one"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step within solib function one"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step back to main one"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step into solib function two"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step within solib function two"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-step back to main two"
"FAIL: gdb.reverse/solib-reverse.exp: run until end part two"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-next over solib function one"
"FAIL: gdb.reverse/solib-reverse.exp: reverse-next over solib function two"
) # kfail_factory
kfail_aarch64=(
@ -504,6 +525,15 @@ kfail_aarch64=(
"FAIL: gdb.base/watchpoint-unaligned.exp: continue \(timeout\)"
"FAIL: gdb.base/watchpoint-unaligned.exp: size8twice write"
# https://sourceware.org/bugzilla/show_bug.cgi?id=31214
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.e: 0->5: continue"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.a: 1->0: print expression before"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.a: 1->0: continue \(the program exited\)"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.e: 5->4: print expression before"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.e: 5->4: continue \(the program is no longer running\)"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: q\.e: 5->4: print expression after"
"FAIL: gdb.base/watch-bitfields.exp: -location watch against bitfields: continue until exit \(the program is no longer running\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28561
# "[gdb/testsuite] Error due to not reading \r\n at end of mi prompt"
# We match pretty aggressively here.
@ -589,6 +619,8 @@ kfail_powerpc64le=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=31004
"FAIL: gdb.base/run-control-while-bg-execution.exp: action1=.*: action2=run: run"
"FAIL: gdb.base/run-control-while-bg-execution.exp: action1=.*: action2=start: start"
)
kfail_powerpc64le_sle12=(