* 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
77 lines
2.8 KiB
Diff
77 lines
2.8 KiB
Diff
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
|
|
|