* 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
109 lines
3.2 KiB
Diff
109 lines
3.2 KiB
Diff
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
|
|
|