* 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
60 lines
1.9 KiB
Diff
60 lines
1.9 KiB
Diff
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
|
||
|