- Patches added (manual import from fedora rawhide @ 52a4dab):

* gdb-rhbz1773651-gdb-index-internal-error.patch
- Patches added (backport from master):
  * gdb-support-rseq-auxvs.patch
  * gdb-symtab-fix-line-number-of-static-const-class-mem.patch
  * gdb-symtab-fix-too-many-symbols-in-gdbpy_lookup_stat.patch
  * gdb-symtab-handle-pu-in-iterate_over_some_symtabs.patch
  * gdb-symtab-work-around-pr-gas-29517.patch
  * gdb-testsuite-add-kfail-for-pr-ada-30908.patch
  * gdb-testsuite-add-xfail-for-gdb-29965-in-gdb.threads.patch
  * gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-with-newer.patch
  * gdb-testsuite-fix-gdb.arch-i386-signal.exp-on-x86_64.patch
  * gdb-testsuite-fix-gdb.cp-m-static.exp-regression-on-.patch
  * gdb-testsuite-fix-gdb.dwarf2-nullptr_t.exp-with-cc-w.patch
  * gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch
  * gdb-symtab-find-main-language-without-symtab-expansi.patch
  * gdb-testsuite-add-wait-for-index-cache-in-gdb.dwarf2.patch
- Patches moved (from "Backport from gdb-patches" to
  "Backports from master, available in next release"):
  * gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
  * gdb-testsuite-add-have_host_locale.patch
- Maintenance script qa.sh:
  * Remove PR28463, PR28108, PR29247 and PR29160 kfails.
  * Remove PR30540, PR30908, PR29965 kfails.
  * Remove gdb.ada/mi_task_arg.exp kfail.
- Limit "Suggests: %{python}-Pygments" to SLE-15 and later.

OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gdb?expand=0&rev=365
This commit is contained in:
Tom de Vries 2023-10-26 08:58:08 +00:00 committed by Git OBS Bridge
parent 66a858c773
commit 7cb3ecbb8b
18 changed files with 1534 additions and 97 deletions

View File

@ -0,0 +1,105 @@
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb@redhat.com>
Date: Mon, 2 Oct 2023 15:05:23 -0700
Subject: gdb-rhbz1773651-gdb-index-internal-error.patch
;; Backport upstream patch which prevents internal error when
;; generating a gdb-index file (RH BZ 1773651).
Throw error when creating an overly large gdb-index file
The header in a .gdb_index section uses 32-bit unsigned offsets to
refer to other areas of the section. Thus, there is a size limit of
2^32-1 which is currently unaccounted for by GDB's code for outputting
these sections.
At the moment, when GDB creates an overly large section, it will exit
abnormally due to an internal error, which is caused by a failed
assert in assert_file_size, which in turn is called from
write_gdbindex_1, both of which are in gdb/dwarf2/index-write.c.
This is what happens when that assert fails:
$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/"
Reading symbols from ./libgraph_tool_inference.so...
No executable file now.
Discard symbol table from `libgraph_tool_inference.so'? (y or n) n
Not confirmed.
../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed.
A problem internal to GDB has been detected,
further debugging may prove unreliable.
----- Backtrace -----
0x55fddb4d78b0 gdb_internal_backtrace_1
../../gdb/bt-utils.c:122
0x55fddb4d78b0 _Z22gdb_internal_backtracev
../../gdb/bt-utils.c:168
0x55fddb98b5d4 internal_vproblem
../../gdb/utils.c:396
0x55fddb98b8de _Z15internal_verrorPKciS0_P13__va_list_tag
../../gdb/utils.c:476
0x55fddbb71654 _Z18internal_error_locPKciS0_z
../../gdbsupport/errors.cc:58
0x55fddb5a0f23 assert_file_size
../../gdb/dwarf2/index-write.c:1069
0x55fddb5a1ee0 assert_file_size
/usr/include/c++/13/bits/stl_iterator.h:1158
0x55fddb5a1ee0 write_gdbindex_1
../../gdb/dwarf2/index-write.c:1119
0x55fddb5a51be write_gdbindex
../../gdb/dwarf2/index-write.c:1273
[...]
---------------------
../../gdb/dwarf2/index-write.c:1069: internal-error: assert_file_size: Assertion `file_size == expected_size' failed.
This problem was encountered while building the python-graph-tool
package on Fedora. The Fedora bugzilla bug can be found here:
https://bugzilla.redhat.com/show_bug.cgi?id=1773651
This commit prevents the internal error from occurring by calling error()
when the file size exceeds 2^32-1.
Using a gdb built with this commit, I now see this behavior instead:
$ gdb -q -nx -iex 'set auto-load no' -iex 'set debuginfod enabled off' -ex file ./libgraph_tool_inference.so -ex "save gdb-index `pwd`/"
Reading symbols from ./libgraph_tool_inference.so...
No executable file now.
Discard symbol table from `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so'? (y or n) n
Not confirmed.
Error while writing index for `/mesquite2/fedora-bugs/1773651/libgraph_tool_inference.so': gdb-index maximum file size of 4294967295 exceeded
(gdb)
I wish I could provide a test case, but due to the sizes of both the
input and output files, I think that testing resources would be
strained or exceeded in many environments.
My testing on Fedora 38 shows no regressions.
Approved-by: Tom Tromey <tom@tromey.com>
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -1082,7 +1082,7 @@ write_gdbindex_1 (FILE *out_file,
{
data_buf contents;
const offset_type size_of_header = 6 * sizeof (offset_type);
- offset_type total_len = size_of_header;
+ size_t total_len = size_of_header;
/* The version number. */
contents.append_offset (8);
@@ -1109,6 +1109,13 @@ write_gdbindex_1 (FILE *out_file,
gdb_assert (contents.size () == size_of_header);
+ /* The maximum size of an index file is limited by the maximum value
+ capable of being represented by 'offset_type'. Throw an error if
+ that length has been exceeded. */
+ size_t max_size = ~(offset_type) 0;
+ if (total_len > max_size)
+ error (_("gdb-index maximum file size of %zu exceeded"), max_size);
+
contents.file_write (out_file);
cu_list.file_write (out_file);
types_cu_list.file_write (out_file);

View File

@ -0,0 +1,45 @@
From 1bbcd2144710c4b1daa9c404df0ebc80c3461747 Mon Sep 17 00:00:00 2001
From: Ilya Leoshkevich <iii@linux.ibm.com>
Date: Thu, 22 Jun 2023 01:03:04 +0200
Subject: [PATCH 11/12] gdb: support rseq auxvs
Linux kernel commit commit 317c8194e6ae ("rseq: Introduce feature size
and alignment ELF auxiliary vector entries") introduced two new auxvs:
AT_RSEQ_FEATURE_SIZE and AT_RSEQ_ALIGN. Support them in GDB. This
fixes auxv.exp on kernels >= v6.3.
---
gdb/auxv.c | 4 ++++
include/elf/common.h | 2 ++
2 files changed, 6 insertions(+)
diff --git a/gdb/auxv.c b/gdb/auxv.c
index 812b2807554..3ce5ccd3342 100644
--- a/gdb/auxv.c
+++ b/gdb/auxv.c
@@ -493,6 +493,10 @@ default_print_auxv_entry (struct gdbarch *gdbarch, struct ui_file *file,
AUXV_FORMAT_STR);
TAG (AT_RANDOM, _("Address of 16 random bytes"), AUXV_FORMAT_HEX);
TAG (AT_HWCAP2, _("Extension of AT_HWCAP"), AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_FEATURE_SIZE, _("rseq supported feature size"),
+ AUXV_FORMAT_HEX);
+ TAG (AT_RSEQ_ALIGN, _("rseq allocation alignment"),
+ AUXV_FORMAT_HEX);
TAG (AT_EXECFN, _("File name of executable"), AUXV_FORMAT_STR);
TAG (AT_SECURE, _("Boolean, was exec setuid-like?"), AUXV_FORMAT_DEC);
TAG (AT_SYSINFO, _("Special system info/entry points"), AUXV_FORMAT_HEX);
diff --git a/include/elf/common.h b/include/elf/common.h
index 16587f6fb06..a37b1f9a264 100644
--- a/include/elf/common.h
+++ b/include/elf/common.h
@@ -1353,6 +1353,8 @@
may differ from AT_PLATFORM. */
#define AT_RANDOM 25 /* Address of 16 random bytes. */
#define AT_HWCAP2 26 /* Extension of AT_HWCAP. */
+#define AT_RSEQ_FEATURE_SIZE 27 /* rseq supported feature size */
+#define AT_RSEQ_ALIGN 28 /* rseq allocation alignment */
#define AT_EXECFN 31 /* Filename of executable. */
/* Pointer to the global system page used for system calls and other
nice things. */
--
2.35.3

View File

@ -0,0 +1,202 @@
From e2f41776aa9ca2f625bbc50e9bb498e2a95dba25 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Sat, 5 Aug 2023 17:57:13 +0200
Subject: [PATCH] [gdb/symtab] Find main language without symtab expansion
When loading an executable using "file a.out", the language is set according
to a.out, which can involve looking up the language of symbol "main", which
will cause the symtab expansion for the containing CU.
Expansion of lto debug info can be slow, so in commit d3214198119 ("[gdb] Use
partial symbol table to find language for main") a feature was added to avoid
the symtab expansion.
This feature stopped working after commit 7f4307436fd ("Fix "start" for D,
Rust, etc").
[ The commit addresses problems related to command start, which requires finding
the main function:
- for language D, "main" was found instead of "D main", and
- for Rust, the correct function was found, but attributed the wrong name
(not fully qualified). ]
Reimplement the feature by adding
cooked_index_functions::lookup_global_symbol_language.
Tested on x86_64-linux.
PR symtab/30661
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30661
---
gdb/dwarf2/read.c | 41 +++++++++++++++++++++++++++++++
gdb/testsuite/gdb.base/main-c.exp | 33 +++++++++++++++++++++++++
gdb/testsuite/gdb.cp/main-cp.exp | 33 +++++++++++++++++++++++++
gdb/testsuite/gdb.cp/main.cc | 22 +++++++++++++++++
4 files changed, 129 insertions(+)
create mode 100644 gdb/testsuite/gdb.base/main-c.exp
create mode 100644 gdb/testsuite/gdb.cp/main-cp.exp
create mode 100644 gdb/testsuite/gdb.cp/main.cc
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 04bc0e1cbbd..8aa7f8c31e5 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18621,6 +18621,47 @@ struct cooked_index_functions : public dwarf2_base_index_functions
if (dwarf2_has_info (objfile, nullptr))
dwarf2_build_psymtabs (objfile);
}
+
+ enum language lookup_global_symbol_language (struct objfile *objfile,
+ const char *name,
+ domain_enum domain,
+ bool *symbol_found_p) override
+ {
+ *symbol_found_p = false;
+
+ if (!(domain == VAR_DOMAIN && streq (name, "main")))
+ return language_unknown;
+
+ dwarf2_per_objfile *per_objfile = get_dwarf2_per_objfile (objfile);
+ struct dwarf2_per_bfd *per_bfd = per_objfile->per_bfd;
+ if (per_bfd->index_table == nullptr)
+ return language_unknown;
+
+ /* Expansion of large CUs can be slow. By returning the language of main
+ here for C and C++, we avoid CU expansion during set_initial_language.
+ But by doing a symbol lookup in the cooked index, we are forced to wait
+ for finalization to complete. See PR symtab/30174 for ideas how to
+ bypass that as well. */
+ cooked_index_vector *table
+ = (gdb::checked_static_cast<cooked_index_vector *>
+ (per_objfile->per_bfd->index_table.get ()));
+ table->wait ();
+
+ for (const cooked_index_entry *entry : table->find (name, false))
+ {
+ if (entry->tag != DW_TAG_subprogram)
+ continue;
+
+ enum language lang = entry->per_cu->lang ();
+ if (!(lang == language_c || lang == language_cplus))
+ continue;
+
+ *symbol_found_p = true;
+ return lang;
+ }
+
+ return language_unknown;
+ }
};
dwarf2_per_cu_data *
diff --git a/gdb/testsuite/gdb.base/main-c.exp b/gdb/testsuite/gdb.base/main-c.exp
new file mode 100644
index 00000000000..bcbd0fca7e4
--- /dev/null
+++ b/gdb/testsuite/gdb.base/main-c.exp
@@ -0,0 +1,33 @@
+# Copyright 2023 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that finding main to set the current language doesn't cause any symtab
+# to be expanded.
+
+standard_testfile main.c
+
+if { [readnow] } {
+ return -1
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+ return -1
+}
+
+if { ![string eq [have_index $binfile] ""] } {
+ return -1
+}
+
+gdb_test_no_output "maint info symtabs"
diff --git a/gdb/testsuite/gdb.cp/main-cp.exp b/gdb/testsuite/gdb.cp/main-cp.exp
new file mode 100644
index 00000000000..86d626bdbaf
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/main-cp.exp
@@ -0,0 +1,33 @@
+# Copyright 2023 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check that finding main to set the current language doesn't cause any symtab
+# to be expanded.
+
+standard_testfile main.cc
+
+if { [readnow] } {
+ return -1
+}
+
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile] } {
+ return -1
+}
+
+if { ![string eq [have_index $binfile] ""] } {
+ return -1
+}
+
+gdb_test_no_output "maint info symtabs"
diff --git a/gdb/testsuite/gdb.cp/main.cc b/gdb/testsuite/gdb.cp/main.cc
new file mode 100644
index 00000000000..c6beff77dbe
--- /dev/null
+++ b/gdb/testsuite/gdb.cp/main.cc
@@ -0,0 +1,22 @@
+/* This testcase is part of GDB, the GNU debugger.
+
+ Copyright 2023 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+int
+main (void)
+{
+ return 0;
+}
base-commit: ebceffa1196651683a7a6d31abb4b3b5adc6c168
--
2.35.3

View File

@ -0,0 +1,84 @@
From e5972def532f3ed248dfbd2f220f28dc367f4ca1 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Fri, 24 Mar 2023 15:45:56 +0100
Subject: [PATCH 07/12] [gdb/symtab] Fix line number of static const class
member
Since commit 6d263fe46e0 ("Avoid bad breakpoints with --gc-sections"), there
was a silent regression on openSUSE Leap 15.4 for test-case
gdb.cp/m-static.exp, from:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /home/vries/tmp.local-remote-host-native/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
(gdb)
...
to:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M
8: const int gnu_obj_4::everywhere;^M
(gdb)
...
Another regression was found due to that commit, and it was fixed in commit
99d679e7b30 ("[gdb/symtab] Fix "file index out of range" complaint") by
limiting the scope of the fix in the original commit.
Fix this regression by yet further limiting the scope of that fix, making sure
that this bit in dwarf_decode_lines is executed again for m-static1.cc:
...
/* Make sure a symtab is created for every file, even files
which contain only variables (i.e. no code with associated
line numbers). */
...
Tested on x86_64-linux.
PR symtab/30265
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30265
---
gdb/dwarf2/read.c | 3 +--
gdb/testsuite/gdb.cp/m-static.exp | 4 +++-
2 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index f39eba7a008..04bc0e1cbbd 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -9633,8 +9633,7 @@ handle_DW_AT_stmt_list (struct die_info *die, struct dwarf2_cu *cu,
then there won't be any interesting code in the CU, but a check later on
(in lnp_state_machine::check_line_address) will fail to properly exclude
an entry that was removed via --gc-sections. */
- if (have_code)
- dwarf_decode_lines (cu->line_header, cu, lowpc, decode_mapping);
+ dwarf_decode_lines (cu->line_header, cu, lowpc, decode_mapping && have_code);
}
/* Process DW_TAG_compile_unit or DW_TAG_partial_unit. */
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index a67b4cd3736..049e88299da 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -183,8 +183,10 @@ gdb_test "print test4.somewhere" "\\$\[0-9\].* = 3.14\[0-9\]*" "static const flo
if { $non_dwarf } { setup_xfail *-*-* }
gdb_test "info variable everywhere" \
[multi_line \
+ {All variables matching regular expression "everywhere":} \
+ "" \
"File (.*/)?m-static\[.\]h:" \
- "$decimal:\tconst int gnu_obj_4::everywhere;.*"]
+ "$decimal:\tconst int gnu_obj_4::everywhere;"]
# Perhaps at some point test4 should also include a test for a static
# const int that was initialized in the header file. But I'm not sure
--
2.35.3

View File

@ -0,0 +1,66 @@
From 1362bc937bd54dbd22dd7b3c7ae9d8ab6ca7bbfc Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 6 Sep 2023 11:00:01 +0200
Subject: [PATCH 10/12] [gdb/symtab] Fix too many symbols in
gdbpy_lookup_static_symbols
When running test-case gdb.python/py-symbol.exp with target board
cc-with-dwz-m, we run into:
...
(gdb) python print (len (gdb.lookup_static_symbols ('rr')))^M
4^M
(gdb) FAIL: gdb.python/py-symbol.exp: \
print (len (gdb.lookup_static_symbols ('rr')))
...
while with target board unix we have instead:
...
(gdb) python print (len (gdb.lookup_static_symbols ('rr')))^M
2^M
(gdb) PASS: gdb.python/py-symbol.exp: \
print (len (gdb.lookup_static_symbols ('rr')))
...
The problem is that the loop in gdbpy_lookup_static_symbols loops over compunits
representing both CUs and PUs:
...
for (compunit_symtab *cust : objfile->compunits ())
...
When doing a lookup on a PU, the user link is followed until we end up at a CU,
and the lookup is done in that CU.
In other words, when doing a lookup in the loop for a PU we duplicate the
lookup for a CU that is already handled by the loop.
Fix this by skipping PUs in the loop in gdb.lookup_static_symbols.
Tested on x86_64-linux.
PR symtab/25261
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=25261
---
gdb/python/py-symbol.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gdb/python/py-symbol.c b/gdb/python/py-symbol.c
index b8777966c47..ed4250bc2c7 100644
--- a/gdb/python/py-symbol.c
+++ b/gdb/python/py-symbol.c
@@ -582,9 +582,12 @@ gdbpy_lookup_static_symbols (PyObject *self, PyObject *args, PyObject *kw)
{
for (compunit_symtab *cust : objfile->compunits ())
{
- const struct blockvector *bv;
+ /* Skip included compunits to prevent including compunits from
+ being searched twice. */
+ if (cust->user != nullptr)
+ continue;
- bv = cust->blockvector ();
+ const struct blockvector *bv = cust->blockvector ();
const struct block *block = bv->static_block ();
if (block != nullptr)
--
2.35.3

View File

@ -0,0 +1,59 @@
From c67e982325c5b2249b0e29d07a9dc1985614e898 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 6 Sep 2023 10:14:50 +0200
Subject: [PATCH 08/12] [gdb/symtab] Handle PU in iterate_over_some_symtabs
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When running test-case gdb.base/setshow.exp with target board cc-with-dwz I
run into:
...
(gdb) info line 1^M
Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code.^M
Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code.^M
(gdb) FAIL: gdb.base/setshow.exp: test_setshow_annotate: annotation_level 1
...
while the expected output is:
...
Line 1 of "setshow.c" is at address 0x400527 <main> but contains no code.
<EFBFBD><EFBFBD>setshow.c:1:0:beg:0x400527
...
The second line of the expected output is missing due to the first line of the
expected output being repeated, so the problem is that the "Line 1" line is
printed twice.
This happens because the PU imported by the CU reuses the filetab of the CU,
and both the CU and PU are visited by iterate_over_some_symtabs.
Fix this by skipping PUs in iterate_over_some_symtabs.
Tested on x86_64-linux, target boards unix, cc-with-dwz and cc-with-dwz-m.
Approved-By: Tom Tromey <tom@tromey.com>
PR symtab/30797
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30797
---
gdb/symtab.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/gdb/symtab.c b/gdb/symtab.c
index a662d7d1869..fe7cc679b6b 100644
--- a/gdb/symtab.c
+++ b/gdb/symtab.c
@@ -550,6 +550,10 @@ iterate_over_some_symtabs (const char *name,
for (cust = first; cust != NULL && cust != after_last; cust = cust->next)
{
+ /* Skip included compunits. */
+ if (cust->user != nullptr)
+ continue;
+
for (symtab *s : cust->filetabs ())
{
if (compare_filenames_for_search (s->filename, name))
--
2.35.3

View File

@ -0,0 +1,255 @@
From 92a5f5ae1b71d152d943ee896bf6cd073d50daa7 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Thu, 28 Sep 2023 13:55:07 +0200
Subject: [PATCH 02/12] [gdb/symtab] Work around PR gas/29517
When using glibc debuginfo generated with gas 2.39, we run into PR gas/29517:
...
$ gdb -q -batch a.out -ex start -ex "p (char *)strstr (\"haha\", \"ah\")"
Temporary breakpoint 1 at 0x40051b: file hello.c, line 6.
Temporary breakpoint 1, main () at hello.c:6
6 printf ("hello\n");
Invalid cast.
...
while without glibc debuginfo installed we get the expected result:
...
$n = 0x7ffff7daa1b1 "aha"
...
and likewise with glibc debuginfo generated with gas 2.40.
The strstr ifunc resolves to __strstr_sse2_unaligned. The problem is that gas
generates dwarf that states that the return type is void:
...
<1><3e1e58>: Abbrev Number: 2 (DW_TAG_subprogram)
<3e1e59> DW_AT_name : __strstr_sse2_unaligned
<3e1e5d> DW_AT_external : 1
<3e1e5e> DW_AT_low_pc : 0xbbd2e
<3e1e66> DW_AT_high_pc : 0xbc1c3
...
while the return type should be a DW_TAG_unspecified_type, as is the case
with gas 2.40.
We can still use the workaround of casting to another function type for both
__strstr_sse2_unaligned:
...
(gdb) p ((char * (*) (const char *, const char *))__strstr_sse2_unaligned) \
("haha", "ah")
$n = 0x7ffff7daa211 "aha"
...
and strstr (which requires using *strstr to dereference the ifunc before we
cast):
...
gdb) p ((char * (*) (const char *, const char *))*strstr) ("haha", "ah")
$n = 0x7ffff7daa251 "aha"
...
but that's a bit cumbersome to use.
Work around this in the dwarf reader, such that we have instead:
...
(gdb) p (char *)strstr ("haha", "ah")
$n = 0x7ffff7daa1b1 "aha"
...
This also requires fixing producer_is_gcc to stop returning true for
producer "GNU AS 2.39.0".
Tested on x86_64-linux.
PR symtab/30911
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30911
---
gdb/dwarf2/cu.c | 1 +
gdb/dwarf2/cu.h | 1 +
gdb/dwarf2/read.c | 22 ++++++++++++
gdb/producer.c | 8 ++++-
.../gdb.dwarf2/dw2-unspecified-type.c | 9 ++++-
.../gdb.dwarf2/dw2-unspecified-type.exp | 36 +++++++++++++++----
6 files changed, 68 insertions(+), 9 deletions(-)
diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
index 9c1691c90e9..42fd4f4441b 100644
--- a/gdb/dwarf2/cu.c
+++ b/gdb/dwarf2/cu.c
@@ -40,6 +40,7 @@ dwarf2_cu::dwarf2_cu (dwarf2_per_cu_data *per_cu,
producer_is_icc_lt_14 (false),
producer_is_codewarrior (false),
producer_is_clang (false),
+ producer_is_gas_2_39 (false),
processing_has_namespace_info (false),
load_all_dies (false)
{
diff --git a/gdb/dwarf2/cu.h b/gdb/dwarf2/cu.h
index e8dbde9c019..710aeb5b237 100644
--- a/gdb/dwarf2/cu.h
+++ b/gdb/dwarf2/cu.h
@@ -265,6 +265,7 @@ struct dwarf2_cu
bool producer_is_icc_lt_14 : 1;
bool producer_is_codewarrior : 1;
bool producer_is_clang : 1;
+ bool producer_is_gas_2_39 : 1;
/* When true, the file that we're processing is known to have
debugging info for C++ namespaces. GCC 3.3.x did not produce
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index b9e7e18f2a6..f39eba7a008 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -13370,6 +13370,8 @@ check_producer (struct dwarf2_cu *cu)
cu->producer_is_codewarrior = true;
else if (producer_is_clang (cu->producer, &major, &minor))
cu->producer_is_clang = true;
+ else if (startswith (cu->producer, "GNU AS 2.39.0"))
+ cu->producer_is_gas_2_39 = true;
else
{
/* For other non-GCC compilers, expect their behavior is DWARF version
@@ -13405,6 +13407,15 @@ producer_is_codewarrior (struct dwarf2_cu *cu)
return cu->producer_is_codewarrior;
}
+static bool
+producer_is_gas_2_39 (struct dwarf2_cu *cu)
+{
+ if (!cu->checked_producer)
+ check_producer (cu);
+
+ return cu->producer_is_gas_2_39;
+}
+
/* Return the accessibility of DIE, as given by DW_AT_accessibility.
If that attribute is not available, return the appropriate
default. */
@@ -16581,6 +16592,17 @@ read_subroutine_type (struct die_info *die, struct dwarf2_cu *cu)
type = die_type (die, cu);
+ if (type->code () == TYPE_CODE_VOID
+ && !type->is_stub ()
+ && die->child == nullptr
+ && producer_is_gas_2_39 (cu))
+ {
+ /* Work around PR gas/29517, pretend we have an DW_TAG_unspecified_type
+ return type. */
+ type = init_type (cu->per_objfile->objfile, TYPE_CODE_VOID, 0, NULL);
+ type->set_is_stub (true);
+ }
+
/* The die_type call above may have already set the type for this DIE. */
ftype = get_die_type (die, cu);
if (ftype)
diff --git a/gdb/producer.c b/gdb/producer.c
index 655eb971283..9fcf749e3d4 100644
--- a/gdb/producer.c
+++ b/gdb/producer.c
@@ -54,13 +54,19 @@ producer_is_gcc (const char *producer, int *major, int *minor)
if (minor == NULL)
minor = &min;
+ /* Skip GNU. */
+ cs = &producer[strlen ("GNU ")];
+
+ /* Bail out for GNU AS. */
+ if (startswith (cs, "AS "))
+ return 0;
+
/* Skip any identifier after "GNU " - such as "C11" "C++" or "Java".
A full producer string might look like:
"GNU C 4.7.2"
"GNU Fortran 4.8.2 20140120 (Red Hat 4.8.2-16) -mtune=generic ..."
"GNU C++14 5.0.0 20150123 (experimental)"
*/
- cs = &producer[strlen ("GNU ")];
while (*cs && !isspace (*cs))
cs++;
if (*cs && isspace (*cs))
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c
index 1df09214d4a..e07d9517ff2 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.c
@@ -17,9 +17,16 @@
extern int foo (void);
+int
+bar (void)
+{
+ asm ("bar_label: .globl bar_label");
+ return 0;
+}
+
int
main (void)
{
- int res = foo ();
+ int res = foo () + bar ();
return res;
}
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
index a353395592e..bd707204fba 100644
--- a/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
+++ b/gdb/testsuite/gdb.dwarf2/dw2-unspecified-type.exp
@@ -29,10 +29,18 @@ lassign $foo_res \
foo_start foo_len
set foo_end "$foo_start + $foo_len"
+set bar_res \
+ [function_range bar \
+ [list ${srcdir}/${subdir}/$srcfile ${srcdir}/${subdir}/$srcfile2]]
+lassign $bar_res \
+ bar_start bar_len
+set bar_end "$bar_start + $bar_len"
+
# Create the DWARF.
set asm_file [standard_output_file $srcfile3]
Dwarf::assemble $asm_file {
global foo_start foo_end
+ global bar_start bar_end
declare_labels unspecified_type_label
cu {} {
@@ -47,7 +55,19 @@ Dwarf::assemble $asm_file {
{high_pc $foo_end addr}
{type :$unspecified_type_label}
}
+ }
+ }
+ cu {} {
+ compile_unit {
+ {language @DW_LANG_Mips_Assembler}
+ {producer "GNU AS 2.39.0"}
+ } {
+ DW_TAG_subprogram {
+ {name bar}
+ {low_pc $bar_start addr}
+ {high_pc $bar_end addr}
+ }
}
}
}
@@ -61,12 +81,14 @@ if ![runto_main] {
return -1
}
-# Print the function type. Return type should be stub type, which is printed
-# as void.
-gdb_test "ptype foo" "type = void \\(void\\)"
+foreach f {foo bar} {
+ # Print the function type. Return type should be stub type, which is printed
+ # as void.
+ gdb_test "ptype $f" "type = void \\(void\\)"
-# Call the function, casting the function to the correct function type.
-gdb_test "p ((int (*) ()) foo) ()" " = 0"
+ # Call the function, casting the function to the correct function type.
+ gdb_test "p ((int (*) ()) $f) ()" " = 0"
-# Call the function, casting the function result to the correct type.
-gdb_test "p (int) foo ()" " = 0"
+ # Call the function, casting the function result to the correct type.
+ gdb_test "p (int) $f ()" " = 0"
+}
--
2.35.3

View File

@ -0,0 +1,108 @@
From 0b29bc75761b11387f89912ce827311b8eac18a6 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Sun, 1 Oct 2023 15:10:32 +0200
Subject: [PATCH 04/12] [gdb/testsuite] Add KFAIL for PR ada/30908
With gcc 13.2.1, I run into a cluster of fails:
...
FAIL: gdb.ada/str_binop_equal.exp: print my_str = "ABCD"
FAIL: gdb.ada/widewide.exp: print my_wws = " helo"
FAIL: gdb.ada/widewide.exp: print my_ws = "wide"
...
The problem is that the debug info contains information about function
ada.strings.maps."=", and gdb uses it to implement the comparison.
The function is supposed to compare two char sets, not strings, so gdb
shouldn't use it. This is PR ada/30908.
I don't see the same problem with gcc 7.5.0, because the exec doesn't contain
the debug info for the function, because the corresponding object is not
linked in. Adter adding "with Ada.Strings.Maps; use Ada.Strings.Maps;" to
gdb.ada/widewide/foo.adb I run into the same problem with gcc 7.5.0.
Add KFAILs for the PR.
Tested on x86_64-linux:
- openSUSE Leap 15.4 (using gcc 7.5.0), and
- openSUSE Tumbleweed (using gcc 13.2.1).
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30908
---
gdb/testsuite/gdb.ada/str_binop_equal.exp | 20 ++++++++++++++--
gdb/testsuite/gdb.ada/widewide.exp | 28 +++++++++++++++++++++--
2 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.ada/str_binop_equal.exp b/gdb/testsuite/gdb.ada/str_binop_equal.exp
index 5eb531c1453..2c1b8414c5c 100644
--- a/gdb/testsuite/gdb.ada/str_binop_equal.exp
+++ b/gdb/testsuite/gdb.ada/str_binop_equal.exp
@@ -31,8 +31,24 @@ runto "foo_p211_061.adb:$bp_location"
gdb_test "print my_str = my_str" \
" = true"
-gdb_test "print my_str = \"ABCD\"" \
- " = true"
+set kfail_re \
+ [multi_line \
+ [string_to_regexp {Symbol: ada.strings.maps."="}] \
+ ".*" \
+ "\\$$decimal = false"]
+
+gdb_test_no_output "set debug expr 1"
+
+gdb_test_multiple {print my_str = "ABCD"} "" {
+ -re -wrap " = true" {
+ pass $gdb_test_name
+ }
+ -re -wrap $kfail_re {
+ kfail ada/30908 $gdb_test_name
+ }
+}
+
+gdb_test "set debug expr 0"
gdb_test "print my_str = \"EFGH\"" \
" = false"
diff --git a/gdb/testsuite/gdb.ada/widewide.exp b/gdb/testsuite/gdb.ada/widewide.exp
index 5de5d52b8cb..b91b6bc746b 100644
--- a/gdb/testsuite/gdb.ada/widewide.exp
+++ b/gdb/testsuite/gdb.ada/widewide.exp
@@ -42,9 +42,33 @@ gdb_test "print my_wws(1)" "= 32 ' '"
gdb_test "print my_wws(2)" "= 104 'h'"
-gdb_test "print my_wws = \" helo\"" " = true"
+set kfail_re \
+ [multi_line \
+ [string_to_regexp {Symbol: ada.strings.maps."="}] \
+ ".*" \
+ "\\$$decimal = false"]
+
+gdb_test_no_output "set debug expr 1"
+
+gdb_test_multiple {print my_wws = " helo"} "" {
+ -re -wrap " = true" {
+ pass $gdb_test_name
+ }
+ -re -wrap $kfail_re {
+ kfail ada/30908 $gdb_test_name
+ }
+}
+gdb_test_multiple {print my_ws = "wide"} "" {
+ -re -wrap " = true" {
+ pass $gdb_test_name
+ }
+ -re -wrap $kfail_re {
+ kfail ada/30908 $gdb_test_name
+ }
+}
+
+gdb_test "set debug expr 0"
-gdb_test "print my_ws = \"wide\"" " = true"
gdb_test "print my_ws = \"nope\"" " = false"
gdb_test "print \"x\" & my_ws & \"y\"" " = \"xwidey\""
--
2.35.3

View File

@ -0,0 +1,53 @@
From 2521ac7ed0c495b9e804c4356939b9be7166853c Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Thu, 26 Oct 2023 10:34:24 +0200
Subject: [PATCH] [gdb/testsuite] Add wait-for-index-cache in
gdb.dwarf2/per-bfd-sharing.exp
If we make writing an index-cache entry very slow by doing this in
index_cache::store:
...
try
{
+ sleep (15);
index_cache_debug ("writing index cache for objfile %s",
bfd_get_filename (per_bfd->obfd));
...
we run into:
...
FAIL: gdb.dwarf2/per-bfd-sharing.exp: \
couldn't remove files in temporary cache dir
...
The FAIL happens because there is no index-cache entry in the cache dir.
The problem is that gdb is killed (by gdb_exit) before the index-cache entry
is written.
Fix this by using "maint wait-for-index-cache".
Tested on x86_64-linux.
PR testsuite/30528
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30528
---
gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp | 1 +
1 file changed, 1 insertion(+)
diff --git a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
index 46284c2b775..7bdf59fbcd1 100644
--- a/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
+++ b/gdb/testsuite/gdb.dwarf2/per-bfd-sharing.exp
@@ -47,6 +47,7 @@ with_test_prefix "populate index cache" {
"set index-cache directory"
gdb_test_no_output "set index-cache enabled on"
gdb_test "file $binfile" "Reading symbols from .*" "file"
+ gdb_test_no_output "maint wait-for-index-cache"
}
proc load_binary { method } {
base-commit: b7f9471d211d35eba33b86e073268b4a89b78a92
--
2.35.3

View File

@ -0,0 +1,65 @@
From ebceffa1196651683a7a6d31abb4b3b5adc6c168 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi@efficios.com>
Date: Thu, 7 Sep 2023 21:53:55 -0400
Subject: [PATCH 12/12] gdb/testsuite: add xfail for gdb/29965 in
gdb.threads/process-exit-status-is-leader-exit-status.exp
Bug 29965 shows on a Linux kernel >= 6.1, that test fails consistently
with:
FAIL: gdb.threads/process-exit-status-is-leader-exit-status.exp: iteration=0: continue (the program exited)
...
FAIL: gdb.threads/process-exit-status-is-leader-exit-status.exp: iteration=9: continue (the program exited)
This is due to a change in Linux kernel behavior [1] that affects
exactly what this test tests. That is, if multiple threads (including
the leader) call SYS_exit, the exit status of the process should be the
exit status of the leader. After that change in the kernel, it is no
longer the case.
Add an xfail in the test, based on the Linux kernel version. The goal
is that if a regression is introduced in GDB regarding this feature, it
should be caught if running on an older kernel where the behavior was
consistent.
[1] https://bugzilla.suse.com/show_bug.cgi?id=1206926
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29965
Change-Id: If6ab7171c92bfc1a3b961c7179e26611773969eb
Approved-By: Tom de Vries <tdevries@suse.de>
---
...cess-exit-status-is-leader-exit-status.exp | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
index f64d6a73dea..e470fe29110 100644
--- a/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
+++ b/gdb/testsuite/gdb.threads/process-exit-status-is-leader-exit-status.exp
@@ -41,6 +41,23 @@ for {set iteration 0} {$iteration < 10} {incr iteration} {
return
}
- gdb_test "continue" "\\\[Inferior 1 \\(.*\\) exited with code 01\\\]"
+ gdb_test_multiple "continue" "" {
+ -re -wrap "\\\[Inferior 1 \\(.*\\) exited with code 01\\\]" {
+ pass $gdb_test_name
+ }
+
+ -re -wrap "\\\[Inferior 1 \\(.*\\) exited with code $::decimal\\\]" {
+ set lkv [linux_kernel_version]
+
+ if { [llength $lkv] != 0 } {
+ if { [version_compare {6 1 0} <= $lkv] } {
+ xfail "$gdb_test_name (PR 29965)"
+ return
+ }
+ }
+
+ fail $gdb_test_name
+ }
+ }
}
}
--
2.35.3

View File

@ -0,0 +1,64 @@
From ad1be044276c4727434f84ac6c554da4f2829aaf Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Tue, 26 Sep 2023 18:57:49 +0200
Subject: [PATCH 05/12] [gdb/testsuite] Fix gdb.ada/mi_task_arg.exp with newer
gcc
When running test-case gdb.ada/mi_task_arg.exp on openSUSE Tumbleweed using
gcc 13.2.1, I run into (layout adapted for readability):
...
-stack-list-arguments 1^M
^done,stack-args=[
frame={level="0",args=[]},
frame={level="1",args=[{name="<_task>",value="0x464820"},
{name="<_taskL>",value="129"}]},
frame={level="2",args=[{name="self_id",value="0x464840"}]},
frame={level="3",args=[]},
frame={level="4",args=[]}
]^M
(gdb) ^M
FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 (unexpected output)
...
On openSUSE Leap 15.4 with gcc 7.5.0 I get instead:
...
-stack-list-arguments 1^M
^done,stack-args=[
frame={level="0",args=[]},
frame={level="1",args=[{name="<_task>",value="0x444830"}]},
frame={level="2",args=[{name="self_id",value="0x444850"}]},
frame={level="3",args=[]},
frame={level="4",args=[]}]^M
(gdb) ^M
PASS: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1
...
The difference in gdb output is due to difference in the dwarf generated by
the compiler, so I don't see a problem with gdb here.
Fix this by updating the test-case to accept this output.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom@tromey.com>
---
gdb/testsuite/gdb.ada/mi_task_arg.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.ada/mi_task_arg.exp b/gdb/testsuite/gdb.ada/mi_task_arg.exp
index ffee40ad044..2820f2d3722 100644
--- a/gdb/testsuite/gdb.ada/mi_task_arg.exp
+++ b/gdb/testsuite/gdb.ada/mi_task_arg.exp
@@ -49,7 +49,8 @@ if {![mi_runto "task_switch.break_me"]} {
set frame0 "frame=\{level=\"0\",args=\\\[\\\]\}"
# Frame for task_switch.caller
set frame1_args "\{name=\"<_task>\",value=\"$hex\"\}"
-set frame1 "frame=\{level=\"1\",args=\\\[$frame1_args\\\]\}"
+set frame1_opt_args "\{name=\"<_taskL>\",value=\"$decimal\"\}"
+set frame1 "frame=\{level=\"1\",args=\\\[${frame1_args}(,$frame1_opt_args)?\\\]\}"
# Frame for system.tasking.stages.task_wrapper
set frame2_args "(\{name=\"self_id\",value=\"($hex|<optimized out>)\"\})?"
set frame2 "frame=\{level=\"2\",args=\\\[$frame2_args\\\]\}"
--
2.35.3

View File

@ -0,0 +1,91 @@
From ef58dedc82b17919360bf51f7efcbf6d74c11329 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Sun, 1 Oct 2023 13:00:23 +0200
Subject: [PATCH 01/12] [gdb/testsuite] Fix gdb.arch/i386-signal.exp on x86_64
On x86_64-linux, with test-case gdb.arch/i386-signal.exp I run into:
...
builtin_spawn -ignore SIGHUP gcc -fno-stack-protector i386-signal.c \
-fdiagnostics-color=never -fno-pie -g -no-pie -lm -o i386-signal^M
/tmp/cc2xydTG.s: Assembler messages:^M
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'^M
compiler exited with status 1
output is:
/tmp/cc2xydTG.s: Assembler messages:^M
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'^M
gdb compile failed, /tmp/cc2xydTG.s: Assembler messages:
/tmp/cc2xydTG.s:50: Error: operand size mismatch for `push'
UNTESTED: gdb.arch/i386-signal.exp: failed to compile
...
This is with gas 2.41, it compiles without problems with gas 2.40. Some more
strict checking was added in commit 5cc007751cd ("x86: further adjust
extend-to-32bit-address conditions").
The offending bit is:
...
" push $sigframe\n"
...
which refers to a function:
...
" .globl sigframe\n"
"sigframe:\n"
...
The test-case passes with target board unix/-m32.
Make the test-case work by using pushq instead of push for the
is_amd64_regs_target case.
Tested on x86_64-linux, with target boards:
- unix/-m64 (is_amd64_regs_target == 1), and
- unix/-m32 (is_amd64_regs_target == 0),
PR testsuite/30928
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30928
---
gdb/testsuite/gdb.arch/i386-signal.c | 4 ++++
gdb/testsuite/gdb.arch/i386-signal.exp | 7 ++++++-
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.arch/i386-signal.c b/gdb/testsuite/gdb.arch/i386-signal.c
index 19bb1bbaaf8..4bf97e5f159 100644
--- a/gdb/testsuite/gdb.arch/i386-signal.c
+++ b/gdb/testsuite/gdb.arch/i386-signal.c
@@ -45,7 +45,11 @@ asm(".text\n"
" .align 8\n"
" .globl setup\n"
"setup:\n"
+#if IS_AMD64_REGS_TARGET
+ " pushq $sigframe\n"
+#else
" push $sigframe\n"
+#endif
" jmp func\n"
"\n"
" .cfi_startproc\n"
diff --git a/gdb/testsuite/gdb.arch/i386-signal.exp b/gdb/testsuite/gdb.arch/i386-signal.exp
index 9806970b245..0a413f73a5b 100644
--- a/gdb/testsuite/gdb.arch/i386-signal.exp
+++ b/gdb/testsuite/gdb.arch/i386-signal.exp
@@ -22,8 +22,13 @@ if {![istarget "i?86-*-*"] && ![istarget "x86_64-*-*"]} {
standard_testfile
+set opts {}
+lappend opts debug
+lappend opts nopie
+lappend opts additional_flags=-DIS_AMD64_REGS_TARGET=[is_amd64_regs_target]
+
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" \
- executable { debug nopie }] != "" } {
+ executable $opts] != "" } {
untested "failed to compile"
return -1
}
base-commit: b671ae32ae890a373abcfe4b19a3b662fd5e86f2
--
2.35.3

View File

@ -0,0 +1,76 @@
From 424c96685651cc949597d700811a5fbb15256d1d Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Fri, 24 Mar 2023 09:18:07 +0100
Subject: [PATCH 06/12] [gdb/testsuite] Fix gdb.cp/m-static.exp regression on
Ubuntu 20.04
In commit 722c4596034 ("[gdb/testsuite] Fix gdb.cp/*.exp for remote host"), I
needed to change ".*/" into "(.*/)?" in:
...
gdb_test "info variable everywhere" \
"File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
...
However, due to the fact that I got this output:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static1.cc:^M
8: const int gnu_obj_4::everywhere;^M
...
I decided to make the matching somewhat stricter, to make sure that the two
matched lines were subsequent.
The commit turned out to be more strict than intended, and caused a regression
on Ubuntu 20.04, where the output was instead:
...
(gdb) info variable everywhere^M
All variables matching regular expression "everywhere":^M
^M
File /data/vries/gdb/src/gdb/testsuite/gdb.cp/m-static.h:^M
8: const int gnu_obj_4::everywhere;^M
...
At that point I realized I'm looking at a bug (filed as PR symtab/30265),
which manifests on openSUSE Leap 15.4 for native and readnow, and on Ubuntu
20.04 for readnow, but not for native.
Before my commit, the test-case passed whether the bug manifested or not.
After my commit, the test-case only passed when the bug manifested.
Fix the test-case regression by reverting to the situation before the commit:
pass whether the bug manifests or not. We could add an xfail for the PR, but
I'm expecting a fix soon, so that doesn't look worth the effort.
Tested on x86_64-linux, both on openSUSE Leap 15.4 and Ubuntu 20.04, both with
native and readnow.
Reported-By: Simon Marchi <simon.marchi@efficios.com>
---
gdb/testsuite/gdb.cp/m-static.exp | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.cp/m-static.exp b/gdb/testsuite/gdb.cp/m-static.exp
index 97a5645b53a..a67b4cd3736 100644
--- a/gdb/testsuite/gdb.cp/m-static.exp
+++ b/gdb/testsuite/gdb.cp/m-static.exp
@@ -181,7 +181,10 @@ gdb_test "print test4.somewhere" "\\$\[0-9\].* = 3.14\[0-9\]*" "static const flo
# Also make sure static const members can be found via "info var".
if { $non_dwarf } { setup_xfail *-*-* }
-gdb_test "info variable everywhere" "File .*/m-static\[.\]h.*const int gnu_obj_4::everywhere;"
+gdb_test "info variable everywhere" \
+ [multi_line \
+ "File (.*/)?m-static\[.\]h:" \
+ "$decimal:\tconst int gnu_obj_4::everywhere;.*"]
# Perhaps at some point test4 should also include a test for a static
# const int that was initialized in the header file. But I'm not sure
--
2.35.3

View File

@ -0,0 +1,38 @@
From 335a151d834199610b515e67f1924d6e0a211db2 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 30 Aug 2023 23:33:31 +0200
Subject: [PATCH 09/12] [gdb/testsuite] Fix gdb.dwarf2/nullptr_t.exp with
cc-with-dwz-m
When running test-case gdb.dwarf2/nullptr_t.exp with target board
cc-with-dwz-m, I run into:
...
FAIL: gdb.dwarf2/nullptr_t.exp: decltype(nullptr) symbol
...
The problem is that were looking for "typedef void decltype\\(nullptr\\)"
using "maint print symbols -source $srcfile", but dwz has moved the typedef to
a PU, so it's shown by "maint print symbols -source <unknown>" instead.
Fix this by dropping the "-source $srcfile" bit.
Tested on x86_64-linux, with make-check-all.sh.
---
gdb/testsuite/gdb.dwarf2/nullptr_t.exp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
index a02ebbf109e..e78d90fdb25 100644
--- a/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
+++ b/gdb/testsuite/gdb.dwarf2/nullptr_t.exp
@@ -34,6 +34,6 @@ with_complaints 5 {
gdb_test $cmd $re "$cmd without complaints"
}
-gdb_test "maint print symbols -source $srcfile" \
+gdb_test "maint print symbols" \
"typedef void decltype\\(nullptr\\); \r\n.*" \
"decltype(nullptr) symbol"
--
2.35.3

View File

@ -0,0 +1,85 @@
From e492116f04d3b4d704c4f6f3259143d7fb16a03e Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries@suse.de>
Date: Wed, 26 Jul 2023 11:53:31 +0200
Subject: [PATCH 03/12] [gdb/testsuite] Fix regexps in
gdb.base/step-over-syscall.exp
When running test-case gdb.base/step-over-syscall.exp without glibc debuginfo
installed, I get:
...
(gdb) continue^M
Continuing.^M
^M
Breakpoint 2, 0x00007ffff7d4405e in vfork () from /lib64/libc.so.6^M
(gdb) PASS: gdb.base/step-over-syscall.exp: vfork: displaced=off: \
continue to vfork (1st time)
...
but with glibc debuginfo installed I get instead:
...
(gdb) continue^M
Continuing.^M
^M
Breakpoint 2, 0x00007ffff7d4405e in __libc_vfork () at \
../sysdeps/unix/sysv/linux/x86_64/vfork.S:44^M
44 ENTRY (__vfork)^M
(gdb) FAIL: gdb.base/step-over-syscall.exp: vfork: displaced=off: \
continue to vfork (1st time)
...
The FAIL is due to a mismatch with regexp:
...
"Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*"
...
because it cannot match both ".* in " and the __libc_ prefix.
Fix this by using instead the regexp:
...
"Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*"
...
Tested on x86_64-linux.
---
gdb/testsuite/gdb.base/step-over-syscall.exp | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/gdb/testsuite/gdb.base/step-over-syscall.exp b/gdb/testsuite/gdb.base/step-over-syscall.exp
index 424eee142fd..87ff2606d30 100644
--- a/gdb/testsuite/gdb.base/step-over-syscall.exp
+++ b/gdb/testsuite/gdb.base/step-over-syscall.exp
@@ -127,13 +127,13 @@ proc setup { syscall } {
gdb_test "break \*$syscall" "Breakpoint \[0-9\]* at .*"
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \
"continue to $syscall (1st time)"
# Hit the breakpoint on $syscall for the first time. In this time,
# we will let PLT resolution done, and the number single steps we will
# do later will be reduced.
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \
"continue to $syscall (2nd time)"
# Hit the breakpoint on $syscall for the second time. In this time,
# the address of syscall insn and next insn of syscall are recorded.
@@ -265,7 +265,7 @@ proc step_over_syscall { syscall } {
return -1
}
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \
"continue to $syscall (3rd time)"
# Hit the breakpoint on $syscall for the third time. In this time, we'll set
@@ -333,7 +333,7 @@ proc break_cond_on_syscall { syscall follow_fork detach_on_fork } {
return -1
}
- gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in |__libc_|)$syscall \\(\\).*" \
+ gdb_test "continue" "Continuing\\..*Breakpoint \[0-9\]+, (.* in )?(__libc_)?$syscall \\(\\).*" \
"continue to $syscall"
# Delete breakpoint syscall insns to avoid interference with other syscalls.
delete_breakpoints
--
2.35.3

View File

@ -1,3 +1,33 @@
-------------------------------------------------------------------
Tue Oct 24 13:39:35 UTC 2023 - Tom de Vries <tdevries@suse.com>
- Patches added (manual import from fedora rawhide @ 52a4dab):
* gdb-rhbz1773651-gdb-index-internal-error.patch
- Patches added (backport from master):
* gdb-support-rseq-auxvs.patch
* gdb-symtab-fix-line-number-of-static-const-class-mem.patch
* gdb-symtab-fix-too-many-symbols-in-gdbpy_lookup_stat.patch
* gdb-symtab-handle-pu-in-iterate_over_some_symtabs.patch
* gdb-symtab-work-around-pr-gas-29517.patch
* gdb-testsuite-add-kfail-for-pr-ada-30908.patch
* gdb-testsuite-add-xfail-for-gdb-29965-in-gdb.threads.patch
* gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-with-newer.patch
* gdb-testsuite-fix-gdb.arch-i386-signal.exp-on-x86_64.patch
* gdb-testsuite-fix-gdb.cp-m-static.exp-regression-on-.patch
* gdb-testsuite-fix-gdb.dwarf2-nullptr_t.exp-with-cc-w.patch
* gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch
* gdb-symtab-find-main-language-without-symtab-expansi.patch
* gdb-testsuite-add-wait-for-index-cache-in-gdb.dwarf2.patch
- Patches moved (from "Backport from gdb-patches" to
"Backports from master, available in next release"):
* gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
* gdb-testsuite-add-have_host_locale.patch
- Maintenance script qa.sh:
* Remove PR28463, PR28108, PR29247 and PR29160 kfails.
* Remove PR30540, PR30908, PR29965 kfails.
* Remove gdb.ada/mi_task_arg.exp kfail.
- Limit "Suggests: %{python}-Pygments" to SLE-15 and later.
-------------------------------------------------------------------
Sat Oct 21 08:05:18 UTC 2023 - Tom de Vries <tdevries@suse.com>

154
gdb.spec
View File

@ -224,6 +224,7 @@ Patch64: gdb-bz2237515-debuginfod-double-free.patch
Patch65: gdb-bz2237392-dwarf-obstack-allocation.patch
Patch66: gdb-rhbz2233961-CVE-2022-4806.patch
Patch67: gdb-rhbz2233965-memory-leak.patch
Patch68: gdb-rhbz1773651-gdb-index-internal-error.patch
#Fedora Packages end
# Fedora patches fixup
@ -289,37 +290,51 @@ Patch1505: gdb-testsuite-fix-gdb.base-step-over-syscall.exp-with-m32-amd-ca
# Backports from master, available in next release.
Patch2040: remove-some-unnecessary-includes-from-exp.y.patch
Patch2041: gdb-testsuite-fix-gdb.gdb-python-helper.exp-with-o2-.patch
Patch2042: gdb-testsuite-simplify-gdb.base-unwind-on-each-insn..patch
Patch2043: gdb-testsuite-handle-output-after-prompt-in-gdb.thre.patch
Patch2075: gdb-testsuite-add-xfail-in-gdb.arch-i386-pkru.exp.patch
Patch2076: gdb-testsuite-factor-out-proc-linux_kernel_version.patch
Patch2077: gdb-testsuite-add-xfail-in-gdb.python-py-record-btra.patch
Patch2078: gdb-testsuite-fix-gdb.threads-schedlock.exp-on-fast-.patch
Patch2079: gdb-testsuite-simplify-gdb.arch-amd64-disp-step-avx..patch
Patch2080: gdb-testsuite-fix-gdb.threads-schedlock.exp-for-gcc-.patch
Patch2081: gdb-testsuite-add-xfail-case-in-gdb.python-py-record.patch
Patch2082: aarch64-avoid-initializers-for-vlas.patch
Patch2083: gdb-tdep-aarch64-fix-frame-address-of-last-insn.patch
Patch2084: fix-pr30369-regression-on-aarch64-arm-pr30506.patch
Patch2085: gdb-testsuite-fix-breakpoint-regexp-in-gdb.ada-out_o.patch
Patch2086: gdb-testsuite-relax-breakpoint-count-check-in-gdb.py.patch
Patch2087: gdb-testsuite-fix-buffer-overflow-in-gdb.base-signed.patch
Patch2088: gdb-testsuite-require-syscall-time-in-gdb.reverse-ti.patch
Patch2089: gdb-testsuite-handle-missing-gdc-in-gdb.dlang-dlang-.patch
Patch2090: gdb-testsuite-add-basic-lmap-for-tcl-8.6.patch
Patch2091: gdb-testsuite-fix-gdb.rust-watch.exp-on-ppc64le.patch
Patch2092: gdb-testsuite-fix-gdb.python-py-breakpoint.exp-timeo.patch
Patch2093: powerpc-fix-for-gdb.reverse-finish-precsave.exp-and-.patch
Patch2094: powerpc-regression-fix-for-reverse-finish-command.patch
Patch2095: gdb-testsuite-don-t-use-string-cat-in-gdb.dwarf2-dw2.patch
Patch2096: move-step_until-procedure.patch
Patch2000: remove-some-unnecessary-includes-from-exp.y.patch
Patch2001: gdb-testsuite-fix-gdb.gdb-python-helper.exp-with-o2-.patch
Patch2002: gdb-testsuite-simplify-gdb.base-unwind-on-each-insn..patch
Patch2003: gdb-testsuite-handle-output-after-prompt-in-gdb.thre.patch
Patch2004: gdb-testsuite-add-xfail-in-gdb.arch-i386-pkru.exp.patch
Patch2005: gdb-testsuite-factor-out-proc-linux_kernel_version.patch
Patch2006: gdb-testsuite-add-xfail-in-gdb.python-py-record-btra.patch
Patch2007: gdb-testsuite-fix-gdb.threads-schedlock.exp-on-fast-.patch
Patch2008: gdb-testsuite-simplify-gdb.arch-amd64-disp-step-avx..patch
Patch2009: gdb-testsuite-fix-gdb.threads-schedlock.exp-for-gcc-.patch
Patch2010: gdb-testsuite-add-xfail-case-in-gdb.python-py-record.patch
Patch2011: aarch64-avoid-initializers-for-vlas.patch
Patch2012: gdb-tdep-aarch64-fix-frame-address-of-last-insn.patch
Patch2013: fix-pr30369-regression-on-aarch64-arm-pr30506.patch
Patch2014: gdb-testsuite-fix-breakpoint-regexp-in-gdb.ada-out_o.patch
Patch2015: gdb-testsuite-relax-breakpoint-count-check-in-gdb.py.patch
Patch2016: gdb-testsuite-fix-buffer-overflow-in-gdb.base-signed.patch
Patch2017: gdb-testsuite-require-syscall-time-in-gdb.reverse-ti.patch
Patch2018: gdb-testsuite-handle-missing-gdc-in-gdb.dlang-dlang-.patch
Patch2019: gdb-testsuite-add-basic-lmap-for-tcl-8.6.patch
Patch2020: gdb-testsuite-fix-gdb.rust-watch.exp-on-ppc64le.patch
Patch2021: gdb-testsuite-fix-gdb.python-py-breakpoint.exp-timeo.patch
Patch2022: powerpc-fix-for-gdb.reverse-finish-precsave.exp-and-.patch
Patch2023: powerpc-regression-fix-for-reverse-finish-command.patch
Patch2024: gdb-testsuite-don-t-use-string-cat-in-gdb.dwarf2-dw2.patch
Patch2025: move-step_until-procedure.patch
Patch2026: gdb-testsuite-fix-gdb.arch-i386-signal.exp-on-x86_64.patch
Patch2027: gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch
Patch2028: gdb-testsuite-add-kfail-for-pr-ada-30908.patch
Patch2029: gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-with-newer.patch
Patch2030: gdb-testsuite-fix-gdb.cp-m-static.exp-regression-on-.patch
Patch2031: gdb-symtab-fix-line-number-of-static-const-class-mem.patch
Patch2032: gdb-symtab-handle-pu-in-iterate_over_some_symtabs.patch
Patch2033: gdb-testsuite-fix-gdb.dwarf2-nullptr_t.exp-with-cc-w.patch
Patch2034: gdb-symtab-fix-too-many-symbols-in-gdbpy_lookup_stat.patch
Patch2035: gdb-support-rseq-auxvs.patch
Patch2036: gdb-testsuite-add-xfail-for-gdb-29965-in-gdb.threads.patch
Patch2037: gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
Patch2038: gdb-testsuite-add-have_host_locale.patch
Patch2039: gdb-symtab-find-main-language-without-symtab-expansi.patch
# Backports from master, not yet available in next release.
#
Patch2070: gdb-symtab-work-around-pr-gas-29517.patch
Patch2071: gdb-testsuite-add-wait-for-index-cache-in-gdb.dwarf2.patch
# Backport from gdb-patches
@ -331,10 +346,6 @@ Patch2101: gdb-testsuite-prevent-compilation-fails-with-unix-fpie-pie.patch
Patch2104: gdb-testsuite-work-around-skip_prologue-problems-in-gdb.threads-process-dies-while-detaching.exp.patch
# https://sourceware.org/pipermail/gdb-patches/2021-May/178990.html
Patch2105: gdb-cli-add-ignore-errors-command.patch
# https://sourceware.org/pipermail/gdb-patches/2023-May/199802.html
Patch2106: gdb-cli-handle-pending-c-after-rl_callback_read_char.patch
# https://sourceware.org/pipermail/gdb-patches/2023-June/200242.html
Patch2107: gdb-testsuite-add-have_host_locale.patch
# Debug patches.
@ -564,13 +575,13 @@ Requires: libunwind
%if %{build_main}
%if 0%{!?_without_python:1}
%if 0%{?suse_version} >= 1500
# For SLE-15 and later, we use source-highlight by default, and
# pygments as fallback.
# For SLE-12, source-highlight is not used, and we'd rather not start using
# pygments as default for an older release.
# So, suggests rather than recommends is what we want in both cases.
# pygments as fallback. So, suggests rather than recommends is what we want.
# Don't bother older releases with this.
Suggests: %{python}-Pygments
%endif
%endif
%description
GDB, the GNU debugger, allows you to debug programs written in C, C++,
@ -684,6 +695,7 @@ find -name "*.info*"|xargs rm -f
%patch65 -p1
%patch66 -p1
%patch67 -p1
%patch68 -p1
#Fedora patching end
%patch1000 -p1
@ -714,40 +726,54 @@ find -name "*.info*"|xargs rm -f
%patch1504 -p1
%patch1505 -p1
%patch2040 -p1
%patch2041 -p1
%patch2042 -p1
%patch2043 -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
%patch2075 -p1
%patch2076 -p1
%patch2077 -p1
%patch2078 -p1
%patch2079 -p1
%patch2080 -p1
%patch2081 -p1
%patch2082 -p1
%patch2083 -p1
%patch2084 -p1
%patch2085 -p1
%patch2086 -p1
%patch2087 -p1
%patch2088 -p1
%patch2089 -p1
%patch2090 -p1
%patch2091 -p1
%patch2092 -p1
%patch2093 -p1
%patch2094 -p1
%patch2095 -p1
%patch2096 -p1
%patch2070 -p1
%patch2071 -p1
%patch2100 -p1
%patch2101 -p1
%patch2104 -p1
%patch2105 -p1
%patch2106 -p1
%patch2107 -p1
#unpack libipt
%if 0%{have_libipt}

51
qa.sh
View File

@ -132,31 +132,41 @@ kfail=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=26971
"FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of .fop"
"FAIL: gdb.arch/amd64-init-x87-values.exp: check_x87_regs_around_init: check post FLD1 value of .fioff"
# https://sourceware.org/bugzilla/show_bug.cgi?id=24845
"FAIL: gdb.base/step-over-syscall.exp: clone: displaced=off: single step over clone"
"FAIL: gdb.base/step-over-syscall.exp: clone: displaced=off: continue to marker \(clone\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=19436#c1
"FAIL: gdb.cp/no-dmgl-verbose.exp: setting breakpoint at 'f\(std::string\)'"
# https://sourceware.org/bugzilla/show_bug.cgi?id=25504
"FAIL: gdb.threads/process-dies-while-detaching.exp: single-process: continue: .*: continue"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28065
"FAIL: gdb.threads/access-mem-running-thread-exit.exp:"
# https://sourceware.org/bugzilla/show_bug.cgi?id=25503
"FAIL: gdb.threads/signal-while-stepping-over-bp-other-thread.exp: step \(pattern 3\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=26915
"FAIL: gdb.threads/schedlock.exp: schedlock=off: .*: other threads ran - unlocked"
"FAIL: gdb.threads/watchthreads-threaded.exp: watchpoint on args\[[1-3]\] hit in thread"
"FAIL: gdb.threads/watchthreads-threaded.exp: watch args\[[1-3]\]"
"FAIL: gdb.threads/watchthreads-threaded.exp: threaded watch loop"
"FAIL: gdb.threads/watchthreads-threaded.exp: combination of threaded watchpoints = 30 \+ initial values"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28479
"FAIL: gdb.mi/mi-nonstop.exp: wait for thread exit \(timeout\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=26273
"FAIL: gdb.threads/gcore-stale-thread.exp: save a corefile"
"FAIL: gdb.threads/gcore-stale-thread.exp: exited thread is current due to non-stop"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28467
# -pie, x86_64 -m32 or i586.
"FAIL: gdb.base/nodebug.exp: p/c \(int\) array_index\(\"abcdef\",2\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28617
"FAIL: gdb.base/info-os.exp: get process groups \(timeout\)"
"FAIL: gdb.base/info-os.exp: get threads \(timeout\)"
@ -174,6 +184,7 @@ kfail=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=26363
"FAIL: gdb.xml/tdesc-reload.exp: .*internal error"
# https://sourceware.org/bugzilla/show_bug.cgi?id=26761
"FAIL: gdb.base/gdb-sigterm.exp: .*internal error"
@ -432,28 +443,28 @@ kfail_sle11=(
kfail_factory=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=28463
"FAIL: gdb.ada/set_pckd_arr_elt.exp: scenario=minimal: print va.t\(1\) := 15"
"FAIL: gdb.ada/set_pckd_arr_elt.exp: scenario=minimal: continue to update_small for va.t"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28108
"FAIL: gdb.base/langs.exp: up to foo in langs.exp"
"FAIL: gdb.base/langs.exp: up to cppsub_ in langs.exp"
"FAIL: gdb.base/langs.exp: up to fsub in langs.exp"
# https://sourceware.org/pipermail/gdb-patches/2021-October/182449.html
"FAIL: gdb.threads/current-lwp-dead.exp: continue to breakpoint: fn_return"
# Similar error message to the one above, see if fixing that one fixes this.
"FAIL: gdb.threads/clone-new-thread-event.exp: catch SIGUSR1"
# https://sourceware.org/bugzilla/show_bug.cgi?id=27238
"FAIL: gdb.go/package.exp: gdb_breakpoint: set breakpoint at package2.Foo"
"FAIL: gdb.go/package.exp: going to first breakpoint \(the program exited\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28551
"FAIL: gdb.go/package.exp: going to first breakpoint \\(GDB internal error\\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28468
"FAIL: gdb.threads/signal-command-handle-nopass.exp: step-over (yes|no): signal SIGUSR1"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28477
"FAIL: gdb.base/step-over-syscall.exp: clone: displaced=off: continue to marker \(clone\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=26867
"FAIL: gdb.threads/signal-sigtrap.exp: sigtrap thread 1: signal SIGTRAP reaches handler"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28510
"FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: br main"
"FAIL: gdb.debuginfod/fetch_src_and_symbols.exp: local_url: l"
@ -461,21 +472,10 @@ kfail_factory=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=28667
"FAIL: gdb.reverse/watch-precsave.exp: watchpoint hit, fourth time \\(GDB internal error\\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29160
"FAIL: gdb.ctf/.*.exp"
"FAIL: gdb.base/ctf-.*.exp"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29196
"FAIL: gdb.base/gdb11531.exp: watchpoint variable triggers at next"
"FAIL: gdb.base/gdb11531.exp: watchpoint variable triggers at continue"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29247
"FAIL: gdb.base/varargs.exp: print find_max_long_double_real\(4, ldc1, ldc2, ldc3, ldc4\)"
# We get "value has been optimized out", which is possible for an optimized gdb, due
# to optimization of function c_print_type.
"FAIL: gdb.gdb/python-helper.exp: print \*type->main_type"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29253
"FAIL: gdb.server/stop-reply-no-thread.exp: to_disable=threads: continue to main \(timeout\)"
"FAIL: gdb.server/stop-reply-no-thread.exp: to_disable=threads: continue until exit \(timeout\)"
@ -483,17 +483,6 @@ kfail_factory=(
# https://sourceware.org/bugzilla/show_bug.cgi?id=29706
"FAIL: gdb.base/eof-exit.exp: with non-dump terminal: with bracketed-paste-mode on: close GDB with eof \(missed the prompt\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29965
"FAIL: gdb.threads/process-exit-status-is-leader-exit-status.exp: iteration=.*: continue \(the program exited\)"
# https://sourceware.org/pipermail/gdb-patches/2023-September/202757.html
"FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 \(unexpected output\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=30908
"FAIL: gdb.ada/str_binop_equal.exp: print my_str = \"ABCD\""
"FAIL: gdb.ada/widewide.exp: print my_wws = \" helo\""
"FAIL: gdb.ada/widewide.exp: print my_ws = \"wide\""
# Looks like a problem with modern debug info, where stepping out of a
# function takes more one step.
"FAIL: gdb.base/rtld-step.exp: finish out of foo 1"
@ -506,10 +495,6 @@ 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
# https://sourceware.org/bugzilla/show_bug.cgi?id=30540
FAIL: gdb.base/auxv.exp: info auxv on live process
FAIL: gdb.base/auxv.exp: info auxv on gcore-created dump
) # kfail_factory