openSUSE Commits
Threads by month
- ----- 2024 -----
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
November 2023
- 1 participants
- 1691 discussions
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package gdb for openSUSE:Factory checked in at 2023-11-17 20:48:02
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/gdb (Old)
and /work/SRC/openSUSE:Factory/.gdb.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "gdb"
Fri Nov 17 20:48:02 2023 rev:173 rq:1126771 version:13.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/gdb/gdb.changes 2023-08-22 08:55:20.090466282 +0200
+++ /work/SRC/openSUSE:Factory/.gdb.new.2521/gdb.changes 2023-11-17 20:48:27.526715412 +0100
@@ -1,0 +2,154 @@
+Mon Nov 13 14:08:08 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script qa.sh:
+ * Update PR31004 kfail.
+- Patches added (backport from gdb-patches):
+ * gdb-fix-segfault-in-for_each_block-part-1.patch
+
+-------------------------------------------------------------------
+Tue Oct 31 11:59:43 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script qa.sh:
+ * Update PR28561 kfail.
+ * Remove PR31015 kfail.
+ * Remove PR30547 kfail.
+- Patches added (backport from master):
+ * gdb-symtab-add-producer_is_gas.patch
+ * gdb-symtab-work-around-gas-pr28629.patch
+ * gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
+ * gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch
+ * gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
+ * gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
+ * gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch
+- Patches added (backport from gdb-patches):
+ * gdb-fix-segfault-in-for_each_block-part-2.patch
+ * gdb-tui-allow-command-window-of-1-or-2-lines.patch
+ * gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch
+
+-------------------------------------------------------------------
+Tue Oct 31 09:02:42 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script qa.sh:
+ * Remove PR28467, PR29418, PR29420, PR29814 and PR29408 kfail.
+ * Remove gdb.tui/tui-layout-asm-short-prog.exp kfail.
+ * Remove commit f68eca29d3b, 29004660c94, 301fe55e9c4,
+ 4d88ae0c7b5, e7d69e72bfd, 8b272d7671f, 85819864f7c, 167f3beb655
+ and a0eda3df5b7 kfails.
+ * Add PR31015 kfail.
+ * Remove PR29793 kfail.
+ * Remove gdb.arch/powerpc-bcl-prologue.exp kfail.
+ * Remove PR29813 and PR29816 kfail.
+
+-------------------------------------------------------------------
+Sun Oct 29 18:57:21 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script qa.sh:
+ * Update PR28561 kfail.
+ * Update PR29781 kfail.
+- Maintenance script qa-local.sh:
+ * Add "Verify quilt setup" step.
+- Patches added (backport from master):
+ * gdb-symtab-handle-self-reference-die.patch
+ * gdb-symtab-handle-self-reference-in-inherit_abstract.patch
+ * gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch
+
+-------------------------------------------------------------------
+Thu Oct 26 12:51:55 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script qa.sh:
+ * Add comment to kfail for PR30528.
+ * Add UNRESOLVED kfail for gdb.base/gcore-excessive-memory.exp.
+ * Add UNRESOLVED kfail for PR31001.
+ * Remove PR27238 kfail.
+ * Add powerpc64le hw watchpoint kfails.
+ * Add PR31004 kfail.
+ * Add PR30531 kfail.
+- Patches added (backport from master):
+ * xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch
+ * avoid-manual-memory-management-in-go-lang.c.patch
+ * gdb-go-handle-v3-go_0-mangled-prefix.patch
+
+-------------------------------------------------------------------
+Thu Oct 26 09:24:04 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Patches added (backport from master):
+ * gdb-symtab-don-t-deduplicate-variables-in-gdb-index.patch
+- Patches dropped (requires unsupported command):
+ * gdb-testsuite-add-wait-for-index-cache-in-gdb.dwarf2.patch
+- Maintenance script qa.sh:
+ * Added PR30528 kfail.
+
+-------------------------------------------------------------------
+Tue Oct 24 13:39:35 UTC 2023 - Tom de Vries <tdevries(a)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(a)suse.com>
+
+- Mention import-fedora.sh to fix warning.
+- Maintenance script qa.sh:
+ * Update kfail for PR28561.
+
+-------------------------------------------------------------------
+Fri Oct 20 10:43:32 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Maintenance script import-fedora.sh:
+ * New script. Move skipped patches list from gdb.spec to script.
+- Update to fedora 38 @ 82cc8e0.
+- Patch renamed:
+ * pass-const-frame_info_ptr-reference-for-skip_-langua.patch ->
+ gdb-rhbz2192105-ftbs-dangling-pointer
+- Patches added:
+ * gdb-bz2237392-dwarf-obstack-allocation.patch
+ * gdb-bz2237515-debuginfod-double-free.patch
+ * gdb-rhbz2160211-excessive-core-file-warnings.patch
+ * gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
+ * gdb-rhbz2233961-CVE-2022-4806.patch
+ * gdb-rhbz2233965-memory-leak.patch
+- Maintenance script qa-local.sh:
+ * Add openSUSE_Leap_15.5 and openSUSE_Factory_LegacyX86.
+ * Add "List configs" item.
+ * Skip i586 for SLE-11.
+- Maintenance script qa.sh:
+ * Make sure exit status is 0
+
+-------------------------------------------------------------------
+Wed Sep 27 09:22:47 UTC 2023 - Tom de Vries <tdevries(a)suse.com>
+
+- Add "Suggests: %{python}-Pygments".
+- Maintenance script qa.sh:
+ * Note investigation of some ada test-cases.
+ * Update PR30547 kfail.
+ * Add PR28561 kfail.
+ * Update PKRU-related kfail.
+ * Use openSUSE_Factory_LegacyX86.i586 instead of
+ openSUSE_Factory.i586.
+ * Remove PR27813 kfail and corresponding todo.
+
+-------------------------------------------------------------------
Old:
----
pass-const-frame_info_ptr-reference-for-skip_-langua.patch
New:
----
avoid-manual-memory-management-in-go-lang.c.patch
gdb-bz2237392-dwarf-obstack-allocation.patch
gdb-bz2237515-debuginfod-double-free.patch
gdb-fix-segfault-in-for_each_block-part-1.patch
gdb-fix-segfault-in-for_each_block-part-2.patch
gdb-go-handle-v3-go_0-mangled-prefix.patch
gdb-rhbz1773651-gdb-index-internal-error.patch
gdb-rhbz2160211-excessive-core-file-warnings.patch
gdb-rhbz2192105-ftbs-dangling-pointer
gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
gdb-rhbz2233961-CVE-2022-4806.patch
gdb-rhbz2233965-memory-leak.patch
gdb-support-rseq-auxvs.patch
gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch
gdb-symtab-add-producer_is_gas.patch
gdb-symtab-don-t-deduplicate-variables-in-gdb-index.patch
gdb-symtab-find-main-language-without-symtab-expansi.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-handle-self-reference-die.patch
gdb-symtab-handle-self-reference-in-inherit_abstract.patch
gdb-symtab-work-around-gas-pr28629.patch
gdb-symtab-work-around-pr-gas-29517.patch
gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
gdb-testsuite-add-kfail-for-pr-ada-30908.patch
gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.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-gdb.python-py-breakpoint.exp-with-.patch
gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch
gdb-tui-allow-command-window-of-1-or-2-lines.patch
gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch
gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
import-fedora.sh
xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch
BETA DEBUG BEGIN:
Old:- Patch renamed:
* pass-const-frame_info_ptr-reference-for-skip_-langua.patch ->
gdb-rhbz2192105-ftbs-dangling-pointer
BETA DEBUG END:
BETA DEBUG BEGIN:
New: * xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch
* avoid-manual-memory-management-in-go-lang.c.patch
* gdb-go-handle-v3-go_0-mangled-prefix.patch
New:- Patches added:
* gdb-bz2237392-dwarf-obstack-allocation.patch
* gdb-bz2237515-debuginfod-double-free.patch
New: * gdb-bz2237392-dwarf-obstack-allocation.patch
* gdb-bz2237515-debuginfod-double-free.patch
* gdb-rhbz2160211-excessive-core-file-warnings.patch
New:- Patches added (backport from gdb-patches):
* gdb-fix-segfault-in-for_each_block-part-1.patch
New:- Patches added (backport from gdb-patches):
* gdb-fix-segfault-in-for_each_block-part-2.patch
* gdb-tui-allow-command-window-of-1-or-2-lines.patch
New: * avoid-manual-memory-management-in-go-lang.c.patch
* gdb-go-handle-v3-go_0-mangled-prefix.patch
New:- Patches added (manual import from fedora rawhide @ 52a4dab):
* gdb-rhbz1773651-gdb-index-internal-error.patch
- Patches added (backport from master):
New: * gdb-bz2237515-debuginfod-double-free.patch
* gdb-rhbz2160211-excessive-core-file-warnings.patch
* gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
New: * gdb-rhbz2160211-excessive-core-file-warnings.patch
* gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
* gdb-rhbz2233961-CVE-2022-4806.patch
New: * gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
* gdb-rhbz2233961-CVE-2022-4806.patch
* gdb-rhbz2233965-memory-leak.patch
New: * gdb-rhbz2233961-CVE-2022-4806.patch
* gdb-rhbz2233965-memory-leak.patch
- Maintenance script qa-local.sh:
New:- Patches added (backport from master):
* gdb-support-rseq-auxvs.patch
* gdb-symtab-fix-line-number-of-static-const-class-mem.patch
New: * gdb-symtab-handle-self-reference-in-inherit_abstract.patch
* gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch
New:- Patches added (backport from master):
* gdb-symtab-add-producer_is_gas.patch
* gdb-symtab-work-around-gas-pr28629.patch
New:- Patches added (backport from master):
* gdb-symtab-don-t-deduplicate-variables-in-gdb-index.patch
- Patches dropped (requires unsupported command):
New: * 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
New: * 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
New: * 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
New: * 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
New:- Patches added (backport from master):
* gdb-symtab-handle-self-reference-die.patch
* gdb-symtab-handle-self-reference-in-inherit_abstract.patch
New: * gdb-symtab-handle-self-reference-die.patch
* gdb-symtab-handle-self-reference-in-inherit_abstract.patch
* gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch
New: * gdb-symtab-add-producer_is_gas.patch
* gdb-symtab-work-around-gas-pr28629.patch
* gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
New: * 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
New: * gdb-symtab-work-around-gas-pr28629.patch
* gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
* gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch
New: * 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
New: * gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
* gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch
- Patches added (backport from gdb-patches):
New: * 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
New: * 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
New: * 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
New: * 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
New: * 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
New: * gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch
* gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch
* gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
New: * 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
New: * gdb-fix-segfault-in-for_each_block-part-2.patch
* gdb-tui-allow-command-window-of-1-or-2-lines.patch
* gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch
New: * gdb-tui-allow-command-window-of-1-or-2-lines.patch
* gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch
New: * gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch
* gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
* gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
New: * gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
* gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch
* gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch
New:- Patches added (backport from master):
* xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch
* avoid-manual-memory-management-in-go-lang.c.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ gdb.spec ++++++
--- /var/tmp/diff_new_pack.gQfqXG/_old 2023-11-17 20:48:34.730992184 +0100
+++ /var/tmp/diff_new_pack.gQfqXG/_new 2023-11-17 20:48:34.730992184 +0100
@@ -145,6 +145,7 @@
Source17: qa-local.sh
Source18: qa-remote.sh
Source19: README.qa
+Source20: import-fedora.sh
%if %{build_testsuite}
NoSource: 0
@@ -163,9 +164,10 @@
NoSource: 17
NoSource: 18
NoSource: 19
+NoSource: 20
%endif
-# Fedora import from branch f38, commit fc4e284.
+# Fedora import from branch f38, commit 82cc8e0.
#Fedora Packages begin
Patch2: gdb-6.3-gstack-20050411.patch
@@ -214,37 +216,17 @@
Patch55: gdb-rhbz1261564-aarch64-hw-watchpoint-test.patch
Patch57: gdb-linux_perf-bundle.patch
Patch59: gdb-rhbz1553104-s390x-arch12-test.patch
-Patch62: gdb-binutils29988-read_indexed_address.patch
+Patch60: gdb-binutils29988-read_indexed_address.patch
+Patch61: gdb-rhbz2192105-ftbs-dangling-pointer
+Patch62: gdb-rhbz2160211-excessive-core-file-warnings.patch
+Patch63: gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
+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 Packages not copied:
-#
-# Not applicable for openSUSE:
-# - gdb-libexec-add-index.patch
-# - gdb-6.3-rh-testversion-20041202.patch
-# - gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
-# - gdb-6.8-bz466901-backtrace-full-prelinked.patch
-# - gdb-container-rh-pkg.patch
-#
-# Broken:
-# - gdb-6.5-BEA-testsuite.patch
-# over-specific test-case in a shell script
-# - gdb-6.5-readline-long-line-crash-test.patch
-# Hangs for horizontal-scroll-mode on, times out after 10 minutes.
-# - gdb-rhbz1156192-recursive-dlopen-test.patch
-# Fragile test-case, requires glibc to fail in a certain way.
-#
-# Obsolete:
-# - gdb-6.7-charsign-test.patch (dropped by fedora)
-# - gdb-6.7-ppc-clobbered-registers-O2-test.patch
-# - gdb-test-ivy-bridge.patch (dropped by fedora)
-# - gdb-ppc-power7-test.patch (dropped by fedora)
-# - gdb-6.3-bz140532-ppc-unwinding-test.patch (dropped by fedora)
-#
-# Dropped:
-# - gdb-rhbz2177655-aarch64-pauth-valid-regcache.patch (included in 13.2)
-# - gdb-rhbz2183595-rustc-inside_main.patch (included in 13.2)
-
# Fedora patches fixup
# These need a number with at least four digits, otherwise patchlist.pl removes
# them when upgrading.
@@ -308,38 +290,65 @@
# 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
-Patch2097: pass-const-frame_info_ptr-reference-for-skip_-langua.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
+Patch2040: gdb-symtab-don-t-deduplicate-variables-in-gdb-index.patch
+Patch2041: xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch
+Patch2042: avoid-manual-memory-management-in-go-lang.c.patch
+Patch2043: gdb-go-handle-v3-go_0-mangled-prefix.patch
+Patch2044: gdb-symtab-handle-self-reference-die.patch
+Patch2045: gdb-symtab-handle-self-reference-in-inherit_abstract.patch
+Patch2046: gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch
+Patch2047: gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch
+Patch2048: gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch
+# Part of upstream commit deb1ba4e38b ("[gdb/tui] Fix TUI resizing for TERM=ansi").
+Patch2049: gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch
# Backports from master, not yet available in next release.
-#
+Patch2070: gdb-symtab-work-around-pr-gas-29517.patch
+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
# Backport from gdb-patches
@@ -351,10 +360,14 @@
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
+# https://sourceware.org/pipermail/gdb-patches/2023-November/203942.html
+Patch2106: gdb-fix-segfault-in-for_each_block-part-2.patch
+# https://sourceware.org/pipermail/gdb-patches/2023-November/203928.html
+Patch2107: gdb-tui-allow-command-window-of-1-or-2-lines.patch
+# https://sourceware.org/pipermail/gdb-patches/2023-November/203929.html
+Patch2108: gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch
+# https://sourceware.org/pipermail/gdb-patches/2023-November/203943.html
+Patch2109: gdb-fix-segfault-in-for_each_block-part-1.patch
# Debug patches.
@@ -583,6 +596,15 @@
%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. 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++,
Java, and other languages, by executing them in a controlled fashion
@@ -687,7 +709,15 @@
%patch55 -p1
%patch57 -p1
%patch59 -p1
+%patch60 -p1
+%patch61 -p1
%patch62 -p1
+%patch63 -p1
+%patch64 -p1
+%patch65 -p1
+%patch66 -p1
+%patch67 -p1
+%patch68 -p1
#Fedora patching end
%patch1000 -p1
@@ -718,34 +748,62 @@
%patch1504 -p1
%patch1505 -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
-
-%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
-%patch2097 -p1
+%patch2044 -p1
+%patch2045 -p1
+%patch2046 -p1
+%patch2047 -p1
+%patch2048 -p1
+%patch2049 -p1
+
+%patch2070 -p1
+%patch2071 -p1
+%patch2072 -p1
+%patch2073 -p1
+%patch2074 -p1
%patch2100 -p1
%patch2101 -p1
@@ -753,6 +811,8 @@
%patch2105 -p1
%patch2106 -p1
%patch2107 -p1
+%patch2108 -p1
+%patch2109 -p1
#unpack libipt
%if 0%{have_libipt}
++++++ avoid-manual-memory-management-in-go-lang.c.patch ++++++
From 4e0e7ff14ba271576232160bf337639662a2ea23 Mon Sep 17 00:00:00 2001
From: Tom Tromey <tom(a)tromey.com>
Date: Thu, 16 Feb 2023 17:36:29 -0700
Subject: [PATCH 2/3] Avoid manual memory management in go-lang.c
I noticed a couple of spots in go-lang.c that could be improved by
using unique_ptr.
Reviewed-By: Andrew Burgess <aburgess(a)redhat.com>
---
gdb/dwarf2/read.c | 2 +-
gdb/go-exp.c | 287 +++++++++++++++++++++++-----------------------
gdb/go-exp.y | 8 +-
gdb/go-lang.c | 40 +++----
gdb/go-lang.h | 11 +-
5 files changed, 173 insertions(+), 175 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 8aa7f8c31e5..61f4bd75013 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -7890,7 +7890,7 @@ fixup_go_packaging (struct dwarf2_cu *cu)
&& sym->aclass () == LOC_BLOCK)
{
gdb::unique_xmalloc_ptr<char> this_package_name
- (go_symbol_package_name (sym));
+ = go_symbol_package_name (sym);
if (this_package_name == NULL)
continue;
diff --git a/gdb/go-exp.y b/gdb/go-exp.y
index cbaa79ee18c..542a06d06d6 100644
--- a/gdb/go-exp.y
+++ b/gdb/go-exp.y
@@ -1393,16 +1393,16 @@ classify_name (struct parser_state *par_state, const struct block *block)
current package. */
{
- char *current_package_name = go_block_package_name (block);
+ gdb::unique_xmalloc_ptr<char> current_package_name
+ = go_block_package_name (block);
if (current_package_name != NULL)
{
struct stoken sval =
- build_packaged_name (current_package_name,
- strlen (current_package_name),
+ build_packaged_name (current_package_name.get (),
+ strlen (current_package_name.get ()),
copy.c_str (), copy.size ());
- xfree (current_package_name);
sym = lookup_symbol (sval.ptr, block, VAR_DOMAIN,
&is_a_field_of_this);
if (sym.symbol)
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index 7549f14dc63..f9176ace71d 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -163,11 +163,8 @@ unpack_package_and_object (char *buf,
Space for the resulting strings is malloc'd in one buffer.
PACKAGEP,OBJECTP,METHOD_TYPE* will (typically) point into this buffer.
- [There are a few exceptions, but the caller is still responsible for
- freeing the resulting pointer.]
A pointer to this buffer is returned, or NULL if symbol isn't a
mangled Go symbol.
- The caller is responsible for freeing the result.
*METHOD_TYPE_IS_POINTERP is set to a boolean indicating if
the method type is a pointer.
@@ -180,7 +177,7 @@ unpack_package_and_object (char *buf,
If we ever need to unpack the method type, this routine should work
for that too. */
-static char *
+static gdb::unique_xmalloc_ptr<char>
unpack_mangled_go_symbol (const char *mangled_name,
const char **packagep,
const char **objectp,
@@ -209,9 +206,10 @@ unpack_mangled_go_symbol (const char *mangled_name,
/* main.init is mangled specially. */
if (strcmp (mangled_name, "__go_init_main") == 0)
{
- char *package = xstrdup ("main");
+ gdb::unique_xmalloc_ptr<char> package
+ = make_unique_xstrdup ("main");
- *packagep = package;
+ *packagep = package.get ();
*objectp = "init";
return package;
}
@@ -219,9 +217,10 @@ unpack_mangled_go_symbol (const char *mangled_name,
/* main.main is mangled specially (missing prefix). */
if (strcmp (mangled_name, "main.main") == 0)
{
- char *package = xstrdup ("main");
+ gdb::unique_xmalloc_ptr<char> package
+ = make_unique_xstrdup ("main");
- *packagep = package;
+ *packagep = package.get ();
*objectp = "main";
return package;
}
@@ -261,7 +260,8 @@ unpack_mangled_go_symbol (const char *mangled_name,
/* At this point we've decided we have a mangled Go symbol. */
- buf = xstrdup (mangled_name);
+ gdb::unique_xmalloc_ptr<char> result = make_unique_xstrdup (mangled_name);
+ buf = result.get ();
/* Search backwards looking for "N<digit(s)>". */
p = buf + len;
@@ -317,7 +317,7 @@ unpack_mangled_go_symbol (const char *mangled_name,
}
unpack_package_and_object (buf, packagep, objectp);
- return buf;
+ return result;
}
/* Implements the la_demangle language_defn routine for language Go.
@@ -381,10 +381,9 @@ go_language::demangle_symbol (const char *mangled_name, int options) const
return make_unique_xstrdup ((const char *) obstack_finish (&tempbuf));
}
-/* Given a Go symbol, return its package or NULL if unknown.
- Space for the result is malloc'd, caller must free. */
+/* See go-lang.h. */
-char *
+gdb::unique_xmalloc_ptr<char>
go_symbol_package_name (const struct symbol *sym)
{
const char *mangled_name = sym->linkage_name ();
@@ -393,8 +392,7 @@ go_symbol_package_name (const struct symbol *sym)
const char *method_type_package_name;
const char *method_type_object_name;
int method_type_is_pointer;
- char *name_buf;
- char *result;
+ gdb::unique_xmalloc_ptr<char> name_buf;
gdb_assert (sym->language () == language_go);
name_buf = unpack_mangled_go_symbol (mangled_name,
@@ -405,15 +403,12 @@ go_symbol_package_name (const struct symbol *sym)
/* Some Go symbols don't have mangled form we interpret (yet). */
if (name_buf == NULL)
return NULL;
- result = xstrdup (package_name);
- xfree (name_buf);
- return result;
+ return make_unique_xstrdup (package_name);
}
-/* Return the package that BLOCK is in, or NULL if there isn't one.
- Space for the result is malloc'd, caller must free. */
+/* See go-lang.h. */
-char *
+gdb::unique_xmalloc_ptr<char>
go_block_package_name (const struct block *block)
{
while (block != NULL)
@@ -422,7 +417,8 @@ go_block_package_name (const struct block *block)
if (function != NULL)
{
- char *package_name = go_symbol_package_name (function);
+ gdb::unique_xmalloc_ptr<char> package_name
+ = go_symbol_package_name (function);
if (package_name != NULL)
return package_name;
diff --git a/gdb/go-lang.h b/gdb/go-lang.h
index f0929cc3ac5..8edfe6ed53a 100644
--- a/gdb/go-lang.h
+++ b/gdb/go-lang.h
@@ -62,9 +62,14 @@ extern const char *go_main_name (void);
extern enum go_type go_classify_struct_type (struct type *type);
-extern char *go_symbol_package_name (const struct symbol *sym);
-
-extern char *go_block_package_name (const struct block *block);
+/* Given a Go symbol, return its package or nullptr if unknown. */
+extern gdb::unique_xmalloc_ptr<char> go_symbol_package_name
+ (const struct symbol *sym);
+
+/* Return the package that BLOCK is in, or nullptr if there isn't
+ one. */
+extern gdb::unique_xmalloc_ptr<char> go_block_package_name
+ (const struct block *block);
extern const struct builtin_go_type *builtin_go_type (struct gdbarch *);
--
2.35.3
++++++ gdb-bz2237392-dwarf-obstack-allocation.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Andrew Burgess <aburgess(a)redhat.com>
Date: Thu, 14 Sep 2023 13:06:26 +0100
Subject: gdb-bz2237392-dwarf-obstack-allocation.patch
;; Backport upstream commit 54392c4df604f20 to fix an incorrect
;; obstack allocation that wold lead to memory corruption.
gdb: fix buffer overflow in DWARF reader
In this commit:
commit 48ac197b0c209ccf1f2de9704eb6cdf7c5c73a8e
Date: Fri Nov 19 10:12:44 2021 -0700
Handle multiple addresses in call_site_target
a buffer overflow bug was introduced when the following code was
added:
CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR,
addresses.size ());
std::copy (addresses.begin (), addresses.end (), saved);
The definition of XOBNEWVAR is (from libiberty.h):
#define XOBNEWVAR(O, T, S) ((T *) obstack_alloc ((O), (S)))
So 'saved' is going to point to addresses.size () bytes of memory,
however, the std::copy will write addresses.size () number of
CORE_ADDR sized entries to the address pointed to by 'saved', this is
going to result in memory corruption.
The mistake is that we should have used XOBNEWVEC, which allocates a
vector of entries, the definition of XOBNEWVEC is:
#define XOBNEWVEC(O, T, N) \
((T *) obstack_alloc ((O), sizeof (T) * (N)))
Which means we will have set aside enough space to create a copy of
the contents of the addresses vector.
I'm not sure how to create a test for this problem, this issue cropped
up when debugging a particular i686 built binary, which just happened
to trigger a glibc assertion (likely due to random memory corruption),
debugging the same binary built for x86-64 appeared to work just fine.
Using valgrind on the failing GDB binary pointed straight to the cause
of the problem, and with this patch in place there are no longer
valgrind errors in this area.
If anyone has ideas for a test I'm happy to work on something.
Co-Authored-By: Keith Seitz <keiths(a)redhat.com>
Approved-By: Tom Tromey <tom(a)tromey.com>
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -12506,7 +12506,7 @@ read_call_site_scope (struct die_info *die, struct dwarf2_cu *cu)
std::vector<CORE_ADDR> addresses;
dwarf2_ranges_read_low_addrs (ranges_offset, target_cu,
target_die->tag, addresses);
- CORE_ADDR *saved = XOBNEWVAR (&objfile->objfile_obstack, CORE_ADDR,
+ CORE_ADDR *saved = XOBNEWVEC (&objfile->objfile_obstack, CORE_ADDR,
addresses.size ());
std::copy (addresses.begin (), addresses.end (), saved);
call_site->target.set_loc_array (addresses.size (), saved);
++++++ gdb-bz2237515-debuginfod-double-free.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Tom Tromey <tromey(a)adacore.com>
Date: Tue, 6 Dec 2022 12:07:12 -0700
Subject: gdb-bz2237515-debuginfod-double-free.patch
;; Backport upstream commit f96328accde1e63 to fix a potential double
;; free issue in the debuginfod code.
Avoid double-free with debuginfod
PR gdb/29257 points out a possible double free when debuginfod is in
use. Aside from some ugly warts in the symbol code (an ongoing
issue), the underlying issue in this particular case is that elfread.c
seems to assume that symfile_bfd_open will return NULL on error,
whereas in reality it throws an exception. As this code isn't
prepared for an exception, bad things result.
This patch fixes the problem by introducing a non-throwing variant of
symfile_bfd_open and using it in the affected places.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29257
diff --git a/gdb/elfread.c b/gdb/elfread.c
--- a/gdb/elfread.c
+++ b/gdb/elfread.c
@@ -1222,10 +1222,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
if (!debugfile.empty ())
{
- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (debugfile.c_str ()));
+ gdb_bfd_ref_ptr debug_bfd
+ (symfile_bfd_open_no_error (debugfile.c_str ()));
- symbol_file_add_separate (debug_bfd, debugfile.c_str (),
- symfile_flags, objfile);
+ if (debug_bfd != nullptr)
+ symbol_file_add_separate (debug_bfd, debugfile.c_str (),
+ symfile_flags, objfile);
}
else
{
@@ -1245,13 +1247,12 @@ elf_symfile_read_dwarf2 (struct objfile *objfile,
if (fd.get () >= 0)
{
/* File successfully retrieved from server. */
- gdb_bfd_ref_ptr debug_bfd (symfile_bfd_open (symfile_path.get ()));
+ gdb_bfd_ref_ptr debug_bfd
+ (symfile_bfd_open_no_error (symfile_path.get ()));
- if (debug_bfd == nullptr)
- warning (_("File \"%s\" from debuginfod cannot be opened as bfd"),
- filename);
- else if (build_id_verify (debug_bfd.get (), build_id->size,
- build_id->data))
+ if (debug_bfd != nullptr
+ && build_id_verify (debug_bfd.get (), build_id->size,
+ build_id->data))
{
symbol_file_add_separate (debug_bfd, symfile_path.get (),
symfile_flags, objfile);
diff --git a/gdb/symfile.c b/gdb/symfile.c
--- a/gdb/symfile.c
+++ b/gdb/symfile.c
@@ -1744,6 +1744,23 @@ symfile_bfd_open (const char *name)
return sym_bfd;
}
+/* See symfile.h. */
+
+gdb_bfd_ref_ptr
+symfile_bfd_open_no_error (const char *name) noexcept
+{
+ try
+ {
+ return symfile_bfd_open (name);
+ }
+ catch (const gdb_exception_error &err)
+ {
+ warning ("%s", err.what ());
+ }
+
+ return nullptr;
+}
+
/* Return the section index for SECTION_NAME on OBJFILE. Return -1 if
the section was not found. */
diff --git a/gdb/symfile.h b/gdb/symfile.h
--- a/gdb/symfile.h
+++ b/gdb/symfile.h
@@ -269,6 +269,11 @@ extern void set_initial_language (void);
extern gdb_bfd_ref_ptr symfile_bfd_open (const char *);
+/* Like symfile_bfd_open, but will not throw an exception on error.
+ Instead, it issues a warning and returns nullptr. */
+
+extern gdb_bfd_ref_ptr symfile_bfd_open_no_error (const char *) noexcept;
+
extern int get_section_index (struct objfile *, const char *);
extern int print_symbol_loading_p (int from_tty, int mainline, int full);
++++++ gdb-fix-segfault-in-for_each_block-part-1.patch ++++++
++++ 646 lines (skipped)
++++++ gdb-fix-segfault-in-for_each_block-part-2.patch ++++++
From 1cd845ab3d405412aabf9b959aa527dd60143826 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Thu, 2 Nov 2023 14:51:02 +0100
Subject: [PATCH] [gdb] Fix segfault in for_each_block, part 2
The previous commit describes PR gdb/30547, a segfault when running test-case
gdb.base/vfork-follow-parent.exp on powerpc64 (likewise on s390x).
The root cause for the segmentation fault is that linux_is_uclinux gives an
incorrect result: it returns true instead of false.
So, why does linux_is_uclinux:
...
int
linux_is_uclinux (void)
{
CORE_ADDR dummy;
return (target_auxv_search (AT_NULL, &dummy) > 0
&& target_auxv_search (AT_PAGESZ, &dummy) == 0);
...
return true?
This is because ppc_linux_target_wordsize returns 4 instead of 8, causing
ppc_linux_nat_target::auxv_parse to misinterpret the auxv vector.
So, why does ppc_linux_target_wordsize:
...
int
ppc_linux_target_wordsize (int tid)
{
int wordsize = 4;
/* Check for 64-bit inferior process. This is the case when the host is
64-bit, and in addition the top bit of the MSR register is set. */
long msr;
errno = 0;
msr = (long) ptrace (PTRACE_PEEKUSER, tid, PT_MSR * 8, 0);
if (errno == 0 && ppc64_64bit_inferior_p (msr))
wordsize = 8;
return wordsize;
}
...
return 4?
Specifically, we get this result because because tid == 0, so we get
errno == ESRCH.
The tid == 0 is caused by the switch_to_no_thread in
handle_vfork_child_exec_or_exit:
...
/* Switch to no-thread while running clone_program_space, so
that clone_program_space doesn't want to read the
selected frame of a dead process. */
scoped_restore_current_thread restore_thread;
switch_to_no_thread ();
inf->pspace = new program_space (maybe_new_address_space ());
...
but moving the maybe_new_address_space call to before that gives us the
same result. The tid is no longer 0, but we still get ESRCH because the
thread has exited.
Fix this in handle_vfork_child_exec_or_exit by doing the
maybe_new_address_space call in the context of the vfork parent.
Tested on top of trunk on x86_64-linux and ppc64le-linux.
Tested on top of gdb-14-branch on ppc64-linux.
Co-Authored-By: Simon Marchi <simon.marchi(a)polymtl.ca>
PR gdb/30547
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30547
---
gdb/infrun.c | 16 +++++++++++-----
gdb/nat/ppc-linux.c | 2 ++
gdb/ppc-linux-nat.c | 2 ++
gdb/s390-linux-nat.c | 5 ++++-
4 files changed, 19 insertions(+), 6 deletions(-)
diff --git a/gdb/infrun.c b/gdb/infrun.c
index 9c1b1f04e4d..c078098a6f8 100644
--- a/gdb/infrun.c
+++ b/gdb/infrun.c
@@ -1014,13 +1014,19 @@ handle_vfork_child_exec_or_exit (int exec)
go ahead and create a new one for this exiting
inferior. */
- /* Switch to no-thread while running clone_program_space, so
- that clone_program_space doesn't want to read the
- selected frame of a dead process. */
scoped_restore_current_thread restore_thread;
- switch_to_no_thread ();
- inf->pspace = new program_space (maybe_new_address_space ());
+ /* Temporarily switch to the vfork parent, to facilitate ptrace
+ calls done during maybe_new_address_space. */
+ switch_to_thread (any_live_thread_of_inferior (vfork_parent));
+ address_space *aspace = maybe_new_address_space ();
+
+ /* Switch back to the vfork child inferior. Switch to no-thread
+ while running clone_program_space, so that clone_program_space
+ doesn't want to read the selected frame of a dead process. */
+ switch_to_inferior_no_thread (inf);
+
+ inf->pspace = new program_space (aspace);
inf->aspace = inf->pspace->aspace;
set_current_program_space (inf->pspace);
inf->removable = true;
diff --git a/gdb/nat/ppc-linux.c b/gdb/nat/ppc-linux.c
index 0957d1b58a7..74549754806 100644
--- a/gdb/nat/ppc-linux.c
+++ b/gdb/nat/ppc-linux.c
@@ -78,6 +78,8 @@ ppc64_64bit_inferior_p (long msr)
int
ppc_linux_target_wordsize (int tid)
{
+ gdb_assert (tid != 0);
+
int wordsize = 4;
/* Check for 64-bit inferior process. This is the case when the host is
diff --git a/gdb/ppc-linux-nat.c b/gdb/ppc-linux-nat.c
index d8a8fbdf706..500fb566bc1 100644
--- a/gdb/ppc-linux-nat.c
+++ b/gdb/ppc-linux-nat.c
@@ -1918,6 +1918,8 @@ ppc_linux_nat_target::auxv_parse (const gdb_byte **readptr,
const gdb_byte *endptr, CORE_ADDR *typep,
CORE_ADDR *valp)
{
+ gdb_assert (inferior_ptid != null_ptid);
+
int tid = inferior_ptid.lwp ();
if (tid == 0)
tid = inferior_ptid.pid ();
diff --git a/gdb/s390-linux-nat.c b/gdb/s390-linux-nat.c
index fc3917d30be..403f37d690d 100644
--- a/gdb/s390-linux-nat.c
+++ b/gdb/s390-linux-nat.c
@@ -949,10 +949,12 @@ s390_target_wordsize (void)
/* Check for 64-bit inferior process. This is the case when the host is
64-bit, and in addition bit 32 of the PSW mask is set. */
#ifdef __s390x__
+ int tid = s390_inferior_tid ();
+ gdb_assert (tid != 0);
long pswm;
errno = 0;
- pswm = (long) ptrace (PTRACE_PEEKUSER, s390_inferior_tid (), PT_PSWMASK, 0);
+ pswm = (long) ptrace (PTRACE_PEEKUSER, tid, PT_PSWMASK, 0);
if (errno == 0 && (pswm & 0x100000000ul) != 0)
wordsize = 8;
#endif
@@ -965,6 +967,7 @@ s390_linux_nat_target::auxv_parse (const gdb_byte **readptr,
const gdb_byte *endptr, CORE_ADDR *typep,
CORE_ADDR *valp)
{
+ gdb_assert (inferior_ptid != null_ptid);
int sizeof_auxv_field = s390_target_wordsize ();
enum bfd_endian byte_order = gdbarch_byte_order (target_gdbarch ());
const gdb_byte *ptr = *readptr;
base-commit: 59053f06bd94be51efacfa80f9a1f738e3e1ee9c
--
2.35.3
++++++ gdb-go-handle-v3-go_0-mangled-prefix.patch ++++++
From 6c9e159dbd1a35aafa134fcd52982174236a8dd9 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Thu, 5 Oct 2023 23:22:11 +0200
Subject: [PATCH 3/3] [gdb/go] Handle v3 go_0 mangled prefix
With gcc-10 we have:
...
(gdb) break package2.Foo^M
Breakpoint 2 at 0x402563: file package2.go, line 5.^M
(gdb) PASS: gdb.go/package.exp: setting breakpoint 1
...
but with gcc-11:
...
gdb) break package2.Foo^M
Function "package2.Foo" not defined.^M
Make breakpoint pending on future shared library load? (y or [n]) n^M
(gdb) FAIL: gdb.go/package.exp: gdb_breakpoint: set breakpoint at package2.Foo
...
In the gcc-10 case, though the exec contains dwarf, it's not used to set the
breakpoint (which is an independent problem, filed as PR go/30941), instead
the minimal symbol information is used.
The minimal symbol information changed between gcc-10 and gcc-11:
...
$ nm a.out.10 | grep Foo
000000000040370d T go.package2.Foo
0000000000404e50 R go.package2.Foo..f
$ nm a.out.11 | grep Foo
0000000000403857 T go_0package2.Foo
0000000000405030 R go_0package2.Foo..f
...
A new v3 mangling scheme was used. The mangling schemes define a separator
character and mangling character:
- for v2, dot is used both as separator character and mangling character, and
- for v3, dot is used as separator character and underscore as mangling
character.
For more details, see [1] and [2].
In v3, "_0" demangles to ".". [ See gcc commit a01dda3c23b ("compiler, libgo:
change mangling scheme"), function Special_char_code::Special_char_code. ]
Handle the new go_0 prefix in unpack_mangled_go_symbol, which fixes the
test-case.
Note that this doesn't fix this regression:
...
$ gccgo-10 package2.go -c -g0
$ gccgo-10 package1.go package2.o -g0
$ gdb -q -batch a.out -ex "break go.package2.Foo"
Breakpoint 1 at 0x40370d
$ gccgo-11 package2.go -c -g0
$ gccgo-11 package1.go package2.o -g0
$ gdb -q -batch a.out -ex "break go.package2.Foo"
Function "go.package2.Foo" not defined.
...
With gcc-10, we set a breakpoint on the mangled minimal symbol. That
one has simply changed for gcc-11, so it's equivalent to using:
...
$ gdb -q -batch a.out -ex "break go_0package2.Foo"
Breakpoint 1 at 0x403857
...
which does work.
Tested on x86_64-linux:
- openSUSE Leap 15.4, using gccgo-7,
- openSUSE Tumbleweed, using gccgo-13.
PR go/27238
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=27238
[1] https://go-review.googlesource.com/c/gofrontend/+/271726
[2] https://github.com/golang/go/issues/41862#issuecomment-707244103
---
gdb/go-lang.c | 30 +++++++++++++++++++++++++++---
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/gdb/go-lang.c b/gdb/go-lang.c
index f9176ace71d..8a5568f56e0 100644
--- a/gdb/go-lang.c
+++ b/gdb/go-lang.c
@@ -233,16 +233,28 @@ unpack_mangled_go_symbol (const char *mangled_name,
libgo_.*: used by gccgo's runtime
Thus we don't support -fgo-prefix (except as used by the runtime). */
- if (!startswith (mangled_name, "go.")
- && !startswith (mangled_name, "libgo_"))
+ bool v3;
+ if (startswith (mangled_name, "go_0"))
+ /* V3 mangling detected, see
+ https://go-review.googlesource.com/c/gofrontend/+/271726 . */
+ v3 = true;
+ else if (startswith (mangled_name, "go.")
+ || startswith (mangled_name, "libgo_"))
+ v3 = false;
+ else
return NULL;
/* Quick check for whether a search may be fruitful. */
/* Ignore anything with @plt, etc. in it. */
if (strchr (mangled_name, '@') != NULL)
return NULL;
+
/* It must have at least two dots. */
- first_dot = strchr (mangled_name, '.');
+ if (v3)
+ first_dot = strchr (mangled_name, '0');
+ else
+ first_dot = strchr (mangled_name, '.');
+
if (first_dot == NULL)
return NULL;
/* Treat "foo.bar" as unmangled. It can collide with lots of other
@@ -263,6 +275,18 @@ unpack_mangled_go_symbol (const char *mangled_name,
gdb::unique_xmalloc_ptr<char> result = make_unique_xstrdup (mangled_name);
buf = result.get ();
+ if (v3)
+ {
+ /* Replace "go_0" with "\0go.". */
+ buf[0] = '\0';
+ buf[1] = 'g';
+ buf[2] = 'o';
+ buf[3] = '.';
+
+ /* Skip the '\0'. */
+ buf++;
+ }
+
/* Search backwards looking for "N<digit(s)>". */
p = buf + len;
saw_digit = method_type = NULL;
--
2.35.3
++++++ gdb-rhbz1773651-gdb-index-internal-error.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb(a)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(a)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);
++++++ gdb-rhbz2160211-excessive-core-file-warnings.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb(a)redhat.com>
Date: Thu, 29 Jun 2023 18:20:30 -0700
Subject: gdb-rhbz2160211-excessive-core-file-warnings.patch
;; Backport two commits, 0ad504dd464 and ea70f941f9b, from Lancelot SIX
;; which prevent repeated warnings from being printed while loading a
;; core file. (RH BZ 2160211)
gdb/corelow.c: avoid repeated warnings in build_file_mappings
When GDB opens a coredump it tries to locate and then open all files
which were mapped in the process.
If a file is found but cannot be opened with BFD (bfd_open /
bfd_check_format fails), then a warning is printed to the user. If the
same file was mapped multiple times in the process's address space, the
warning is printed once for each time the file was mapped. I find this
un-necessarily noisy.
This patch makes it so the warning message is printed only once per
file.
There was a comment in the code assuming that if the file was found on
the system, opening it (bfd_open + bfd_check_format) should always
succeed. A recent change in BFD (014a602b86f "Don't optimise bfd_seek
to same position") showed that this assumption is not valid. For
example, it is possible to have a core dump of a process which had
mmaped an IO page from a DRI render node (/dev/dri/runderD$NUM). In
such case the core dump does contain the information that portions of
this special file were mapped in the host process, but trying to seek to
position 0 will fail, making bfd_check_format fail. This patch removes
this comment.
Reviewed-By: John Baldwin <jhb(a)FreeBSD.org>
Approved-By: Andrew Burgess <aburgess(a)redhat.com>
gdb/corelow.c: do not try to reopen a file if open failed once
In the current implementation, core_target::build_file_mappings will try
to locate and open files which were mapped in the process for which the
core dump was produced. If the file cannot be found or cannot be
opened, GDB will re-try to open it once for each time it was mapped in
the process's address space.
This patch makes it so GDB recognizes that it has already failed to open
a given file once and does not re-try the process for each mapping.
Reviewed-By: John Baldwin <jhb(a)FreeBSD.org>
Approved-By: Andrew Burgess <aburgess(a)redhat.com>
diff --git a/gdb/corelow.c b/gdb/corelow.c
--- a/gdb/corelow.c
+++ b/gdb/corelow.c
@@ -237,6 +237,16 @@ core_target::build_file_mappings ()
weed out non-file-backed mappings. */
gdb_assert (filename != nullptr);
+ if (unavailable_paths.find (filename) != unavailable_paths.end ())
+ {
+ /* We have already seen some mapping for FILENAME but failed to
+ find/open the file. There is no point in trying the same
+ thing again so just record that the range [start, end) is
+ unavailable. */
+ m_core_unavailable_mappings.emplace_back (start, end - start);
+ return;
+ }
+
struct bfd *bfd = bfd_map[filename];
if (bfd == nullptr)
{
@@ -254,11 +264,10 @@ core_target::build_file_mappings ()
if (expanded_fname == nullptr)
{
m_core_unavailable_mappings.emplace_back (start, end - start);
- /* Print just one warning per path. */
- if (unavailable_paths.insert (filename).second)
- warning (_("Can't open file %s during file-backed mapping "
- "note processing"),
- filename);
+ unavailable_paths.insert (filename);
+ warning (_("Can't open file %s during file-backed mapping "
+ "note processing"),
+ filename);
return;
}
@@ -268,18 +277,11 @@ core_target::build_file_mappings ()
if (bfd == nullptr || !bfd_check_format (bfd, bfd_object))
{
m_core_unavailable_mappings.emplace_back (start, end - start);
- /* If we get here, there's a good chance that it's due to
- an internal error. We issue a warning instead of an
- internal error because of the possibility that the
- file was removed in between checking for its
- existence during the expansion in exec_file_find()
- and the calls to bfd_openr() / bfd_check_format().
- Output both the path from the core file note along
- with its expansion to make debugging this problem
- easier. */
+ unavailable_paths.insert (filename);
warning (_("Can't open file %s which was expanded to %s "
"during file-backed mapping note processing"),
filename, expanded_fname.get ());
+
if (bfd != nullptr)
bfd_close (bfd);
return;
++++++ gdb-rhbz2192105-ftbs-dangling-pointer ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Kevin Buettner <kevinb(a)redhat.com>
Date: Wed, 3 May 2023 11:28:24 -0700
Subject: gdb-rhbz2192105-ftbs-dangling-pointer
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
;; Backport upstream patch fixing a "dangling pointer" build problem
;; first seen when building with GCC 13.1.1 20230426 (Red Hat ;; 13.1.1-1).
Pass const frame_info_ptr reference for skip_[language_]trampoline
g++ 13.1.1 produces a -Werror=dangling-pointer=
In file included from ../../binutils-gdb/gdb/frame.h:75,
from ../../binutils-gdb/gdb/symtab.h:40,
from ../../binutils-gdb/gdb/language.c:33:
In member function ‘void intrusive_list<T, AsNode>::push_empty(T&) [with T = frame_info_ptr; AsNode = intrusive_base_node<frame_info_ptr>]’,
inlined from ‘void intrusive_list<T, AsNode>::push_back(reference) [with T = frame_info_ptr; AsNode = intrusive_base_node<frame_info_ptr>]’ at gdbsupport/intrusive_list.h:332:24,
inlined from ‘frame_info_ptr::frame_info_ptr(const frame_info_ptr&)’ at gdb/frame.h:241:26,
inlined from ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’ at gdb/language.c:530:49:
gdbsupport/intrusive_list.h:415:12: error: storing the address of local variable ‘<anonymous>’ in ‘frame_info_ptr::frame_list.intrusive_list<frame_info_ptr>::m_back’ [-Werror=dangling-pointer=]
415 | m_back = &elem;
| ~~~~~~~^~~~~~~
gdb/language.c: In function ‘CORE_ADDR skip_language_trampoline(frame_info_ptr, CORE_ADDR)’:
gdb/language.c:530:49: note: ‘<anonymous>’ declared here
530 | CORE_ADDR real_pc = lang->skip_trampoline (frame, pc);
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
gdb/frame.h:359:41: note: ‘frame_info_ptr::frame_list’ declared here
359 | static intrusive_list<frame_info_ptr> frame_list;
| ^~~~~~~~~~
Each new frame_info_ptr is being pushed on a static frame list and g++
cannot see why that is safe in case the frame_info_ptr is created and
destroyed immediately when passed as value.
It isn't clear why only in this one place g++ sees the issue (probably
because it can inline enough code in this specific case).
Since passing the frame_info_ptr as const reference is cheaper, use
that as workaround for this warning.
PR build/30413
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30413
Tested-by: Kevin Buettner <kevinb(a)redhat.com>
Reviewed-by: Kevin Buettner <kevinb(a)redhat.com>
Reviewed-by: Tom Tromey <tom(a)tromey.com>
diff --git a/gdb/c-lang.c b/gdb/c-lang.c
--- a/gdb/c-lang.c
+++ b/gdb/c-lang.c
@@ -1003,7 +1003,7 @@ class cplus_language : public language_defn
/* See language.h. */
- CORE_ADDR skip_trampoline (frame_info_ptr fi,
+ CORE_ADDR skip_trampoline (const frame_info_ptr &fi,
CORE_ADDR pc) const override
{
return cplus_skip_trampoline (fi, pc);
diff --git a/gdb/language.c b/gdb/language.c
--- a/gdb/language.c
+++ b/gdb/language.c
@@ -528,7 +528,7 @@ add_set_language_command ()
Return the result from the first that returns non-zero, or 0 if all
`fail'. */
CORE_ADDR
-skip_language_trampoline (frame_info_ptr frame, CORE_ADDR pc)
+skip_language_trampoline (const frame_info_ptr &frame, CORE_ADDR pc)
{
for (const auto &lang : language_defn::languages)
{
diff --git a/gdb/language.h b/gdb/language.h
--- a/gdb/language.h
+++ b/gdb/language.h
@@ -471,7 +471,7 @@ struct language_defn
If that PC falls in a trampoline belonging to this language, return
the address of the first pc in the real function, or 0 if it isn't a
language tramp for this language. */
- virtual CORE_ADDR skip_trampoline (frame_info_ptr fi, CORE_ADDR pc) const
+ virtual CORE_ADDR skip_trampoline (const frame_info_ptr &fi, CORE_ADDR pc) const
{
return (CORE_ADDR) 0;
}
@@ -789,7 +789,7 @@ extern const char *language_str (enum language);
/* Check for a language-specific trampoline. */
-extern CORE_ADDR skip_language_trampoline (frame_info_ptr, CORE_ADDR pc);
+extern CORE_ADDR skip_language_trampoline (const frame_info_ptr &, CORE_ADDR pc);
/* Return demangled language symbol, or NULL. */
extern gdb::unique_xmalloc_ptr<char> language_demangle
diff --git a/gdb/objc-lang.c b/gdb/objc-lang.c
--- a/gdb/objc-lang.c
+++ b/gdb/objc-lang.c
@@ -282,7 +282,7 @@ class objc_language : public language_defn
/* See language.h. */
- CORE_ADDR skip_trampoline (frame_info_ptr frame,
+ CORE_ADDR skip_trampoline (const frame_info_ptr &frame,
CORE_ADDR stop_pc) const override
{
struct gdbarch *gdbarch = get_frame_arch (frame);
++++++ gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: Andrew Burgess <aburgess(a)redhat.com>
Date: Tue, 20 Jun 2023 09:46:35 +0100
Subject: gdb-rhbz2196395-debuginfod-legacy-openssl-crash.patch
;; Backport upstream commit f3eee5861743d635 to fix a crash triggered
;; when debuginfod makes use of particular openssl settings.
gdb/debuginfod: cleanup debuginfod earlier
A GDB crash was discovered on Fedora GDB that was tracked back to an
issue with the way that debuginfod is cleaned up.
The bug was reported on Fedora 37, 38, and 39. Here are the steps to
reproduce:
1. The file /etc/ssl/openssl.cnf contains the following lines:
[provider_sect]
default = default_sect
##legacy = legacy_sect
##
[default_sect]
activate = 1
##[legacy_sect]
##activate = 1
The bug will occur when the '##' characters are removed so that the
lines in question look like this:
[provider_sect]
default = default_sect
legacy = legacy_sect
[default_sect]
activate = 1
[legacy_sect]
activate = 1
2. Clean up any existing debuginfod cache data:
> rm -rf $HOME/.cache/debuginfod_client
3. Run GDB:
> gdb -nx -q -iex 'set trace-commands on' \
-iex 'set debuginfod enabled on' \
-iex 'set confirm off' \
-ex 'start' -ex 'quit' /bin/ls
+set debuginfod enabled on
+set confirm off
Reading symbols from /bin/ls...
Downloading separate debug info for /usr/bin/ls
... snip ...
Temporary breakpoint 1, main (argc=1, argv=0x7fffffffde38) at ../src/ls.c:1646
1646 {
+quit
Fatal signal: Segmentation fault
----- Backtrace -----
... snip ...
So GDB ends up crashing during exit.
What's happening is that when debuginfod is initialised
debuginfod_begin is called (this is in the debuginfod library), this
in turn sets up libcurl, which makes use of openssl. Somewhere during
this setup process an at_exit function is registered to cleanup some
state.
Back in GDB the debuginfod_client object is managed using this code:
/* Deleter for a debuginfod_client. */
struct debuginfod_client_deleter
{
void operator() (debuginfod_client *c)
{
debuginfod_end (c);
}
};
using debuginfod_client_up
= std::unique_ptr<debuginfod_client, debuginfod_client_deleter>;
And then a global debuginfod_client_up is created to hold a pointer to
the debuginfod_client object. As a global this will be cleaned up
using the standard C++ global object destructor mechanism, which is
run after the at_exit handlers.
However, it is expected that when debuginfod_end is called the
debuginfod_client object will still be in a usable state, that is, we
don't expect the at_exit handlers to have run and started cleaning up
the library state.
To fix this issue we need to ensure that debuginfod_end is called
before the at_exit handlers have a chance to run.
This commit removes the debuginfod_client_up type, and instead has GDB
hold a raw pointer to the debuginfod_client object. We then make use
of GDB's make_final_cleanup to register a function that will call
debuginfod_end.
As GDB's final cleanups are called before exit is called, this means
that debuginfod_end will be called before the at_exit handlers are
called, and the crash identified above is resolved.
It's not obvious how this issue can easily be tested for. The bug does
not appear to manifest when using a local debuginfod server, so we'd
need to setup something more involved. For now I'm proposing this
patch without any associated tests.
diff --git a/gdb/debuginfod-support.c b/gdb/debuginfod-support.c
--- a/gdb/debuginfod-support.c
+++ b/gdb/debuginfod-support.c
@@ -96,20 +96,6 @@ struct user_data
ui_out::progress_update progress;
};
-/* Deleter for a debuginfod_client. */
-
-struct debuginfod_client_deleter
-{
- void operator() (debuginfod_client *c)
- {
- debuginfod_end (c);
- }
-};
-
-using debuginfod_client_up
- = std::unique_ptr<debuginfod_client, debuginfod_client_deleter>;
-
-
/* Convert SIZE into a unit suitable for use with progress updates.
SIZE should in given in bytes and will be converted into KB, MB, GB
or remain unchanged. UNIT will be set to "B", "KB", "MB" or "GB"
@@ -180,20 +166,45 @@ progressfn (debuginfod_client *c, long cur, long total)
return 0;
}
+/* Cleanup ARG, which is a debuginfod_client pointer. */
+
+static void
+cleanup_debuginfod_client (void *arg)
+{
+ debuginfod_client *client = static_cast<debuginfod_client *> (arg);
+ debuginfod_end (client);
+}
+
+/* Return a pointer to the single global debuginfod_client, initialising it
+ first if needed. */
+
static debuginfod_client *
get_debuginfod_client ()
{
- static debuginfod_client_up global_client;
+ static debuginfod_client *global_client = nullptr;
if (global_client == nullptr)
{
- global_client.reset (debuginfod_begin ());
+ global_client = debuginfod_begin ();
if (global_client != nullptr)
- debuginfod_set_progressfn (global_client.get (), progressfn);
+ {
+ /* It is important that we cleanup the debuginfod_client object
+ before calling exit. Some of the libraries used by debuginfod
+ make use of at_exit handlers to perform cleanup.
+
+ If we wrapped the debuginfod_client in a unique_ptr and relied
+ on its destructor to cleanup then this would be run as part of
+ the global C++ object destructors, which is after the at_exit
+ handlers, which is too late.
+
+ So instead, we make use of GDB's final cleanup mechanism. */
+ make_final_cleanup (cleanup_debuginfod_client, global_client);
+ debuginfod_set_progressfn (global_client, progressfn);
+ }
}
- return global_client.get ();
+ return global_client;
}
/* Check if debuginfod is enabled. If configured to do so, ask the user
++++++ gdb-rhbz2233961-CVE-2022-4806.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova(a)redhat.com>
Date: Thu, 21 Sep 2023 18:52:49 +0200
Subject: gdb-rhbz2233961-CVE-2022-4806.patch
;; Backport PR29922, SHT_NOBITS section
;; avoids section size sanity check.
PR29922, SHT_NOBITS section avoids section size sanity check
PR 29922
* dwarf2.c (find_debug_info): Ignore sections without
SEC_HAS_CONTENTS.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4831,16 +4831,19 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
{
look = debug_sections[debug_info].uncompressed_name;
msec = bfd_get_section_by_name (abfd, look);
- if (msec != NULL)
+ /* Testing SEC_HAS_CONTENTS is an anti-fuzzer measure. Of
+ course debug sections always have contents. */
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
return msec;
look = debug_sections[debug_info].compressed_name;
msec = bfd_get_section_by_name (abfd, look);
- if (msec != NULL)
+ if (msec != NULL && (msec->flags & SEC_HAS_CONTENTS) != 0)
return msec;
for (msec = abfd->sections; msec != NULL; msec = msec->next)
- if (startswith (msec->name, GNU_LINKONCE_INFO))
+ if ((msec->flags & SEC_HAS_CONTENTS) != 0
+ && startswith (msec->name, GNU_LINKONCE_INFO))
return msec;
return NULL;
@@ -4848,6 +4851,9 @@ find_debug_info (bfd *abfd, const struct dwarf_debug_section *debug_sections,
for (msec = after_sec->next; msec != NULL; msec = msec->next)
{
+ if ((msec->flags & SEC_HAS_CONTENTS) == 0)
+ continue;
+
look = debug_sections[debug_info].uncompressed_name;
if (strcmp (msec->name, look) == 0)
return msec;
++++++ gdb-rhbz2233965-memory-leak.patch ++++++
From FEDORA_PATCHES Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Alexandra=20H=C3=A1jkov=C3=A1?= <ahajkova(a)redhat.com>
Date: Sat, 14 Oct 2023 12:37:50 +0200
Subject: gdb-rhbz2233965-memory-leak.patch
;; Backport PR29925, Memory leak in find_abstract_instance
PR29925, Memory leak in find_abstract_instance
The testcase in the PR had a variable with both DW_AT_decl_file and
DW_AT_specification, where the DW_AT_specification also specified
DW_AT_decl_file. This leads to a memory leak as the file name is
malloced and duplicates are not expected.
I've also changed find_abstract_instance to not use a temp for "name",
because that can result in a change in behaviour from the usual last
of duplicate attributes wins.
PR 29925
* dwarf2.c (find_abstract_instance): Delete "name" variable.
Free *filename_ptr before assigning new file name.
(scan_unit_for_symbols): Similarly free func->file and
var->file before assigning.
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -3441,7 +3441,6 @@ find_abstract_instance (struct comp_unit *unit,
struct abbrev_info *abbrev;
uint64_t die_ref = attr_ptr->u.val;
struct attribute attr;
- const char *name = NULL;
if (recur_count == 100)
{
@@ -3602,9 +3601,9 @@ find_abstract_instance (struct comp_unit *unit,
case DW_AT_name:
/* Prefer DW_AT_MIPS_linkage_name or DW_AT_linkage_name
over DW_AT_name. */
- if (name == NULL && is_str_form (&attr))
+ if (*pname == NULL && is_str_form (&attr))
{
- name = attr.u.str;
+ *pname = attr.u.str;
if (mangle_style (unit->lang) == 0)
*is_linkage = true;
}
@@ -3612,7 +3611,7 @@ find_abstract_instance (struct comp_unit *unit,
case DW_AT_specification:
if (is_int_form (&attr)
&& !find_abstract_instance (unit, &attr, recur_count + 1,
- &name, is_linkage,
+ pname, is_linkage,
filename_ptr, linenumber_ptr))
return false;
break;
@@ -3622,7 +3621,7 @@ find_abstract_instance (struct comp_unit *unit,
non-string forms into these attributes. */
if (is_str_form (&attr))
{
- name = attr.u.str;
+ *pname = attr.u.str;
*is_linkage = true;
}
break;
@@ -3630,8 +3629,11 @@ find_abstract_instance (struct comp_unit *unit,
if (!comp_unit_maybe_decode_line_info (unit))
return false;
if (is_int_form (&attr))
- *filename_ptr = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (*filename_ptr);
+ *filename_ptr = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:
if (is_int_form (&attr))
@@ -3643,7 +3645,6 @@ find_abstract_instance (struct comp_unit *unit,
}
}
}
- *pname = name;
return true;
}
@@ -4139,8 +4140,11 @@ scan_unit_for_symbols (struct comp_unit *unit)
case DW_AT_decl_file:
if (is_int_form (&attr))
- func->file = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (func->file);
+ func->file = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:
@@ -4182,8 +4186,11 @@ scan_unit_for_symbols (struct comp_unit *unit)
case DW_AT_decl_file:
if (is_int_form (&attr))
- var->file = concat_filename (unit->line_table,
- attr.u.val);
+ {
+ free (var->file);
+ var->file = concat_filename (unit->line_table,
+ attr.u.val);
+ }
break;
case DW_AT_decl_line:
++++++ gdb-support-rseq-auxvs.patch ++++++
From 1bbcd2144710c4b1daa9c404df0ebc80c3461747 Mon Sep 17 00:00:00 2001
From: Ilya Leoshkevich <iii(a)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
++++++ gdb-symtab-add-optimized-out-static-var-to-cooked-in.patch ++++++
From 7f4601b0a51f400bd1b1bc0f7895254d467e3bb4 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Fri, 21 Jul 2023 08:25:25 +0200
Subject: [PATCH] [gdb/symtab] Add optimized out static var to cooked index
Consider the test-case:
...
$ cat main.c
int main (void) { return 0; }
$ cat static-optimized-out.c
static int aaa;
...
compiled like this:
...
$ gcc-12 static-optimized-out.c main.c -g -O2 -flto
...
There's a difference in behaviour depending on symtab expansion state:
...
$ gdb -q -batch a.out -ex "print aaa"
No symbol "aaa" in current context.
$ gdb -q -batch a.out -ex "maint expand-symtab" -ex "print aaa"
$1 = <optimized out>
...
The reason for the difference is that the optimized out variable aaa:
...
<1><104>: Abbrev Number: 2 (DW_TAG_variable)
<105> DW_AT_name : aaa
<109> DW_AT_decl_file : 1
<10a> DW_AT_decl_line : 18
<10b> DW_AT_decl_column : 12
<10c> DW_AT_type : <0x110>
...
is not added to the cooked index because of this clause in abbrev_table::read:
...
else if (!has_location && !has_specification_or_origin && !has_external
&& cur_abbrev->tag == DW_TAG_variable)
cur_abbrev->interesting = false;
...
Fix this inconsistency by making sure that the optimized out variable is added
to the cooked index.
Regression tested on x86_64-linux.
Add two test-cases, a C test-case gdb.opt/static-optimized-out.exp and a dwarf
assembly test-case gdb.dwarf2/static-optimized-out.exp.
Tested gdb.opt/static-optimized-out.exp with gcc-8 to gcc-12, for which we now
consistently get:
...
(gdb) print aaa^M
$1 = <optimized out>^M
...
and with gcc 7.5.0 and clang 13.0.1, for which we still consistently get:
...
(gdb) print aaa^M
No symbol "aaa" in current context.^M
...
due to missing debug info for the variable.
PR symtab/30656
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30656
Approved-By: Tom Tromey <tom(a)tromey.com>
---
gdb/dwarf2/abbrev.c | 9 ---
.../gdb.dwarf2/static-optimized-out.exp | 69 +++++++++++++++++++
gdb/testsuite/gdb.opt/main.c | 22 ++++++
gdb/testsuite/gdb.opt/static-optimized-out.c | 18 +++++
.../gdb.opt/static-optimized-out.exp | 49 +++++++++++++
5 files changed, 158 insertions(+), 9 deletions(-)
create mode 100644 gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
create mode 100644 gdb/testsuite/gdb.opt/main.c
create mode 100644 gdb/testsuite/gdb.opt/static-optimized-out.c
create mode 100644 gdb/testsuite/gdb.opt/static-optimized-out.exp
diff --git a/gdb/dwarf2/abbrev.c b/gdb/dwarf2/abbrev.c
index 1ebf8f6eed5..3a429fd41b1 100644
--- a/gdb/dwarf2/abbrev.c
+++ b/gdb/dwarf2/abbrev.c
@@ -162,7 +162,6 @@ abbrev_table::read (struct dwarf2_section_info *section,
bool has_specification_or_origin = false;
bool has_name = false;
bool has_linkage_name = false;
- bool has_location = false;
bool has_external = false;
/* Now read in declarations. */
@@ -217,11 +216,6 @@ abbrev_table::read (struct dwarf2_section_info *section,
has_linkage_name = true;
break;
- case DW_AT_const_value:
- case DW_AT_location:
- has_location = true;
- break;
-
case DW_AT_sibling:
if (is_csize && cur_attr.form == DW_FORM_ref4)
sibling_offset = size;
@@ -296,9 +290,6 @@ abbrev_table::read (struct dwarf2_section_info *section,
cur_abbrev->interesting = false;
else if (!tag_interesting_for_index (cur_abbrev->tag))
cur_abbrev->interesting = false;
- else if (!has_location && !has_specification_or_origin && !has_external
- && cur_abbrev->tag == DW_TAG_variable)
- cur_abbrev->interesting = false;
else
cur_abbrev->interesting = true;
diff --git a/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
new file mode 100644
index 00000000000..1547a8acbc0
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/static-optimized-out.exp
@@ -0,0 +1,69 @@
+# 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 an optimized out static variable is printed the same independent
+# of state of symtab expansion. See also gdb.opt/static-optimized-out.exp.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if { ![dwarf2_support] } {
+ return 0
+}
+
+standard_testfile main.c -dw.S
+
+# Make DWARF for the test.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+ cu {} {
+ compile_unit {
+ {
+ language @DW_LANG_C
+ }
+ } {
+ declare_labels integer_label
+
+ integer_label: DW_TAG_base_type {
+ {DW_AT_byte_size 4 DW_FORM_sdata}
+ {DW_AT_encoding @DW_ATE_signed}
+ {DW_AT_name integer}
+ }
+
+ DW_TAG_variable {
+ {name var}
+ {type :$integer_label}
+ }
+ }
+ }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+ [list $srcfile $asm_file] {nodebug}] } {
+ return -1
+}
+
+gdb_test "print var" " = <optimized out>"
+
+# Expand all symbol tables.
+gdb_test_no_output "maint expand-symtabs"
+
+# Make sure we do an actual lookup rather than just returning the same as
+# before.
+gdb_test_no_output "maint flush symbol-cache"
+
+with_test_prefix "after expand-symtabs" {
+ gdb_test "print var" " = <optimized out>"
+}
diff --git a/gdb/testsuite/gdb.opt/main.c b/gdb/testsuite/gdb.opt/main.c
new file mode 100644
index 00000000000..c6beff77dbe
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/main.c
@@ -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;
+}
diff --git a/gdb/testsuite/gdb.opt/static-optimized-out.c b/gdb/testsuite/gdb.opt/static-optimized-out.c
new file mode 100644
index 00000000000..44287fbd6d2
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/static-optimized-out.c
@@ -0,0 +1,18 @@
+/* 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/>. */
+
+static int aaa;
diff --git a/gdb/testsuite/gdb.opt/static-optimized-out.exp b/gdb/testsuite/gdb.opt/static-optimized-out.exp
new file mode 100644
index 00000000000..bd673b6503e
--- /dev/null
+++ b/gdb/testsuite/gdb.opt/static-optimized-out.exp
@@ -0,0 +1,49 @@
+# 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 an optimized out static variable is printed the same independent
+# of state of symtab expansion. See also gdb.dwarf2/static-optimized-out.exp.
+
+standard_testfile .c main.c
+
+set opts {}
+lappend opts debug
+lappend opts "optimize=-O2 -flto"
+
+if { [prepare_for_testing "failed to prepare" $testfile \
+ [list $srcfile $srcfile2] $opts] } {
+ return -1
+}
+
+set val ""
+gdb_test_multiple "print aaa" "" {
+ -re -wrap "\r\n(?:\\$$decimal = )?(\[^\r\n\]*)" {
+ set val $expect_out(1,string)
+ }
+}
+
+if { $val == "" } {
+ return
+}
+
+# Expand all symbol tables.
+gdb_test_no_output "maint expand-symtab"
+
+# Make sure we do an actual lookup rather than just returning the same as
+# before.
+gdb_test_no_output "maint flush symbol-cache"
+
+# Now check that we get the same result in both cases.
+gdb_test "print aaa" [string_to_regexp $val] "consistency"
base-commit: 800c393f89a94f49b01dff99f693cb13c5e28116
--
2.35.3
++++++ gdb-symtab-add-producer_is_gas.patch ++++++
From aa8ba17b9a3fdfeeb65df4c3e0731a0e9e96cbf7 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Wed, 1 Nov 2023 00:33:12 +0100
Subject: [PATCH 1/2] [gdb/symtab] Add producer_is_gas
Add producer_is_gas, a generic way to get the gas version from the
producer string.
Tested on x86_64-linux.
---
gdb/dwarf2/read.c | 4 ++--
gdb/producer.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++
gdb/producer.h | 5 +++++
3 files changed, 63 insertions(+), 2 deletions(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 970dd54c7a5..472684a5817 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -13376,8 +13376,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 if (producer_is_gas (cu->producer, &major, &minor))
+ cu->producer_is_gas_2_39 = major == 2 && minor == 39;
else
{
/* For other non-GCC compilers, expect their behavior is DWARF version
diff --git a/gdb/producer.c b/gdb/producer.c
index 9fcf749e3d4..cd83dfce128 100644
--- a/gdb/producer.c
+++ b/gdb/producer.c
@@ -81,6 +81,45 @@ producer_is_gcc (const char *producer, int *major, int *minor)
/* See producer.h. */
+bool
+producer_is_gas (const char *producer, int *major, int *minor)
+{
+ if (producer == nullptr)
+ {
+ /* No producer, don't know. */
+ return false;
+ }
+
+ /* Detect prefix. */
+ const char prefix[] = "GNU AS ";
+ if (!startswith (producer, prefix))
+ {
+ /* Producer is not gas. */
+ return false;
+ }
+
+ /* Skip prefix. */
+ const char *cs = &producer[strlen (prefix)];
+
+ /* Ensure that major/minor are not nullptrs. */
+ int maj, min;
+ if (major == nullptr)
+ major = &maj;
+ if (minor == nullptr)
+ minor = &min;
+
+ int scanned = sscanf (cs, "%d.%d", major, minor);
+ if (scanned != 2)
+ {
+ /* Unable to scan major/minor version. */
+ return false;
+ }
+
+ return true;
+}
+
+ /* See producer.h. */
+
bool
producer_is_icc_ge_19 (const char *producer)
{
@@ -251,6 +290,23 @@ Version 18.0 Beta";
SELF_CHECK (!producer_is_gcc (flang_llvm_exp, &major, &minor));
SELF_CHECK (producer_is_llvm (flang_llvm_exp));
}
+
+ {
+ static const char gas_exp[] = "GNU AS 2.39.0";
+ int major = 0, minor = 0;
+ SELF_CHECK (!producer_is_gcc (gas_exp, &major, &minor));
+ SELF_CHECK (producer_is_gas (gas_exp, &major, &minor));
+ SELF_CHECK (major == 2 && minor == 39);
+
+ static const char gas_incomplete_exp[] = "GNU AS ";
+ SELF_CHECK (!producer_is_gas (gas_incomplete_exp, &major, &minor));
+ SELF_CHECK (!producer_is_gcc (gas_incomplete_exp, &major, &minor));
+
+ static const char gas_incomplete_exp_2[] = "GNU AS 2";
+ SELF_CHECK (!producer_is_gas (gas_incomplete_exp_2, &major, &minor));
+ SELF_CHECK (!producer_is_gcc (gas_incomplete_exp_2, &major, &minor));
+ }
+
}
}
}
diff --git a/gdb/producer.h b/gdb/producer.h
index c915979b122..00718511775 100644
--- a/gdb/producer.h
+++ b/gdb/producer.h
@@ -30,6 +30,11 @@ extern int producer_is_gcc_ge_4 (const char *producer);
is NULL or it isn't GCC. */
extern int producer_is_gcc (const char *producer, int *major, int *minor);
+/* Returns nonzero if the given PRODUCER string is GAS and sets the MAJOR
+ and MINOR versions when not NULL. Returns zero if the given PRODUCER
+ is NULL or it isn't GAS. */
+bool producer_is_gas (const char *producer, int *major, int *minor);
+
/* Check for Intel compilers >= 19.0. */
extern bool producer_is_icc_ge_19 (const char *producer);
base-commit: 39553c1e285c426946188ec2a890c1c1cb933060
--
2.35.3
++++++ gdb-symtab-don-t-deduplicate-variables-in-gdb-index.patch ++++++
From 04d0d6ebdc6d08f5a7ec0d4c89eb1835deef54dc Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Sun, 13 Aug 2023 14:08:06 +0200
Subject: [PATCH] [gdb/symtab] Don't deduplicate variables in gdb-index
When running test-case gdb.python/py-symbol.exp with target board
cc-with-gdb-index, we run into:
...
(gdb) python print (len (gdb.lookup_static_symbols ('rr')))^M
1^M
(gdb) FAIL: gdb.python/py-symbol.exp: print (len (gdb.lookup_static_symbols ('rr')))
...
[ Note that the test-case contains rr in both py-symtab.c:
...
static int __attribute__ ((used)) rr = 42; /* line of rr */
...
and py-symtab-2.c:
...
static int __attribute__ ((used)) rr = 99; /* line of other rr */
... ]
This passes with gdb-12-branch, and fails with gdb-13-branch.
AFAIU the current code in symtab_index_entry::minimize makes the assumption
that it's fine to store only one copy of rr in the gdb-index, because
"print rr" will only ever print one, and always the same.
But that fails to recognize that gdb supports gdb.lookup_static_symbols, which
returns a list of variables rather than the first one.
In other words, the current approach breaks feature parity between cooked
index and gdb-index.
Note btw that also debug-names has both instances:
...
[ 5] #00597969 rr:
<4> DW_TAG_variable DW_IDX_compile_unit=3 DW_IDX_GNU_internal=1
<4> DW_TAG_variable DW_IDX_compile_unit=4 DW_IDX_GNU_internal=1
...
Fix this in symtab_index_entry::minimize, by not deduplicating variables.
Tested on x86_64-linux, with target boards unix and cc-with-gdb-index.
Reviewed-by: Kevin Buettner <kevinb(a)redhat.com>
PR symtab/30720
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30720
---
gdb/dwarf2/index-write.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/gdb/dwarf2/index-write.c b/gdb/dwarf2/index-write.c
index d10583568c0..ea67f73ac3c 100644
--- a/gdb/dwarf2/index-write.c
+++ b/gdb/dwarf2/index-write.c
@@ -294,7 +294,7 @@ symtab_index_entry::minimize ()
auto from = std::unique (cu_indices.begin (), cu_indices.end ());
cu_indices.erase (from, cu_indices.end ());
- /* We don't want to enter a variable or type more than once, so
+ /* We don't want to enter a type more than once, so
remove any such duplicates from the list as well. When doing
this, we want to keep the entry from the first CU -- but this is
implicit due to the sort. This choice is done because it's
@@ -304,8 +304,7 @@ symtab_index_entry::minimize ()
[&] (offset_type val)
{
gdb_index_symbol_kind kind = GDB_INDEX_SYMBOL_KIND_VALUE (val);
- if (kind != GDB_INDEX_SYMBOL_KIND_TYPE
- && kind != GDB_INDEX_SYMBOL_KIND_VARIABLE)
+ if (kind != GDB_INDEX_SYMBOL_KIND_TYPE)
return false;
val &= ~GDB_INDEX_CU_MASK;
base-commit: 2521ac7ed0c495b9e804c4356939b9be7166853c
--
2.35.3
++++++ gdb-symtab-find-main-language-without-symtab-expansi.patch ++++++
From e2f41776aa9ca2f625bbc50e9bb498e2a95dba25 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-symtab-fix-line-number-of-static-const-class-mem.patch ++++++
From e5972def532f3ed248dfbd2f220f28dc367f4ca1 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-symtab-fix-too-many-symbols-in-gdbpy_lookup_stat.patch ++++++
From 1362bc937bd54dbd22dd7b3c7ae9d8ab6ca7bbfc Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-symtab-handle-pu-in-iterate_over_some_symtabs.patch ++++++
From c67e982325c5b2249b0e29d07a9dc1985614e898 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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.
��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(a)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
++++++ gdb-symtab-handle-self-reference-die.patch ++++++
From 8f53ac47d3f9c3800c8429d9187961ba81707d8b Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Wed, 16 Aug 2023 23:43:25 +0200
Subject: [PATCH 1/2] [gdb/symtab] Handle self-reference DIE
While working on a dwarf assembly test-case I accidentally created the
following pathological dwarf:
...
<1><be>: Abbrev Number: 3 (DW_TAG_class_type)
<bf> DW_AT_name : c1
<c2> DW_AT_specification: <0xbe>
...
and noticed gdb segfaulting during cooked index creating due to running out of
stack. This is a regression from gdb-12, where gdb just hung.
Fix this by inhibiting the scan_attributes self-recursion for self-references.
The same test-case with -readnow makes gdb hang, so also fix this in
dwarf2_attr and follow_die_ref.
Note that this doesn't fix the same problems for the more complicated case of:
...
<1><be>: Abbrev Number: 3 (DW_TAG_class_type)
<bf> DW_AT_name : c1
<c2> DW_AT_specification: <0xc6>
<1><c6>: Abbrev Number: 4 (DW_TAG_class_type)
<c7> DW_AT_name : c2
<ca> DW_AT_specification: <0xbe>
...
but the approach for deciding whether to fix pathological dwarf cases is as
per PR27981 comment 3:
...
yes if it is cheap/obvious, and no if it is something complicated or expensive.
...
and at this point I'm not sure whether fixing this will fall in the first
category.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom(a)tromey.com>
---
gdb/dwarf2/read.c | 22 +++++++++--
gdb/testsuite/gdb.dwarf2/self-spec.exp | 54 ++++++++++++++++++++++++++
2 files changed, 73 insertions(+), 3 deletions(-)
create mode 100644 gdb/testsuite/gdb.dwarf2/self-spec.exp
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 61f4bd75013..1be5f381432 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -18289,9 +18289,15 @@ cooked_indexer::scan_attributes (dwarf2_per_cu_data *scanning_per_cu,
new_info_ptr,
&bytes_read);
new_info_ptr += bytes_read;
- scan_attributes (scanning_per_cu, new_reader, new_info_ptr, new_info_ptr,
- new_abbrev, name, linkage_name, flags, nullptr,
- parent_entry, maybe_defer, true);
+
+ if (new_reader->cu == reader->cu && new_info_ptr == watermark_ptr)
+ {
+ /* Self-reference, we're done. */
+ }
+ else
+ scan_attributes (scanning_per_cu, new_reader, new_info_ptr,
+ new_info_ptr, new_abbrev, name, linkage_name,
+ flags, nullptr, parent_entry, maybe_defer, true);
}
}
@@ -19783,7 +19789,11 @@ dwarf2_attr (struct die_info *die, unsigned int name, struct dwarf2_cu *cu)
if (!spec)
break;
+ struct die_info *prev_die = die;
die = follow_die_ref (die, spec, &cu);
+ if (die == prev_die)
+ /* Self-reference, we're done. */
+ break;
}
return NULL;
@@ -22521,6 +22531,12 @@ follow_die_ref (struct die_info *src_die, const struct attribute *attr,
struct dwarf2_cu *cu = *ref_cu;
struct die_info *die;
+ if (attr->form != DW_FORM_GNU_ref_alt && src_die->sect_off == sect_off)
+ {
+ /* Self-reference, we're done. */
+ return src_die;
+ }
+
die = follow_die_offset (sect_off,
(attr->form == DW_FORM_GNU_ref_alt
|| cu->per_cu->is_dwz),
diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp
new file mode 100644
index 00000000000..77e92549fd1
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp
@@ -0,0 +1,54 @@
+# 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 gdb doesn't hang or segfault on reading a DIE with a
+# specification reference to itself.
+
+load_lib dwarf.exp
+
+if {![dwarf2_support]} {
+ return 0
+}
+
+standard_testfile main.c .S
+
+# Create the DWARF.
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+ cu {} {
+ compile_unit {{language @DW_LANG_C_plus_plus}} {
+ declare_labels c1
+ c1: class_type {
+ {name c1}
+ {specification :$c1}
+ }
+ }
+ }
+}
+
+if [prepare_for_testing "failed to prepare" $testfile "${asm_file} ${srcfile}" {}] {
+ return -1
+}
+
+set index [have_index $binfile]
+if { ![string eq $index ""] } {
+ return 0
+}
+
+if { [readnow] } {
+ return 0
+}
+
+gdb_test "maint expand-symtabs"
base-commit: 6c9e159dbd1a35aafa134fcd52982174236a8dd9
--
2.35.3
++++++ gdb-symtab-handle-self-reference-in-inherit_abstract.patch ++++++
From 800c393f89a94f49b01dff99f693cb13c5e28116 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Mon, 28 Aug 2023 16:27:58 +0200
Subject: [PATCH 2/2] [gdb/symtab] Handle self-reference in
inherit_abstract_dies
Building gdb with gcc 7.5.0 and -flto -O2 -flto-partition=one generates a
self-referencing DIE:
...
<2><91dace>: Abbrev Number: 405 (DW_TAG_label)
<91dad0> DW_AT_abstract_origin: <0x91dace>
...
When encountering the self-reference DIE in inherit_abstract_dies we loop
following the abstract origin, effectively hanging gdb.
Fix this by handling self-referencing DIEs in the loop in
inherit_abstract_dies.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom(a)tromey.com>
PR symtab/30799
https://sourceware.org/bugzilla/show_bug.cgi?id=30799
---
gdb/dwarf2/read.c | 7 +++++++
gdb/testsuite/gdb.dwarf2/self-spec.exp | 16 +++++++++++++++-
2 files changed, 22 insertions(+), 1 deletion(-)
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 1be5f381432..970dd54c7a5 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -11938,8 +11938,15 @@ inherit_abstract_dies (struct die_info *die, struct dwarf2_cu *cu)
if (attr == nullptr)
break;
+ die_info *prev_child_origin_die = child_origin_die;
child_origin_die = follow_die_ref (child_origin_die, attr,
&child_origin_cu);
+
+ if (prev_child_origin_die == child_origin_die)
+ {
+ /* Handle DIE with self-reference. */
+ break;
+ }
}
/* If missing DW_AT_abstract_origin, try the corresponding child
diff --git a/gdb/testsuite/gdb.dwarf2/self-spec.exp b/gdb/testsuite/gdb.dwarf2/self-spec.exp
index 77e92549fd1..f04ff6da42e 100644
--- a/gdb/testsuite/gdb.dwarf2/self-spec.exp
+++ b/gdb/testsuite/gdb.dwarf2/self-spec.exp
@@ -14,7 +14,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that gdb doesn't hang or segfault on reading a DIE with a
-# specification reference to itself.
+# specification/abstract_origin reference to itself.
load_lib dwarf.exp
@@ -29,11 +29,25 @@ set asm_file [standard_output_file $srcfile2]
Dwarf::assemble $asm_file {
cu {} {
compile_unit {{language @DW_LANG_C_plus_plus}} {
+ # Check handling of self-referencing DIE.
declare_labels c1
c1: class_type {
{name c1}
{specification :$c1}
}
+
+ # Check handling of self-referencing child DIE. Regression test
+ # for PR30799.
+ declare_labels f1 abstract_f1 f1_l
+ abstract_f1: subprogram {}
+ f1: subprogram {
+ {MACRO_AT_func {main}}
+ {abstract_origin :$abstract_f1}
+ } {
+ f1_l: label {
+ {abstract_origin :$f1_l}
+ }
+ }
}
}
}
--
2.35.3
++++++ gdb-symtab-work-around-gas-pr28629.patch ++++++
From b1136560e772dd4c74f1fbb41f6ba840b92fb9d6 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Wed, 1 Nov 2023 00:33:12 +0100
Subject: [PATCH 2/2] [gdb/symtab] Work around gas PR28629
When running test-case gdb.tui/tui-layout-asm-short-prog.exp on AlmaLinux 9.2
ppc64le, I run into:
...
FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents
...
The problem is that we get:
...
7 [ No Assembly Available ]
...
because tui_get_begin_asm_address doesn't succeed.
In more detail, tui_get_begin_asm_address calls:
...
find_line_pc (sal.symtab, sal.line, &addr);
...
with:
...
(gdb) p *sal.symtab
$5 = {next = 0x130393c0, m_compunit = 0x130392f0, m_linetable = 0x0,
filename = "tui-layout-asm-short-prog.S",
filename_for_id = "$gdb/build/gdb/testsuite/tui-layout-asm-short-prog.S",
m_language = language_asm, fullname = 0x0}
(gdb) p sal.line
$6 = 1
...
The problem is the filename_for_id which is the source file prefixed with the
compilation dir rather than the source dir.
This is due to faulty debug info generated by gas, PR28629:
...
<1a> DW_AT_name : tui-layout-asm-short-prog.S
<1e> DW_AT_comp_dir : $gdb/build/gdb/testsuite
<22> DW_AT_producer : GNU AS 2.35.2
...
The DW_AT_name is relative, and it's relative to the DW_AT_comp_dir entry,
making the effective name $gdb/build/gdb/testsuite/tui-layout-asm-short-prog.S.
The bug is fixed starting version 2.38, where we get instead:
...
<1a> DW_AT_name :
$gdb/src/gdb/testsuite/gdb.tui/tui-layout-asm-short-prog.S
<1e> DW_AT_comp_dir : $gdb/build/gdb/testsuite
<22> DW_AT_producer : GNU AS 2.38
...
Work around the faulty debug info by constructing the filename_for_id using
the second directory from the directory table in the .debug_line header:
...
The Directory Table (offset 0x22, lines 2, columns 1):
Entry Name
0 $gdb/build/gdb/testsuite
1 $gdb/src/gdb/testsuite/gdb.tui
...
Note that the used gas contains a backport of commit 3417bfca676 ("GAS:
DWARF-5: Ensure that the 0'th entry in the directory table contains the
current working directory."), because directory 0 is correct. With the
unpatched 2.35.2 release the directory 0 entry is incorrect: it's a copy of
entry 1.
Add a dwarf assembly test-case that reflects the debug info as generated by
unpatched gas 2.35.2.
Tested on x86_64-linux.
Approved-By: Tom Tromey <tom(a)tromey.com>
---
gdb/dwarf2/cu.c | 1 +
gdb/dwarf2/cu.h | 1 +
gdb/dwarf2/read.c | 37 +++++++-
.../gdb.dwarf2/dw2-gas-workaround.exp | 94 +++++++++++++++++++
4 files changed, 132 insertions(+), 1 deletion(-)
create mode 100644 gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
diff --git a/gdb/dwarf2/cu.c b/gdb/dwarf2/cu.c
index 42fd4f4441b..6b5d956649f 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_lt_2_38 (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 710aeb5b237..9b1e8775ff4 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_lt_2_38 : 1;
bool producer_is_gas_2_39 : 1;
/* When true, the file that we're processing is known to have
diff --git a/gdb/dwarf2/read.c b/gdb/dwarf2/read.c
index 472684a5817..2339cceb829 100644
--- a/gdb/dwarf2/read.c
+++ b/gdb/dwarf2/read.c
@@ -146,6 +146,8 @@ static int dwarf2_loclist_index;
static int dwarf2_locexpr_block_index;
static int dwarf2_loclist_block_index;
+static bool producer_is_gas_lt_2_38 (struct dwarf2_cu *cu);
+
/* Size of .debug_loclists section header for 32-bit DWARF format. */
#define LOCLIST_HEADER_SIZE32 12
@@ -9663,6 +9665,27 @@ read_file_scope (struct die_info *die, struct dwarf2_cu *cu)
file_and_directory &fnd = find_file_and_directory (die, cu);
+ /* GAS supports generating dwarf-5 info starting version 2.35. Versions
+ 2.35-2.37 generate an incorrect CU name attribute: it's relative,
+ implicitly prefixing it with the compilation dir. Work around this by
+ prefixing it with the source dir instead. */
+ if (cu->header.version == 5 && !IS_ABSOLUTE_PATH (fnd.get_name ())
+ && producer_is_gas_lt_2_38 (cu))
+ {
+ attr = dwarf2_attr (die, DW_AT_stmt_list, cu);
+ if (attr != nullptr && attr->form_is_unsigned ())
+ {
+ sect_offset line_offset = (sect_offset) attr->as_unsigned ();
+ line_header_up lh = dwarf_decode_line_header (line_offset, cu,
+ fnd.get_comp_dir ());
+ if (lh->version == 5 && lh->is_valid_file_index (1))
+ {
+ std::string dir = lh->include_dir_at (1);
+ fnd.set_comp_dir (std::move (dir));
+ }
+ }
+ }
+
cu->start_compunit_symtab (fnd.get_name (), fnd.intern_comp_dir (objfile),
lowpc);
@@ -13377,7 +13400,10 @@ check_producer (struct dwarf2_cu *cu)
else if (producer_is_clang (cu->producer, &major, &minor))
cu->producer_is_clang = true;
else if (producer_is_gas (cu->producer, &major, &minor))
- cu->producer_is_gas_2_39 = major == 2 && minor == 39;
+ {
+ cu->producer_is_gas_lt_2_38 = major < 2 || (major == 2 && minor < 38);
+ cu->producer_is_gas_2_39 = major == 2 && minor == 39;
+ }
else
{
/* For other non-GCC compilers, expect their behavior is DWARF version
@@ -13413,6 +13439,15 @@ producer_is_codewarrior (struct dwarf2_cu *cu)
return cu->producer_is_codewarrior;
}
+static bool
+producer_is_gas_lt_2_38 (struct dwarf2_cu *cu)
+{
+ if (!cu->checked_producer)
+ check_producer (cu);
+
+ return cu->producer_is_gas_lt_2_38;
+}
+
static bool
producer_is_gas_2_39 (struct dwarf2_cu *cu)
{
diff --git a/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
new file mode 100644
index 00000000000..416778f51b7
--- /dev/null
+++ b/gdb/testsuite/gdb.dwarf2/dw2-gas-workaround.exp
@@ -0,0 +1,94 @@
+# 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/>.
+
+# Test line number information in various configurations.
+
+load_lib dwarf.exp
+
+# This test can only be run on targets which support DWARF-2 and use gas.
+if { ![dwarf2_support] } {
+ return -1
+}
+
+standard_testfile dw2-lines.c -dw2.S
+
+with_shared_gdb {
+ set func_info_vars [get_func_info bar]
+}
+
+# Helper function.
+proc line_for { l } {
+ global srcfile
+ set line [gdb_get_line_number "$l:" $srcfile]
+ return [expr $line + 1]
+}
+
+set asm_file [standard_output_file $srcfile2]
+Dwarf::assemble $asm_file {
+ declare_labels Llines
+ global srcdir subdir srcfile objdir
+ global func_info_vars
+ foreach var $func_info_vars {
+ global $var
+ }
+
+ cu { version 5 } {
+ compile_unit {
+ {language @DW_LANG_Mips_Assembler}
+ {name $srcfile}
+ {comp_dir $objdir}
+ {stmt_list $Llines DW_FORM_sec_offset}
+ {producer "GNU AS 2.35.2"}
+ } {
+ subprogram {
+ {external 1 flag}
+ {name bar}
+ {low_pc $bar_start addr}
+ {high_pc "$bar_start + $bar_len" addr}
+ }
+ }
+ }
+
+ lines [list version 5] Llines {
+ set diridx1 [include_dir "${srcdir}/${subdir}"]
+ set diridx2 [include_dir "${srcdir}/${subdir}"]
+ file_name "$srcfile" $diridx1
+ file_name "$srcfile" $diridx2
+
+ program {
+ DW_LNE_set_address bar_label
+ line [line_for bar_label]
+ DW_LNS_copy
+
+ DW_LNE_set_address bar_label_2
+ DW_LNE_end_sequence
+ }
+ }
+}
+
+if { [prepare_for_testing "failed to prepare" ${testfile} \
+ [list $srcfile $asm_file] {nodebug}] } {
+ return -1
+}
+
+gdb_test_no_output "set debug symtab-create 1"
+gdb_test_multiple "ptype bar" "" {
+ -re -wrap "$objdir.*" {
+ fail $gdb_test_name
+ }
+ -re -wrap "" {
+ pass $gdb_test_name
+ }
+}
--
2.35.3
++++++ gdb-symtab-work-around-pr-gas-29517.patch ++++++
From 92a5f5ae1b71d152d943ee896bf6cd073d50daa7 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-tdep-fix-nr-array-elements-in-ppc64_aggregate_ca.patch ++++++
From 3f0c512dc37dbede372a018732d315726a56d10e Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Wed, 1 Nov 2023 08:07:15 +0100
Subject: [PATCH] [gdb/tdep] Fix nr array elements in ppc64_aggregate_candidate
On AlmaLinux 9.2 powerpc64le I run into:
...
(gdb) PASS: gdb.ada/array_return.exp: continuing to Create_Small_Float_Vector
finish^M
Run till exit from #0 pck.create_small_float_vector () at pck.adb:30^M
0x00000000100022d4 in p () at p.adb:25^M
25 Vector := Create_Small_Float_Vector;^M
Value returned is $3 = (2.80259693e-45, 2.80259693e-45)^M
(gdb) FAIL: gdb.ada/array_return.exp: value printed by finish of Create_Small_Float_Vector
...
while this is expected:
...
Value returned is $3 = (4.25, 4.25)^M
...
The problem is here in ppc64_aggregate_candidate:
...
if (!get_array_bounds (type, &low_bound, &high_bound))
return -1;
count *= high_bound - low_bound
...
The array type (containing 2 elements) is:
...
type Small_Float_Vector is array (1 .. 2) of Float;
...
so we have:
...
(gdb) p low_bound
$1 = 1
(gdb) p high_bound
$2 = 2
...
but we calculate the number of elements in the array using
"high_bound - low_bound", which is 1.
Consequently, gdb fails to correctly classify the type as a ELFv2 homogeneous
aggregate.
Fix this by calculating the number of elements in the array by using
"high_bound - low_bound + 1" instead.
Furthermore, high_bound can (in general, though perhaps not here) be also be
smaller than low_bound, so to be safe take that into account as well:
...
LONGEST nr_array_elements = (low_bound > high_bound
? 0
: (high_bound - low_bound + 1));
count *= nr_array_elements;
...
Tested on powerpc64le-linux.
PR tdep/31015
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31015
---
gdb/ppc-sysv-tdep.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/gdb/ppc-sysv-tdep.c b/gdb/ppc-sysv-tdep.c
index 9cea63307e6..dc89201eed2 100644
--- a/gdb/ppc-sysv-tdep.c
+++ b/gdb/ppc-sysv-tdep.c
@@ -1126,7 +1126,11 @@ ppc64_aggregate_candidate (struct type *type,
if (!get_array_bounds (type, &low_bound, &high_bound))
return -1;
- count *= high_bound - low_bound;
+
+ LONGEST nr_array_elements = (low_bound > high_bound
+ ? 0
+ : (high_bound - low_bound + 1));
+ count *= nr_array_elements;
/* There must be no padding. */
if (count == 0)
base-commit: b1136560e772dd4c74f1fbb41f6ba840b92fb9d6
--
2.35.3
++++++ gdb-testsuite-add-kfail-for-pr-ada-30908.patch ++++++
From 0b29bc75761b11387f89912ce827311b8eac18a6 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-testsuite-add-wait_for_msg-arg-to-term-resize-fi.patch ++++++
From 028d19e262b4086bc266b2657edd566bb4757927 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Mon, 13 Nov 2023 11:33:23 +0100
Subject: [PATCH 5/6] [gdb/testsuite] Add wait_for_msg arg to Term::resize fix
From commit deb1ba4e38b ("[gdb/tui] Fix TUI resizing for TERM=ansi").
Required for "[gdb/tui] Fix resizing of terminal to 1 or 2 lines".
---
gdb/testsuite/lib/tuiterm.exp | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/lib/tuiterm.exp b/gdb/testsuite/lib/tuiterm.exp
index 591c4ca9c4c..eaac09581e9 100644
--- a/gdb/testsuite/lib/tuiterm.exp
+++ b/gdb/testsuite/lib/tuiterm.exp
@@ -1066,7 +1066,7 @@ namespace eval Term {
}
}
- proc resize {rows cols} {
+ proc resize {rows cols {wait_for_msg 1}} {
variable _rows
variable _cols
variable _resize_count
@@ -1080,14 +1080,18 @@ namespace eval Term {
# Due to the strange column resizing behavior, and because we
# don't care about this intermediate resize, we don't check
# the size here.
- wait_for "@@ resize done $_resize_count"
+ if { $wait_for_msg } {
+ wait_for "@@ resize done $_resize_count"
+ }
incr _resize_count
# Somehow the number of columns transmitted to gdb is one less
# than what we request from expect. We hide this weird
# details from the caller.
_do_resize $_rows $cols
stty columns [expr {$_cols + 1}] < $::gdb_tty_name
- wait_for "@@ resize done $_resize_count, size = ${_cols}x${rows}"
+ if { $wait_for_msg } {
+ wait_for "@@ resize done $_resize_count, size = ${_cols}x${rows}"
+ }
incr _resize_count
}
}
--
2.35.3
++++++ gdb-testsuite-add-xfail-for-gdb-29965-in-gdb.threads.patch ++++++
From ebceffa1196651683a7a6d31abb4b3b5adc6c168 Mon Sep 17 00:00:00 2001
From: Simon Marchi <simon.marchi(a)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(a)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
++++++ gdb-testsuite-fix-gdb.ada-mi_task_arg.exp-with-newer.patch ++++++
From ad1be044276c4727434f84ac6c554da4f2829aaf Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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(a)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
++++++ gdb-testsuite-fix-gdb.arch-i386-signal.exp-on-x86_64.patch ++++++
From ef58dedc82b17919360bf51f7efcbf6d74c11329 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-testsuite-fix-gdb.cp-m-static.exp-regression-on-.patch ++++++
From 424c96685651cc949597d700811a5fbb15256d1d Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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(a)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
++++++ gdb-testsuite-fix-gdb.dwarf2-nullptr_t.exp-with-cc-w.patch ++++++
From 335a151d834199610b515e67f1924d6e0a211db2 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-testsuite-fix-gdb.python-py-breakpoint.exp-with-.patch ++++++
From 0cb123a4157d215c80f3deb339a3ba10a188ba19 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Mon, 2 Jan 2023 11:59:17 +0100
Subject: [PATCH 1/6] [gdb/testsuite] Fix gdb.python/py-breakpoint.exp with
libstdc++ debug info
On x86_64-linux, I run into:
...
(gdb) python hbp1 = gdb.Breakpoint("add", type=gdb.BP_HARDWARE_BREAKPOINT)^M
Hardware assisted breakpoint 2 at 0x40072e: add. (7 locations)^M
(gdb) FAIL: gdb.python/py-breakpoint.exp: test_hardware_breakpoints: \
Set hardware breakpoint
...
due to libstdc++ debug info:
...
$ gdb -q -batch outputs/gdb.python/py-breakpoint/py-breakpoint \
-ex start \
-ex "b add" \
-ex "info break"
Temporary breakpoint 1 at 0x40076a: file py-breakpoint.c, line 50.
Temporary breakpoint 1, main (argc=1, argv=$hex) at py-breakpoint.c:50
50 int foo = 5;
Breakpoint 2 at 0x40072e: add. (7 locations)
Num Type Disp Enb Address What
2 breakpoint keep y <MULTIPLE>
2.1 y 0x000000000040072e in add(int) at \
py-breakpoint.c:39
2.2 y 0x00007ffff7b131de in \
(anonymous namespace)::fast_float::bigint::add at \
../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815
...
2.7 y 0x00007ffff7b137e4 in \
(anonymous namespace)::fast_float::bigint::add at \
../../../../../libstdc++-v3/src/c++17/fast_float/fast_float.h:1815
...
Fix this by using qualified=True.
Tested on x86_64-linux.
PR testsuite/29910
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=29910
---
gdb/testsuite/gdb.python/py-breakpoint.exp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/gdb/testsuite/gdb.python/py-breakpoint.exp b/gdb/testsuite/gdb.python/py-breakpoint.exp
index 9ba6b837a41..23c6637cd3a 100644
--- a/gdb/testsuite/gdb.python/py-breakpoint.exp
+++ b/gdb/testsuite/gdb.python/py-breakpoint.exp
@@ -273,7 +273,8 @@ proc_with_prefix test_hardware_breakpoints { } {
delete_breakpoints
- gdb_test "python hbp1 = gdb.Breakpoint(\"add\", type=gdb.BP_HARDWARE_BREAKPOINT)" \
+ set bp_args {"add", type=gdb.BP_HARDWARE_BREAKPOINT, qualified=True}
+ gdb_test "python hbp1 = gdb.Breakpoint($bp_args)" \
".*Hardware assisted breakpoint ($decimal)+ at .*$srcfile, line ($decimal)+\." \
"Set hardware breakpoint"
gdb_test "python print (gdb.breakpoints()\[0\].type == gdb.BP_HARDWARE_BREAKPOINT)" \
base-commit: 1cd845ab3d405412aabf9b959aa527dd60143826
--
2.35.3
++++++ gdb-testsuite-fix-regexps-in-gdb.base-step-over-sysc.patch ++++++
From e492116f04d3b4d704c4f6f3259143d7fb16a03e Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)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
++++++ gdb-tui-allow-command-window-of-1-or-2-lines.patch ++++++
From 02616ce7c5571e5b2680cad52f8c58b27f77b2a5 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Thu, 9 Nov 2023 09:04:39 +0100
Subject: [PATCH 4/6] [gdb/tui] Allow command window of 1 or 2 lines
When starting TUI in a terminal with 2 lines (likewise with 1 line):
...
$ echo $LINES
2
$ gdb -q -tui
...
we run into this assert in tui_apply_current_layout:
...
/* This should always be made visible by a layout. */
gdb_assert (TUI_CMD_WIN != nullptr);
...
The problem is that for the command window:
- the minimum height is 3 (the default), but
- the maximum height is only 2 because there are only 2 lines.
This discrepancy eventually leads to a call to newwin in make_window with:
...
(gdb) p height
$1 = 3
(gdb) p width
$2 = 66
(gdb) p y
$3 = -1
(gdb) p x
$4 = 0
(gdb)
...
which results in a nullptr, which eventually triggers the assert.
The easiest way to fix this is to change the minimum height of the command
window to 1. However, that would also change behaviour for the case that the
screen size is 3 lines or more. For instance, in gdb.tui/winheight.exp the
number of lines in the terminal is 24, and the test-case checks that the user
cannot increase the source window height to the point that the command window
height would be less than 3.
Fix this by calculating the minimum height of the command window as follows:
- the default (3) if max_height () allows it, and
- max_height () otherwise.
Tested on x86_64-linux.
PR tui/31044
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31044
---
gdb/tui/tui-command.h | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/gdb/tui/tui-command.h b/gdb/tui/tui-command.h
index f6842880bb2..e8c96ecee30 100644
--- a/gdb/tui/tui-command.h
+++ b/gdb/tui/tui-command.h
@@ -57,6 +57,18 @@ struct tui_cmd_window : public tui_win_info
/* The command window can't be made invisible. */
}
+ /* Compute the minimum height of this window. */
+ virtual int min_height () const override
+ {
+ int preferred_min = tui_win_info::min_height ();
+ int max = max_height ();
+ /* If there is enough space to accommodate the preferred minimum height,
+ use it. Otherwise, use as much as possible. */
+ return (preferred_min <= max
+ ? preferred_min
+ : max);
+ }
+
int start_line = 0;
protected:
--
2.35.3
++++++ gdb-tui-fix-resizing-of-terminal-to-1-or-2-lines.patch ++++++
From c55a452eaf9390d5659d3205f762aa2cb84511e1 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Thu, 9 Nov 2023 09:05:01 +0100
Subject: [PATCH 6/6] [gdb/tui] Fix resizing of terminal to 1 or 2 lines
When starting TUI in a terminal with 3 lines:
...
$ echo $LINES
3
$ gdb -q -tui
...
and resizing the terminal to 2 lines we run into a segfault.
The problem is that for the source window:
- the minimum height is 3 (the default), but
- the maximum height is only 2 because there are only 2 lines.
This discrepancy eventually leads to a call to newwin in make_window with:
...
(gdb) p height
$1 = 3
(gdb) p width
$2 = 56
(gdb) p y
$3 = -1
(gdb) p x
$4 = 0
...
which results in a nullptr.
This violates the assumption here in tui_apply_current_layout:
....
/* Get the new list of currently visible windows. */
std::vector<tui_win_info *> new_tui_windows;
applied_layout->get_windows (&new_tui_windows);
...
that get_windows only returns visible windows, which leads to tui_windows
holding a dangling pointer, which results in the segfault.
Fix this by:
- making sure get_windows only returns visible windows, and
- detecting the situation and dropping windows from the layout if
there's no room for them.
Tested on x86_64-linux.
PR tui/31044
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=31044
---
gdb/testsuite/gdb.tui/resize.exp | 9 +++++++++
gdb/tui/tui-layout.c | 22 ++++++++++++++++++++--
gdb/tui/tui-layout.h | 6 +++++-
3 files changed, 34 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.tui/resize.exp b/gdb/testsuite/gdb.tui/resize.exp
index 60d5116886b..e15f8a2f507 100644
--- a/gdb/testsuite/gdb.tui/resize.exp
+++ b/gdb/testsuite/gdb.tui/resize.exp
@@ -39,3 +39,12 @@ Term::check_contents "source at startup" "\\|.*21 *return 0"
Term::resize 40 90
Term::check_box "source box after resize" 0 0 90 26
+
+# Check that resizing to less than 3 lines doesn't cause problems.
+foreach lines { 2 1 } {
+ with_test_prefix lines=$lines {
+ Term::resize $lines 90 0
+ Term::wait_for ""
+ Term::check_region_contents "has prompt" 0 0 90 $lines "$gdb_prompt"
+ }
+}
diff --git a/gdb/tui/tui-layout.c b/gdb/tui/tui-layout.c
index 27abee02087..362c1447910 100644
--- a/gdb/tui/tui-layout.c
+++ b/gdb/tui/tui-layout.c
@@ -442,6 +442,13 @@ tui_layout_window::apply (int x_, int y_, int width_, int height_,
width = width_;
height = height_;
gdb_assert (m_window != nullptr);
+ if (width == 0 || height == 0)
+ {
+ /* The window was dropped, so it's going to be deleted, reset the
+ soon to be dangling pointer. */
+ m_window = nullptr;
+ return;
+ }
m_window->resize (height, width, x, y);
}
@@ -823,6 +830,7 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
int available_size = m_vertical ? height : width;
int last_index = -1;
int total_weight = 0;
+ int prev = -1;
for (int i = 0; i < m_splits.size (); ++i)
{
bool cmd_win_already_exists = TUI_CMD_WIN != nullptr;
@@ -854,6 +862,14 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
info[i].max_size = info[i].min_size;
}
+ if (info[i].min_size > info[i].max_size)
+ {
+ /* There is not enough room for this window, drop it. */
+ info[i].min_size = 0;
+ info[i].max_size = 0;
+ continue;
+ }
+
if (info[i].min_size == info[i].max_size)
available_size -= info[i].min_size;
else
@@ -864,10 +880,12 @@ tui_layout_split::apply (int x_, int y_, int width_, int height_,
/* Two adjacent boxed windows will share a border, making a bit
more size available. */
- if (i > 0
- && m_splits[i - 1].layout->last_edge_has_border_p ()
+ if (prev != -1
+ && m_splits[prev].layout->last_edge_has_border_p ()
&& m_splits[i].layout->first_edge_has_border_p ())
info[i].share_box = true;
+
+ prev = i;
}
/* If last_index is set then we have a window that is not of a fixed
diff --git a/gdb/tui/tui-layout.h b/gdb/tui/tui-layout.h
index 206f1117445..ec013a3f051 100644
--- a/gdb/tui/tui-layout.h
+++ b/gdb/tui/tui-layout.h
@@ -185,7 +185,11 @@ class tui_layout_window : public tui_layout_base
/* See tui_layout_base::get_windows. */
void get_windows (std::vector<tui_win_info *> *windows) override
{
- windows->push_back (m_window);
+ if (m_window != nullptr && m_window->is_visible ())
+ {
+ /* Only get visible windows. */
+ windows->push_back (m_window);
+ }
}
protected:
--
2.35.3
++++++ gdb-tui-fix-segfault-in-tui_find_disassembly_address.patch ++++++
From 0f8f51e98c7f643b8ce32bc6f6d621ce902d7a66 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Thu, 28 Sep 2023 20:17:33 +0200
Subject: [PATCH 2/6] [gdb/tui] Fix segfault in tui_find_disassembly_address
PR29040 describes a FAIL for test-case gdb.threads/next-fork-other-thread.exp
and target board unix/-m32.
The FAIL happens due to the test executable running into an assert, which is
caused by a forked child segfaulting, like so:
...
Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00000000 in ?? ()
...
I tried to reproduce the segfault with exec next-fork-other-thread-fork, using
TUI layout asm.
I set a breakpoint at fork and ran to the breakpoint, and somewhere during the
following session I ran into a gdb segfault here in
tui_find_disassembly_address:
...
/* Disassemble forward. */
next_addr = tui_disassemble (gdbarch, asm_lines, new_low, max_lines);
last_addr = asm_lines.back ().addr;
...
due to asm_lines being empty after the call to tui_disassemble, while
asm_lines.back () assumes that it's not empty.
I have not been able to reproduce that segfault in that original setting, I'm
not sure of the exact scenario (though looking back it probably involved
"set detach-on-fork off").
What likely happened is that I managed to reproduce PR29040, and TUI (attempted
to) display the disassembly for address 0, which led to the gdb segfault.
When gdb_print_insn encounters an insn it cannot print because it can't read
the memory, it throws a MEMORY_ERROR that is caught by tui_disassemble.
The specific bit that causes the gdb segfault is that if gdb_print_insn throws
a MEMORY_ERROR for the first insn in tui_disassemble, it returns an empty
asm_lines.
FWIW, I did manage to reproduce the gdb segfault as follows:
...
$ gdb -q \
-iex "set pagination off" \
/usr/bin/rustc \
-ex "set breakpoint pending on" \
-ex "b dl_main" \
-ex run \
-ex "up 4" \
-ex "layout asm" \
-ex "print \$pc"
...
<TUI>
...
$1 = (void (*)()) 0x1
(gdb)
...
Now press <up>, and the segfault triggers.
Fix the segfault by handling asm_lines.empty () results of tui_disassemble in
tui_find_disassembly_address.
I've written a unit test that exercises this scenario.
Tested on x86_64-linux.
Reviewed-by: Kevin Buettner <kevinb(a)redhat.com>
PR tui/30823
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30823
---
gdb/tui/tui-disasm.c | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index f0b55769d71..03c78aa1291 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -41,6 +41,8 @@
#include "objfiles.h"
#include "cli/cli-style.h"
#include "tui/tui-location.h"
+#include "gdbsupport/selftest.h"
+#include "inferior.h"
#include "gdb_curses.h"
@@ -203,6 +205,8 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
instruction fails to disassemble we will take the address of the
previous instruction that did disassemble as the result. */
tui_disassemble (gdbarch, asm_lines, pc, max_lines + 1);
+ if (asm_lines.empty ())
+ return pc;
new_low = asm_lines.back ().addr;
}
else
@@ -244,6 +248,8 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
/* Disassemble forward. */
next_addr = tui_disassemble (gdbarch, asm_lines, new_low, max_lines);
+ if (asm_lines.empty ())
+ break;
last_addr = asm_lines.back ().addr;
/* If disassembling from the current value of NEW_LOW reached PC
@@ -522,3 +528,36 @@ tui_disasm_window::display_start_addr (struct gdbarch **gdbarch_p,
*gdbarch_p = m_gdbarch;
*addr_p = m_start_line_or_addr.u.addr;
}
+
+#if GDB_SELF_TEST
+namespace selftests {
+namespace tui {
+namespace disasm {
+
+static void
+run_tests ()
+{
+ if (current_inferior () != nullptr)
+ {
+ struct gdbarch *gdbarch = current_inferior ()->gdbarch;
+
+ /* Check that tui_find_disassembly_address robustly handles the case of
+ being passed a PC for which gdb_print_insn throws a MEMORY_ERROR. */
+ SELF_CHECK (tui_find_disassembly_address (gdbarch, 0, 1) == 0);
+ SELF_CHECK (tui_find_disassembly_address (gdbarch, 0, -1) == 0);
+ }
+}
+
+} /* namespace disasm */
+} /* namespace tui */
+} /* namespace selftests */
+#endif /* GDB_SELF_TEST */
+
+void _initialize_tui_disasm ();
+void
+_initialize_tui_disasm ()
+{
+#if GDB_SELF_TEST
+ selftests::register_test ("tui-disasm", selftests::tui::disasm::run_tests);
+#endif
+}
--
2.35.3
++++++ gdb-tui-fix-wmaybe-uninitialized-in-tui_find_disasse.patch ++++++
From 0f2bdd8648e47e10334f8cc8e47b277d4064d0a2 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tdevries(a)suse.de>
Date: Mon, 13 Nov 2023 09:31:20 +0100
Subject: [PATCH 3/6] [gdb/tui] Fix Wmaybe-uninitialized in
tui_find_disassembly_address
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
When building gdb with -O2, we run into:
...
gdb/tui/tui-disasm.c: In function ‘CORE_ADDR tui_find_disassembly_address \
(gdbarch*, CORE_ADDR, int)’:
gdb/tui/tui-disasm.c:293:7: warning: ‘last_addr’ may be used uninitialized \
in this function [-Wmaybe-uninitialized]
if (last_addr < pc)
^~
...
The warning triggers since commit 72535eb14bd ("[gdb/tui] Fix segfault in
tui_find_disassembly_address").
Fix the warning by ensuring that last_addr is initialized at the point of
use:
...
+ last_addr = asm_lines.back ().addr;
if (last_addr < pc)
...
Tested on x86_64-linux.
---
gdb/tui/tui-disasm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gdb/tui/tui-disasm.c b/gdb/tui/tui-disasm.c
index 03c78aa1291..bbbc92c8183 100644
--- a/gdb/tui/tui-disasm.c
+++ b/gdb/tui/tui-disasm.c
@@ -281,7 +281,6 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
/* Take the best possible match we have. */
new_low = *possible_new_low;
next_addr = tui_disassemble (gdbarch, asm_lines, new_low, max_lines);
- last_addr = asm_lines.back ().addr;
gdb_assert (asm_lines.size () >= max_lines);
}
@@ -290,6 +289,7 @@ tui_find_disassembly_address (struct gdbarch *gdbarch, CORE_ADDR pc, int from)
We keep the disassembled instructions in the 'lines' window
and shift it downward (increasing its addresses). */
int pos = max_lines - 1;
+ last_addr = asm_lines.back ().addr;
if (last_addr < pc)
do
{
--
2.35.3
++++++ import-fedora.sh ++++++
#!/bin/bash
# Fedora Packages not copied:
#
skip_patches=(
# Not applicable for openSUSE.
gdb-add-index.patch
gdb-6.3-rh-testversion-20041202.patch
gdb-6.6-buildid-locate-misleading-warning-missing-debuginfo-rhbz981154.patch
gdb-6.8-bz466901-backtrace-full-prelinked.patch
gdb-container-rh-pkg.patch
# Broken.
# Over-specific test-case in a shell script.
gdb-6.5-BEA-testsuite.patch
# Hangs for horizontal-scroll-mode on, times out after 10 minutes.
gdb-6.5-readline-long-line-crash-test.patch
# Fragile test-case, requires glibc to fail in a certain way.
gdb-rhbz1156192-recursive-dlopen-test.patch
# Obsolete (dropped by fedora).
gdb-6.7-charsign-test.patch
gdb-test-ivy-bridge.patch
gdb-ppc-power7-test.patch
gdb-6.3-bz140532-ppc-unwinding-test.patch
# Obsolete.
gdb-6.7-charsign-test.patch
gdb-6.7-ppc-clobbered-registers-O2-test.patch
)
usage ()
{
echo "usage: $(basename "$0") <fedora package dir> "
}
dir="$1"
if [ ! -f "$dir"/_patch_order ]; then
usage
exit 1
fi
mark1="^#Fedora Packages begin"
mark2="^#Fedora Packages end"
mark3="^#Fedora patching start"
mark4="^#Fedora patching end"
remove_current_patches ()
{
# shellcheck disable=SC2207
current_patches=($(awk "/$mark1/,/$mark2/{ print }" gdb.spec \
| grep Patch \
| awk '{print $2}'))
for current_patch in "${current_patches[@]}"; do
rm -f "$current_patch"
done
}
skip ()
{
local p
p="$1"
for skip_patch in "${skip_patches[@]}"; do
if [ "$p" = "$skip_patch" ]; then
return 0
fi
done
return 1
}
import_patches ()
{
# Get the parts of gdb.spec that we want to keep unchanged.
awk "NR==1,/$mark1/" gdb.spec \
> gdb.spec.1
awk "/$mark2/,/$mark3/" gdb.spec \
> gdb.spec.3
awk "/$mark4/,0" gdb.spec \
> gdb.spec.5
# Start generating the parts of gdb.spec that we want to change.
f1=gdb.spec.2
f2=gdb.spec.4
rm -f $f1 $f2
# Handle each fedora patch.
skipped_patches=()
n=1
# shellcheck disable=SC2013
for p in $(cat "$dir"/_patch_order); do
if skip "$p"; then
echo "Skipped: $p"
skipped_patches=("${skipped_patches[@]}" "$p")
# Keep numbers the same as in fedora package.
n=$((n + 1))
continue
fi
cp "$dir"/"$p" .
printf \
"%-16s%s\n" "Patch$n:" "$p" \
>> $f1
echo \
"%patch$n -p1" \
>> $f2
n=$((n + 1))
done
# Report which patches did not get skipped.
for skip_patch in "${skip_patches[@]}"; do
found=false
for skipped_patch in "${skipped_patches[@]}"; do
if [ "$skip_patch" = "$skipped_patch" ]; then
found=true
break
fi
done
if ! $found; then
echo "Not skipped: $skip_patch"
fi
done
# Assemble new gdb.spec.
rm -f gdb.spec.new
for n in $(seq 1 5); do
cat gdb.spec."$n" \
>> gdb.spec.new
done
# Cleanup.
for n in $(seq 1 5); do
rm -f gdb.spec."$n"
done
# Update gdb.spec.
mv gdb.spec.new gdb.spec
}
main ()
{
remove_current_patches
import_patches
}
main "$@"
++++++ qa-local.sh ++++++
--- /var/tmp/diff_new_pack.gQfqXG/_old 2023-11-17 20:48:35.943038749 +0100
+++ /var/tmp/diff_new_pack.gQfqXG/_new 2023-11-17 20:48:35.943038749 +0100
@@ -9,23 +9,29 @@
pkgs=$root/pkgs
configs="
+openSUSE_Leap_15.5
openSUSE_Leap_15.4
openSUSE_Leap_15.3
openSUSE_Factory
+openSUSE_Factory_LegacyX86
SLE-15
SLE-12
SLE-11
"
+archs="x86_64 i586"
+
version=13.2
usage ()
{
echo "usage: $0 <1-4>"
echo "1: Cleanup"
- echo "2: Do local builds without testsuite"
- echo "3: Do local builds with testsuite"
- echo "4: Verify local testsuite results"
+ echo "2: List configs"
+ echo "3: Verify quilt setup"
+ echo "4: Do local builds without testsuite"
+ echo "5: Do local builds with testsuite"
+ echo "6: Verify local testsuite results"
}
if [ $# -eq 0 ]; then
@@ -71,16 +77,28 @@
done &
}
-archs="x86_64 i586"
-
have_combo ()
{
arch="$1"
c="$2"
if [ "$arch" = "i586" ]; then
- case $c in
- SLE-12|SLE-15)
+ case " $c " in
+ " openSUSE_Factory ")
+ # Doesn't have i586.
+ return 1
+ ;;
+ " SLE-11 "|" SLE-12 "|" SLE-15 ")
+ # SLE-12 and SLE-15 don't have i586. SLE-11 does, but
+ # we ignore that for now.
+ return 1
+ ;;
+ esac
+ fi
+ if [ "$arch" = "x86_64" ]; then
+ case " $c " in
+ " openSUSE_Factory_LegacyX86 ")
+ # Doesn't have x86_64.
return 1
;;
esac
@@ -94,6 +112,22 @@
;;
2)
+ for arch in $archs; do
+ for c in $configs; do
+ if ! have_combo $arch $c; then
+ continue
+ fi
+ echo "$c $arch"
+ done
+ done
+ ;;
+
+ 3)
+ quilt setup -d $root -v gdb.spec
+ rm -Rf $root/gdb-*
+ ;;
+
+ 4)
acquire_sudo_rights
rm -Rf $logs/$n
@@ -127,7 +161,7 @@
done
;;
- 3)
+ 5)
acquire_sudo_rights
rm -Rf $logs/$n
@@ -186,7 +220,7 @@
done
;;
- 4)
+ 6)
for arch in $archs; do
for c in $configs; do
if ! have_combo $arch $c; then
@@ -194,7 +228,7 @@
fi
echo "CONFIG: $c $arch"
case $c in
- openSUSE_Factory)
+ openSUSE_Factory|openSUSE_Factory_LegacyX86)
bash qa.sh -local -$arch -factory $pkgs/gdb-testresults.$c.$arch
;;
SLE-12)
++++++ qa.sh ++++++
--- /var/tmp/diff_new_pack.gQfqXG/_old 2023-11-17 20:48:35.975039978 +0100
+++ /var/tmp/diff_new_pack.gQfqXG/_new 2023-11-17 20:48:35.979040131 +0100
@@ -1,25 +1,5 @@
#!/bin/bash
-# Note:
-# Occasionally we run into PR28561 - "[gdb/testsuite] Error due to not
-# reading \r\n at end of mi prompt".
-# https://sourceware.org/bugzilla/show_bug.cgi?id=28561
-# Not sure how to filter for that.
-
-# TODO:
-#
-# We run into FAILs like this:
-# FAIL: gdb.base/options.exp: test-print: \
-# tab complete "thread apply all print " (clearing input line) (timeout)
-# FAIL: gdb.base/options.exp: test-print: \
-# cmd complete "thread apply all print "
-# in various test-cases. One instance is reported here (
-# https://sourceware.org/bugzilla/show_bug.cgi?id=27813 ).
-# We could do a generic kfail for "(clearing input line) (timeout)", but that
-# doesn't filter out the following FAIL. We need to update the testsuite to
-# emit only one FAIL for this, or alternatively, add a possibility in this
-# script to KFAIL one and all following FAILs in the same test-case.
-
usage ()
{
echo "usage: $0 <1-5>"
@@ -152,33 +132,37 @@
# 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=27813
- "FAIL: gdb.cp/cpcompletion.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\)"
@@ -196,7 +180,9 @@
# 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
+ # Should be fixed in gdb-14.
"FAIL: gdb.base/gdb-sigterm.exp: .*internal error"
# If a test-case fails to compile, it's not a GDB FAIL, ignore.
@@ -279,19 +265,21 @@
"FAIL: gdb.base/info-os.exp: get shared-memory regions"
"FAIL: gdb.base/info-os.exp: get threads"
- #https://sourceware.org/bugzilla/show_bug.cgi?id=29790
+ # Fails related to PKRU register. To be investigated. Might be fixed in
+ # gdb 14, but related patches look non-trivial to backport.
+ "FAIL: gdb.arch/i386-pkru.exp: pkru register"
+ "FAIL: gdb.arch/i386-pkru.exp: read pkru register"
"FAIL: gdb.arch/i386-pkru.exp: read value after setting value"
"FAIL: gdb.arch/i386-pkru.exp: variable after reading pkru"
+ "FAIL: gdb.base/gcore.exp: corefile restored all registers"
+ "FAIL: gdb.reverse/insn-reverse.exp: rdrand: compare registers on insn"
+ "FAIL: gdb.reverse/insn-reverse.exp: rdseed: compare registers on insn"
# https://sourceware.org/bugzilla/show_bug.cgi?id=28478
"FAIL: gdb.gdb/selftest.exp: backtrace through signal handler"
# https://sourceware.org/bugzilla/show_bug.cgi?id=29781
- "FAIL: gdb.mi/mi-multi-commands.exp: args=: look for second command output, command length .* \(timeout\)"
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=27813
- "FAIL: .*.exp: .*tab complete .* \(clearing input line\) \(timeout\)"
- "FAIL: .*.exp: .*cmd complete .*"
+ "FAIL: gdb.mi/mi-multi-commands.exp: args=.*: look for second command output, command length .* \(timeout\)"
# https://sourceware.org/bugzilla/show_bug.cgi?id=27027
# https://sourceware.org/bugzilla/show_bug.cgi?id=28464
@@ -312,6 +300,10 @@
# https://sourceware.org/bugzilla/show_bug.cgi?id=30521
"FAIL: gdb.base/printcmds.exp: print {unsigned char\[\]}{0xffffffff}"
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=30528
+ # Fixed in 15. Backportable to 14.
+ "FAIL: gdb.dwarf2/per-bfd-sharing.exp: couldn't remove files in temporary cache dir"
+
) # kfail
kfail_sle12=(
@@ -373,11 +365,6 @@
"FAIL: gdb.base/premature-dummy-frame-removal.exp: set debug frame on"
"FAIL: gdb.base/longjmp-until-in-main.exp: until \\\$line, in main"
- # Commit 2d77a94ff17 ("[gdb/testsuite] Require debug info for
- # gdb.tui/tui-layout-asm-short-prog.exp")
- "FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents"
- "FAIL: gdb.tui/tui-layout-asm-short-prog.exp: check asm box contents again"
-
# Test-cases that use -static but may turn out to be PIE when using
# unix/-fPIE/-fpie.
# https://sourceware.org/bugzilla/show_bug.cgi?id=29244
@@ -400,6 +387,10 @@
"FAIL: gdb.fortran/module.exp: print var_d"
"FAIL: gdb.fortran/module.exp: print var_x value 31"
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=30531
+ "FAIL: gdb.threads/clone-thread_db.exp: continue to clone_fn \(the program exited\)"
+ "FAIL: gdb.threads/clone-thread_db.exp: continue to end \(the program is no longer running\)"
+
) # kfail_sle12
kfail_sle11=(
@@ -452,28 +443,24 @@
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"
@@ -481,21 +468,10 @@
# 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\)"
@@ -503,15 +479,6 @@
# 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\)"
-
- # To be investigated.
- "FAIL: gdb.ada/mi_task_arg.exp: -stack-list-arguments 1 \(unexpected output\)"
- "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"
@@ -524,89 +491,39 @@
# 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
kfail_aarch64=(
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29408
- "FAIL: gdb.base/large-frame.exp: optimize=-O0: backtrace"
- "FAIL: gdb.base/large-frame.exp: optimize=-O1: backtrace"
- "FAIL: gdb.base/large-frame.exp: optimize=-O2: backtrace"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=29405
"FAIL: gdb.base/step-over-syscall.exp: (fork|vfork): displaced=(on|off): pc after stepi matches insn addr after syscall"
"FAIL: gdb.base/step-over-syscall.exp: (fork|vfork): displaced=(on|off): check_pc_after_cross_syscall: single step over fork final pc"
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29418
- "FAIL: gdb.ada/O2_float_param.exp: scenario=all: frame"
- "FAIL: gdb.ada/O2_float_param.exp: scenario=minimal: frame"
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29420
- "FAIL: gdb.ada/convvar_comp.exp: print \\\$item.started"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=29423
"FAIL: gdb.base/watchpoint-unaligned.exp: continue \(timeout\)"
"FAIL: gdb.base/watchpoint-unaligned.exp: size8twice write"
+ # 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.
+ "FAIL: gdb.mi/.*.exp:"
+ "FAIL: gdb.python/.*-mi.exp:"
+ "FAIL: gdb.python/py-mi-.*.exp:"
+ "FAIL: gdb.ada/mi.*.exp:"
+ "FAIL: gdb.base/annota.*.exp:"
+ "FAIL: gdb.dwarf2/dw2-opt-structptr.exp: mi"
+
) # kfail_aarch64
kfail_powerpc64le=(
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29420
- "FAIL: gdb.ada/convvar_comp.exp: print \\\$item.started"
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29814
- "FAIL: gdb.base/msym-bp-shl.exp: debug=0: before run: info breakpoint"
- "FAIL: gdb.base/msym-bp-shl.exp: debug=1: before run: info breakpoint"
-
- # Commit a0eda3df5b7 ("PowerPC, fix support for printing the function
- # return value for non-trivial values").
- "FAIL: gdb.cp/non-trivial-retval.exp: finish from"
- "FAIL: gdb.ada/array_return.exp: value printed by finish of Create_Small_Float_Vector"
- "FAIL: gdb.base/gnu_vector.exp: call add_structvecs"
-
- # Commit f68eca29d3b ("PowerPC, fix gdb.base/retval-large-struct.exp").
- "FAIL: gdb.base/retval-large-struct.exp: finish from return_large_struct"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=29792
"FAIL: gdb.opt/solib-intra-step.exp: second-hit"
- # Carl Love mentioned he's working on these.
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29793#c2
- "FAIL: gdb.reverse/finish-precsave.exp"
- "FAIL: gdb.reverse/finish-reverse.exp"
-
- # Commit 29004660c94 ("PowerPC fix for gdb.server/sysroot.exp").
- "FAIL: gdb.server/sysroot.exp: sysroot=local: continue to printf"
- "FAIL: gdb.server/sysroot.exp: sysroot=remote: continue to printf"
-
# Known to run into timeouts.
"FAIL: gdb.gdb/python-helper.exp"
- # Fedora test. Fails because it doesn't handle ppc64le.
- "FAIL: gdb.arch/powerpc-bcl-prologue.exp: powerpc arch test"
-
- # Commit 301fe55e9c4 ("PowerPC: bp-permanent.exp, kill-after-signal fix").
- "FAIL: gdb.base/kill-after-signal.exp: stepi"
- "FAIL: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=0: stepi signal with handler: mainline pc points at permanent breakpoint"
- "FAIL: gdb.base/bp-permanent.exp: always_inserted=off, sw_watchpoint=1: stepi signal with handler: mainline pc points at permanent breakpoint"
- "FAIL: gdb.base/bp-permanent.exp: always_inserted=on, sw_watchpoint=0: stepi signal with handler: mainline pc points at permanent breakpoint"
- "FAIL: gdb.base/bp-permanent.exp: always_inserted=on, sw_watchpoint=1: stepi signal with handler: mainline pc points at permanent breakpoint"
-
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29813
- "FAIL: gdb.base/vla-optimized-out.exp: o1: printed size of optimized out vla"
-
- # Commit 4d88ae0c7b5 ("[gdb/testsuite] Fix gdb.base/maint.exp on powerpc64le").
- "FAIL: gdb.base/maint.exp: maint print objfiles: symtabs"
-
- # Commit e7d69e72bfd ("gdb: always add the default register groups").
- "FAIL: gdb.xml/tdesc-regs.exp: maintenance print reggroups"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=30548
"FAIL: gdb.base/inline-frame-cycle-unwind.exp: cycle at level [0-9]*: backtrace when the unwind is broken at frame [0-9]*"
@@ -616,15 +533,6 @@
"FAIL: gdb.reverse/next-reverse-bkpt-over-sr.exp: reverse-next over call trips user breakpoint at function entry"
"FAIL: gdb.reverse/next-reverse-bkpt-over-sr.exp: stopped at the right callee call"
- # https://sourceware.org/bugzilla/show_bug.cgi?id=29816
- "FAIL: gdb.ada/float-bits.exp: print 16llf#4000921fb54442d18469898cc51701b8#"
- "FAIL: gdb.ada/float-bits.exp: print \\\$foo:=16llf#4000921fb54442d18469898cc51701b8#"
- "FAIL: gdb.ada/float-bits.exp: print internal long double variable after assignment"
-
- # Commit 8b272d7671f ("[gdb/testsuite] Fix gdb.guile/scm-symtab.exp for
- # ppc64le").
- "FAIL: gdb.guile/scm-symtab.exp: test find-pc-line with resume address"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=29897
"FAIL: gdb.base/run-control-while-bg-execution.exp: action1=.*: action2=start: start \(GDB internal error\)"
"FAIL: gdb.base/run-control-while-bg-execution.exp: action1=.*: action2=run: run \(GDB internal error\)"
@@ -636,28 +544,59 @@
# https://sourceware.org/bugzilla/show_bug.cgi?id=30542
"FAIL: gdb.base/watch-before-fork.exp: test: continue to catch fork"
-
# https://sourceware.org/bugzilla/show_bug.cgi?id=30543
"FAIL: gdb.python/py-send-packet.exp: call python run_auxv_send_packet_test function"
+
+ # Cluster of fails related to hw watchpoint support.
+ "FAIL: gdb.ada/scoped_watch.exp:"
+ "FAIL: gdb.ada/task_watch.exp:"
+ "FAIL: gdb.ada/watch_minus_l.exp:"
+ "FAIL: gdb.base/watch-before-fork.exp:"
+ "FAIL: gdb.base/watch-bitfields.exp:"
+ "FAIL: gdb.base/watch-cond.exp:"
+ "FAIL: gdb.base/watch-cond-infcall.exp:"
+ "FAIL: gdb.base/watchpoint-during-step.exp:"
+ "FAIL: gdb.base/watchpoint.exp:"
+ "FAIL: gdb.base/watchpoint-hw-attach.exp:"
+ "FAIL: gdb.base/watchpoint-hw-hit-once.exp:"
+ "FAIL: gdb.base/watchpoints.exp:"
+ "FAIL: gdb.base/watchpoint-solib.exp:"
+ "FAIL: gdb.base/watchpoint-stops-at-right-insn.exp:"
+ "FAIL: gdb.base/watchpoint-unaligned.exp:"
+ "FAIL: gdb.base/watch-read.exp:"
+ "FAIL: gdb.base/watch_thread_num.exp:"
+ "FAIL: gdb.base/watch-vfork.exp:"
+ "FAIL: gdb.cp/watch-cp.exp:"
+ "FAIL: gdb.mi/mi-watch.exp:"
+ "FAIL: gdb.threads/step-over-trips-on-watchpoint.exp:"
+ "FAIL: gdb.threads/watchpoint-fork.exp:"
+ "FAIL: gdb.threads/watchthreads2.exp:"
+ "FAIL: gdb.threads/wp-replication.exp:"
+ "FAIL: gdb.base/display.exp:"
+ "FAIL: gdb.base/recurse.exp:"
+ "FAIL: gdb.base/gdb11531.exp:"
+ "FAIL: gdb.base/pr11022.exp:"
+ "FAIL: gdb.base/value-double-free.exp: continue \(the program exited\)"
+ "FAIL: gdb.base/value-double-free.exp: print empty\(\)"
+ "FAIL: gdb.cp/annota2.exp: watch triggered on a.x \(timeout\)"
+ "FAIL: gdb.cp/annota2.exp: annotate-quit"
+ "FAIL: gdb.cp/annota3.exp: watch triggered on a.x \(timeout\)"
+ "FAIL: gdb.cp/annota3.exp: annotate-quit \(pattern 1\)"
+ "FAIL: gdb.mi/pr11022.exp:"
+ "FAIL: gdb.python/py-breakpoint.exp: test_watchpoints: Test watchpoint write \(the program exited\)"
+ "FAIL: gdb.python/py-breakpoint.exp: test_bkpt_internal: Test watchpoint write \(the program exited\)"
+ "FAIL: gdb.python/py-breakpoint.exp: test_bkpt_eval_funcs: Test watchpoint write \(the program exited\)"
+
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=31004
+ "FAIL: gdb.base/run-control-while-bg-execution.exp: action1=.*: action2=run: run"
)
kfail_powerpc64le_sle12=(
- # Commit 85819864f7c ("[gdb/testsuite] Fix gdb.arch/altivec-regs.exp with
- # gcc 4.8.5").
- "FAIL: gdb.arch/altivec-regs.exp: down to vector_fun"
- "FAIL: gdb.arch/altivec-regs.exp: finish returned correct value"
- "FAIL: gdb.arch/altivec-regs.exp: print vector parameter a"
- "FAIL: gdb.arch/altivec-regs.exp: print vector parameter b"
-
)
kfail_s390x_s390=(
- # Commit 167f3beb655 ("[gdb/testsuite] Fix gdb.base/write_mem.exp for big
- # endian")
- "FAIL: gdb.base/write_mem.exp: x /xh main"
-
)
# Plain s390 or s390x/-m31.
@@ -767,10 +706,12 @@
# https://sourceware.org/bugzilla/show_bug.cgi?id=28323
"SLE-12.x86_64.*gdb.ada/mi_dyn_arr.exp"
+ # Gdb runs out of virtual memory, we can expect an internal error.
+ "UNRESOLVED: gdb.base/gcore-excessive-memory.exp: attach"
"UNRESOLVED: gdb.base/gcore-excessive-memory.exp: verify we can get to main"
- # https://sourceware.org/bugzilla/show_bug.cgi?id=30547
- "UNRESOLVED: gdb.base/vfork-follow-parent.exp: resolution_method=schedule-multiple: continue to break_parent"
+ # https://sourceware.org/bugzilla/show_bug.cgi?id=31001
+ "UNRESOLVED: gdb.threads/async.exp: thread 1: current thread is 1"
)
kfail_re=$(join "|" "${kfail[@]}")
@@ -936,7 +877,7 @@
(
# Known clean config: Factory i586
- config=openSUSE_Factory.i586/gdb-testresults
+ config=openSUSE_Factory_LegacyX86.i586/gdb-testresults
sums=("$config/gdb-i586-suse-linux-m32.-fno-PIE.-no-pie.sum"
"$config/gdb-i586-suse-linux-m32.sum")
@@ -1052,3 +993,5 @@
;;
esac
+true
+
++++++ xcoffread.c-fix-werror-dangling-pointer-issue-with-m.patch ++++++
From c835eac78b389ce1e29aade9d0468c13854c1cb9 Mon Sep 17 00:00:00 2001
From: Mark Wielaard <mark(a)klomp.org>
Date: Sat, 29 Apr 2023 22:46:11 +0200
Subject: [PATCH 1/3] xcoffread.c: Fix -Werror=dangling-pointer= issue with
main_subfile.
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
GCC 13 points out that main_subfile has local function scope, but a
pointer to it is assigned to the global inclTable array subfile
element field:
In function ‘void process_linenos(CORE_ADDR, CORE_ADDR)’,
inlined from ‘void aix_process_linenos(objfile*)’ at xcoffread.c:727:19,
inlined from ‘void aix_process_linenos(objfile*)’ at xcoffread.c:720:1:
xcoffread.c:629:37: error: storing the address of local variable ‘main_subfile’ in ‘*inclTable.19_45 + _28._inclTable::subfile’ [-Werror=dangling-pointer=]
629 | inclTable[ii].subfile = &main_subfile;
| ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~
xcoffread.c: In function ‘void aix_process_linenos(objfile*)’:
xcoffread.c:579:18: note: ‘main_subfile’ declared here
579 | struct subfile main_subfile;
| ^~~~~~~~~~~~
xcoffread.c:496:19: note: ‘inclTable’ declared here
496 | static InclTable *inclTable; /* global include table */
| ^~~~~~~~~
Fix this by making main_subfile file static. And allocate and
deallocated together with inclTable in allocate_include_entry and
xcoff_symfile_finish. Adjust the use of main_subfile in
process_linenos to take a pointer to the subfile.
---
gdb/xcoffread.c | 24 +++++++++++++-----------
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/gdb/xcoffread.c b/gdb/xcoffread.c
index 52ae3aecb97..53779259b57 100644
--- a/gdb/xcoffread.c
+++ b/gdb/xcoffread.c
@@ -501,6 +501,9 @@ static int inclIndx; /* last entry to table */
static int inclLength; /* table length */
static int inclDepth; /* nested include depth */
+/* subfile structure for the main compilation unit. */
+static subfile *main_subfile;
+
static void allocate_include_entry (void);
static void
@@ -551,6 +554,7 @@ allocate_include_entry (void)
inclTable = XCNEWVEC (InclTable, INITIAL_INCLUDE_TABLE_LENGTH);
inclLength = INITIAL_INCLUDE_TABLE_LENGTH;
inclIndx = 0;
+ main_subfile = new subfile;
}
else if (inclIndx >= inclLength)
{
@@ -578,9 +582,6 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
file_ptr max_offset
= XCOFF_DATA (this_symtab_objfile)->max_lineno_offset;
- /* subfile structure for the main compilation unit. */
- struct subfile main_subfile;
-
/* In the main source file, any time we see a function entry, we
reset this variable to function's absolute starting line number.
All the following line numbers in the function are relative to
@@ -599,7 +600,7 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
/* All source lines were in the main source file. None in include
files. */
- enter_line_range (&main_subfile, offset, 0, start, end,
+ enter_line_range (main_subfile, offset, 0, start, end,
&main_source_baseline);
else
@@ -616,7 +617,7 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
if (offset < inclTable[ii].begin)
{
enter_line_range
- (&main_subfile, offset, inclTable[ii].begin - linesz,
+ (main_subfile, offset, inclTable[ii].begin - linesz,
start, 0, &main_source_baseline);
}
@@ -627,9 +628,9 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
main_source_baseline = inclTable[ii].funStartLine;
enter_line_range
- (&main_subfile, inclTable[ii].begin, inclTable[ii].end,
+ (main_subfile, inclTable[ii].begin, inclTable[ii].end,
start, 0, &main_source_baseline);
- inclTable[ii].subfile = &main_subfile;
+ inclTable[ii].subfile = main_subfile;
}
else
{
@@ -651,24 +652,24 @@ process_linenos (CORE_ADDR start, CORE_ADDR end)
enter remaining lines of the main file, if any left. */
if (offset < max_offset + 1 - linesz)
{
- enter_line_range (&main_subfile, offset, 0, start, end,
+ enter_line_range (main_subfile, offset, 0, start, end,
&main_source_baseline);
}
}
/* Process main file's line numbers. */
- if (!main_subfile.line_vector_entries.empty ())
+ if (!main_subfile->line_vector_entries.empty ())
{
/* Line numbers are not necessarily ordered. xlc compilation will
put static function to the end. */
- arrange_linetable (main_subfile.line_vector_entries);
+ arrange_linetable (main_subfile->line_vector_entries);
}
/* Now, process included files' line numbers. */
for (int ii = 0; ii < inclIndx; ++ii)
{
- if (inclTable[ii].subfile != ((struct subfile *) &main_subfile)
+ if (inclTable[ii].subfile != main_subfile
&& !inclTable[ii].subfile->line_vector_entries.empty ())
{
/* Line numbers are not necessarily ordered. xlc compilation will
@@ -1811,6 +1812,7 @@ xcoff_symfile_finish (struct objfile *objfile)
{
xfree (inclTable);
inclTable = NULL;
+ delete main_subfile;
}
inclIndx = inclLength = inclDepth = 0;
}
base-commit: 38a5283b23caca5317eaeb7927a5a11eccc6eb69
--
2.35.3
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package dbus-1 for openSUSE:Factory checked in at 2023-11-17 15:11:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dbus-1 (Old)
and /work/SRC/openSUSE:Factory/.dbus-1.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "dbus-1"
Fri Nov 17 15:11:48 2023 rev:180 rq: version:1.14.10
Changes:
--------
dbus-1-x11.changes: same change
dbus-1.changes: same change
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
dbus-1-x11.spec: same change
++++++ dbus-1.spec ++++++
--- /var/tmp/diff_new_pack.xiEb5R/_old 2023-11-17 15:11:50.897609694 +0100
+++ /var/tmp/diff_new_pack.xiEb5R/_new 2023-11-17 15:11:50.897609694 +0100
@@ -50,7 +50,7 @@
BuildRequires: pkgconfig(libsystemd) >= 209
Requires: alts
Requires(post): %{_libname} = %{version}
-Requires(post): diffutils
+Requires(post): /usr/bin/cmp
Requires(pre): permissions
Provides: dbus-launch = %{version}
%if %{with selinux}
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package 000release-packages for openSUSE:Factory checked in at 2023-11-17 00:08:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/000release-packages (Old)
and /work/SRC/openSUSE:Factory/.000release-packages.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "000release-packages"
Fri Nov 17 00:08:52 2023 rev:2594 rq: version:unknown
Changes:
--------
New Changes file:
NO CHANGES FILE!!!
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
MicroOS-release.spec: same change
openSUSE-Addon-NonOss-release.spec: same change
openSUSE-release.spec: same change
stub.spec: same change
++++++ weakremovers.inc ++++++
--- /var/tmp/diff_new_pack.WRoh9I/_old 2023-11-17 00:08:56.225224070 +0100
+++ /var/tmp/diff_new_pack.WRoh9I/_new 2023-11-17 00:08:56.237224514 +0100
@@ -3915,6 +3915,10 @@
Provides: weakremover(ghc-countable-devel)
Provides: weakremover(ghc-courier)
Provides: weakremover(ghc-courier-devel)
+Provides: weakremover(ghc-cprng-aes)
+Provides: weakremover(ghc-cprng-aes-devel)
+Provides: weakremover(ghc-cprng-aes-doc)
+Provides: weakremover(ghc-cprng-aes-prof)
Provides: weakremover(ghc-cpu)
Provides: weakremover(ghc-cpu-devel)
Provides: weakremover(ghc-cpuinfo)
@@ -8029,6 +8033,7 @@
Provides: weakremover(katacontainers-image-initrd)
Provides: weakremover(kate4-parts)
Provides: weakremover(kauth-devel-32bit)
+Provides: weakremover(kbibtex-devel)
Provides: weakremover(kbiff)
Provides: weakremover(kblog-devel)
Provides: weakremover(kblog-lang)
@@ -11694,6 +11699,7 @@
Provides: weakremover(libcinnamon-desktop4-32bit)
Provides: weakremover(libcinnamon-menu-3-0-32bit)
Provides: weakremover(libcint3)
+Provides: weakremover(libcint4)
Provides: weakremover(libcivetweb-cpp1_14_0)
Provides: weakremover(libcivetweb1_11_0)
Provides: weakremover(libcivetweb1_13_0)
@@ -15960,6 +15966,7 @@
Provides: weakremover(librssguard-4_3_2)
Provides: weakremover(librssguard-4_3_3)
Provides: weakremover(librssguard-4_3_4)
+Provides: weakremover(librssguard-4_5_3)
Provides: weakremover(librsvg-lang)
Provides: weakremover(librtlsdr0)
Provides: weakremover(librtmidi4)
@@ -16820,6 +16827,7 @@
Provides: weakremover(libvolk2_4)
Provides: weakremover(libvolk2_5)
Provides: weakremover(libvolume_key1)
+Provides: weakremover(libvotca2022)
Provides: weakremover(libvotca_csg2021)
Provides: weakremover(libvotca_csg4)
Provides: weakremover(libvotca_csg5)
@@ -20125,6 +20133,7 @@
Provides: weakremover(pipewire-media-session-lang)
Provides: weakremover(pipewire-spa-plugins)
Provides: weakremover(pipewire0_2-compat)
+Provides: weakremover(pixmap)
Provides: weakremover(pk-update-icon-lang)
Provides: weakremover(pkipplib)
Provides: weakremover(plank-theme-plata)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package perl-CPAN-Changes for openSUSE:Factory checked in at 2023-11-16 20:31:10
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-CPAN-Changes (Old)
and /work/SRC/openSUSE:Factory/.perl-CPAN-Changes.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-CPAN-Changes"
Thu Nov 16 20:31:10 2023 rev:5 rq:1126974 version:0.500002
Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-CPAN-Changes/perl-CPAN-Changes.changes 2017-07-23 12:14:07.854024335 +0200
+++ /work/SRC/openSUSE:Factory/.perl-CPAN-Changes.new.2521/perl-CPAN-Changes.changes 2023-11-16 20:31:16.114357749 +0100
@@ -1,0 +2,17 @@
+Fri Oct 27 03:06:03 UTC 2023 - Tina Müller <timueller+perl(a)suse.de>
+
+- updated to 0.500002
+ see /usr/share/doc/packages/perl-CPAN-Changes/Changes
+
+ 0.500002 - 2023-10-26
+ - releasing as stable
+
+ 0.500_001 - 2023-08-27
+ - Full rewrite. The new version can parse nested entries to an arbitrary
+ depth, rather than just groups. It can parse many more formats, and can
+ format the outputs more flexibly. This means it can better handle the
+ change logs that actually exist on CPAN.
+ - parsed releases keep their original order
+ - Pass given ChangeLog filename for --check (Tux)
+
+-------------------------------------------------------------------
Old:
----
CPAN-Changes-0.400002.tar.gz
New:
----
CPAN-Changes-0.500002.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-CPAN-Changes.spec ++++++
--- /var/tmp/diff_new_pack.WMU8hk/_old 2023-11-16 20:31:16.938388131 +0100
+++ /var/tmp/diff_new_pack.WMU8hk/_new 2023-11-16 20:31:16.942388278 +0100
@@ -1,7 +1,7 @@
#
# spec file for package perl-CPAN-Changes
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2023 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -12,27 +12,31 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
-# Please submit bugfixes or comments via http://bugs.opensuse.org/
+# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
+%define cpan_name CPAN-Changes
Name: perl-CPAN-Changes
-Version: 0.400002
+Version: 0.500002
Release: 0
-%define cpan_name CPAN-Changes
-Summary: Read and write Changes files
-License: Artistic-1.0 or GPL-1.0+
-Group: Development/Libraries/Perl
-Url: http://search.cpan.org/dist/CPAN-Changes/
-Source0: http://www.cpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar.gz
+License: Artistic-1.0 OR GPL-1.0-or-later
+Summary: Parser for CPAN style change logs
+URL: https://metacpan.org/release/%{cpan_name}
+Source0: https://cpan.metacpan.org/authors/id/H/HA/HAARG/%{cpan_name}-%{version}.tar…
Source1: cpanspec.yml
BuildArch: noarch
-BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: perl
BuildRequires: perl-macros
+BuildRequires: perl(Module::Runtime)
+BuildRequires: perl(Moo) >= 1.006000
+BuildRequires: perl(Sub::Quote) >= 1.005000
BuildRequires: perl(Test::More) >= 0.96
-#BuildRequires: perl(version) >= 0.9906
-#Requires: perl(version) >= 0.9906
+BuildRequires: perl(Types::Standard)
+Requires: perl(Module::Runtime)
+Requires: perl(Moo) >= 1.006000
+Requires: perl(Sub::Quote) >= 1.005000
+Requires: perl(Types::Standard)
%{perl_requires}
%description
@@ -41,21 +45,21 @@
since the last release.
People have devised many ways to write the Changes file. A preliminary
-specification has been created (the CPAN::Changes::Spec manpage) to
-encourage module authors to write clear and concise Changes.
+specification has been created (CPAN::Changes::Spec) to encourage module
+authors to write clear and concise Changes.
This module will help users programmatically read and write Changes files
that conform to the specification.
%prep
-%setup -q -n %{cpan_name}-%{version}
+%autosetup -n %{cpan_name}-%{version}
%build
-%{__perl} Makefile.PL INSTALLDIRS=vendor
-%{__make} %{?_smp_mflags}
+perl Makefile.PL INSTALLDIRS=vendor
+%make_build
%check
-%{__make} test
+make test
%install
%perl_make_install
@@ -63,6 +67,6 @@
%perl_gen_filelist
%files -f %{name}.files
-%defattr(-,root,root,755)
%doc Changes README
+%license LICENSE
++++++ CPAN-Changes-0.400002.tar.gz -> CPAN-Changes-0.500002.tar.gz ++++++
++++ 58908 lines of diff (skipped)
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package kyverno for openSUSE:Factory checked in at 2023-11-16 20:30:35
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/kyverno (Old)
and /work/SRC/openSUSE:Factory/.kyverno.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kyverno"
Thu Nov 16 20:30:35 2023 rev:27 rq:1126951 version:1.11.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/kyverno/kyverno.changes 2023-11-13 22:25:19.269333980 +0100
+++ /work/SRC/openSUSE:Factory/.kyverno.new.2521/kyverno.changes 2023-11-16 20:30:46.609269891 +0100
@@ -1,0 +2,194 @@
+Thu Nov 16 15:02:05 UTC 2023 - kastl(a)b1-systems.de
+
+- Update to version 1.11.0:
+ * Breaking (Potentially) ❗
+ - Policy Reports are now created on a per-resource basis and
+ using a UID as the name rather than the previous behavior of
+ per-policy. This may be a breaking change if you relied upon
+ either of these attributes in previous versions. This change
+ has the benefit of putting less pressure on the Kubernetes
+ API server and less storage cost on etcd.
+ - In accordance with Cosign 2.0 updates, the Rekor URL is now
+ required in a policy. The url field may be empty ("") but
+ must be specified even if you've opted not to store
+ signatures in a Rekor instance. Users upgrading from Kyverno
+ v1.10 to v1.11 who have image verification policies using
+ cosign will have to explicitly disable Tlogs and SCT
+ verification in their policy using the rekor.ignoreTlogs and
+ ctlog.IgnoreSCT fields if they did not use Rekor while
+ signing the image.
+ * Added
+ - Context variables are now supported in cleanup policies
+ (#6084)
+ - Introduced ability to cleanup resources based upon assignment
+ of a new reserved label cleanup.kyverno.io/ttl (#7821, #8096,
+ #8128, #8660)
+ - ValidatingAdmissionPolicies (VAP) can now be tested in the
+ Kyverno CLI in both test and apply commands (#6656)
+ - ValidatingAdmissionPolicies can be generated/managed by
+ Kyverno when a compatible validate.cel rule is created
+ (#7840, #8219)
+ - Generate Policy Reports for VAPs (#8135)
+ - Kyverno validate rules can now be written using CEL
+ expressions, including auto-gen support (#7859, #8024, #8071,
+ #8084, #8098, #8099, #8196)
+ - Added a new field in a policy at spec.admission which, when
+ set to false, allows policies to work in background-only mode
+ (#6666)
+ - Added a new field under verifyImages rules called
+ imageRegistryCredentials which allows flexible, easier
+ configuration of credentials for image registries including
+ defining the required credential helpers (#7114)
+ - Added new caching of image signature verifications (#7890,
+ #7969)
+ - New lookup() JMESPath filter (#7136)
+ - New round() JMESPath filter (#7489)
+ - Support for Cosign 2.0 (#7248, #8521)
+ - Added an auth checker interface from Kyverno Playground
+ (#7323)
+ - Added a check for digest mismatch in verifyImages rules
+ (#8443)
+ - Added new ability to more finely control configuration of
+ metrics (#8569)
+ - Added an --aggregateReports flag to the reports controller to
+ enable/disable aggregated reports (#7475)
+ - Events are now created in the events.k8s.io/v1 API group and
+ version (#7673)
+ - Generate rules now support using server-side apply via the
+ field spec.useServerSideApply (#7705)
+ - Added CLI API schema for test command (#8422, #8438, #8439,
+ see also Changed below)
+ - Added new create commands to the Kyverno CLI used to easily
+ create the various resources needed for testing (#7778,
+ #7779, #7780, #7781, #7782, #8160)
+ - Added new Kyverno CLI docs command to generate CLI
+ documentation (#8179, #8180, #8181, #8191, #8193, #8200,
+ #8259)
+ - Added Kyverno CLI experimental fix command (#8213, #8404)
+ - Added support for wildcards in CLI test command (#8216)
+ - Kyverno CLI now has experimental validation of policies being
+ tested (#8384, #8406, #8410)
+ - Added ability to test supported ValidatingAdmissionPolicies
+ (VAP) variables in both Kyverno CLI test and apply commands
+ (#8182)
+ - Kyverno is now tested against and uses libraries from
+ Kubernetes version 1.28 (#8036, #8037)
+ - Kyverno now supports configuring matchConditions in webhooks
+ (Kubernetes 1.27+) (#8042)
+ - Wildcards now work in subject statements in match/exclude
+ (#8068)
+ - Added variables support for Kyverno validate.cel policies
+ (#8103, #8113)
+ - Added CTLogs verification to Cosign (#8130, #8166)
+ - New metric of type Meter is added for the TTL cleanup manager
+ with attributes resource_group, resource_version, and
+ resource_resource (#8134)
+ - Added ability to configure TUF when using a custom Sigstore
+ implementation (#8385)
+ - Added ability to disable TUF when used in air-gapped
+ environments (#8509)
+ - Helm
+ - Added API priority and fairness resources to the Kyverno
+ chart (FlowSchema and PriorityLevelConfiguration) (#7468)
+ - Added ability to set security contexts for the webhook
+ cleanup Pod (#7970)
+ - Added Helm secret size check to CI to detect of the current
+ chart size exceeds the Helm secret size limit (#8195)
+ - Allow resourceNames on extraResources for the cleanup
+ controller (#8307)
+ - Added a global image registry value (#8625)
+ * Changed
+ - Policy Exceptions and Cleanup Policies graduated from alpha
+ API to beta (#8594, #8609, #8621, #8378, #8587)
+ - Policy Exceptions are now enabled by default (#8545)
+ - Policy Reports are changed to be generated per-resource
+ rather than per-policy, and intermediary aggregated reports
+ are expunged immediately (#8426)
+ - Schema validation will no longer be done on patterns
+ (including internal validation for mutate rules) obviating
+ the need for spec.schemaValidation. We will deprecate and
+ remove this field in a future version (#8538)
+ - Cleanup policies no longer use CronJobs to invoke the cleanup
+ action. This is all handled internally now (#8526, #8529,
+ #8531)
+ - Kyverno CLI test command has been refactored and includes a
+ formal test manifest schema (#8422, #6871, #6942, #7995,
+ #8145, #8163, #8168, #8177, #8189, #8212, #8387, and more)
+ - Kyverno CLI apply command now has a nice tabular output
+ format (#7757)
+ - Kyverno CLI apply now shows failure messages when a result
+ fails (#7758)
+ - Kyverno CLI --compact flag has been renamed to
+ --detailed-results (#7937)
+ - Kyverno CLI the --set flag can be used to set a variable for
+ multiple input resources rather than just one (#7984)
+ - Kyverno CLI certain more "internal" flags will no longer be
+ hidden (#8077)
+ - Refactored JSON patches to use structure instead of byte
+ arrays (#7186)
+ - Deprecated the --imageSignatureRepository container flag. Use
+ verifyImages.Repository in a policy definition instead
+ (#7391)
+ - Replaced the internal package used to apply JSON patches.
+ This resulted in some fixes and slight behavioral changes
+ (#7401, #7452)
+ - The policies.kyverno.io/last-applied-patches annotation upon
+ successful mutation has been removed (#7438)
+ - RBAC has been hardened for a couple controllers to better
+ follow least privileges (#7626, #7634, #7638, #8083)
+ - The images variable ({{ images }}) can be used correctly in a
+ policy (#7787)
+ - Use a new custom keychains from Flux package preventing some
+ timeouts (#7908)
+ - Allow overriding CA and TLS secret names which store the
+ Kyverno certificates (#8137)
+ - Replaced CLI manifest commands by create command (#8165)
+ - Kyverno CLI test command has been extended to support
+ multiple paths (#8247)
+ - The remainder of match/excludewill be skipped if
+ theoperations[]` do not match (#8324)
+ - Helm
+ - The Grafana dashboard has been moved to its own subchart in
+ an effort to reduce the size of the main Kyverno chart
+ (#8619)
+ - Kyverno CRDs have been moved to a subchart for the same
+ reason (#8623)
+ - Updated the Chart metadata so the minimum version is
+ correctly aligned with that of Kyverno itself (#8708)
+ * Fixed
+ - Abort pattern validation earlier when processing can occur
+ (#7307)
+ - Fixed an issue when testing for mutations using foreach
+ (#7396)
+ - Fixed not validating that subject kinds were on the allowed
+ list (#7582)
+ - Fixed a panic when certain environment variables weren't
+ passed to the controllers (#7613)
+ - Fixed the missing severity type when generating a policy
+ report (#7974)
+ - Fixed adding server name into TLS certs when running Kyverno
+ with --serverIP flag (#8053)
+ - Fixed an issue which prevented mutation of policy report
+ resources (#8080)
+ - Fixed a crash when using an unquoted null (#8081)
+ - Fixed indefinitely retry for the mutateExisting rule by
+ applying the retry limit (#8100)
+ - Fixed nil-dereferences by adding mocks to unit tests (#8102)
+ - Fixed TLS cert renewal when the CA cert is deleted (#8114)
+ - Fixed a nil dereference in validate.podSecurity subrules
+ (#8271)
+ - Fixed an issue where generating an empty kind would be
+ allowed (#8332)
+ - Fixed/improved some logs (#8442, #8673)
+ - Fixed a couple issues impacting generate rules when a trigger
+ or clone source resource name exceeded 63 characeters (#8466)
+ - Fixed an issue where Kyverno would modify reports it didn't
+ own (#8502)
+ - Fixed an image cache panic issue (#8512)
+ - Fixed an issue preventing creation of ClusterAdmissionReports
+ if the resource had a colon in the name (#8530)
+ - Kyverno CLI: fixed using the --fail-only flag in the test
+ command now exits properly upon failed tests (#7717)
+ - Kyverno CLI: fixed logging failure (#8110)
+
+-------------------------------------------------------------------
Old:
----
kyverno-1.10.5.obscpio
New:
----
kyverno-1.11.0.obscpio
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ kyverno.spec ++++++
--- /var/tmp/diff_new_pack.684Fvw/_old 2023-11-16 20:30:47.933318709 +0100
+++ /var/tmp/diff_new_pack.684Fvw/_new 2023-11-16 20:30:47.937318857 +0100
@@ -19,7 +19,7 @@
%define __arch_install_post export NO_BRP_STRIP_DEBUG=true
Name: kyverno
-Version: 1.10.5
+Version: 1.11.0
Release: 0
Summary: CLI and kubectl plugin for Kyverno
License: Apache-2.0
++++++ _service ++++++
--- /var/tmp/diff_new_pack.684Fvw/_old 2023-11-16 20:30:47.961319742 +0100
+++ /var/tmp/diff_new_pack.684Fvw/_new 2023-11-16 20:30:47.965319889 +0100
@@ -3,7 +3,7 @@
<param name="url">https://github.com/kyverno/kyverno</param>
<param name="scm">git</param>
<param name="exclude">.git</param>
- <param name="revision">v1.10.5</param>
+ <param name="revision">v1.11.0</param>
<param name="versionformat">@PARENT_TAG@</param>
<param name="changesgenerate">enable</param>
<param name="versionrewrite-pattern">v(.*)</param>
++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.684Fvw/_old 2023-11-16 20:30:47.985320627 +0100
+++ /var/tmp/diff_new_pack.684Fvw/_new 2023-11-16 20:30:47.989320774 +0100
@@ -1,6 +1,6 @@
<servicedata>
<service name="tar_scm">
<param name="url">https://github.com/kyverno/kyverno</param>
- <param name="changesrevision">1dfd2e2ca60b87352df9d6c69d88c259c59a8283</param></service></servicedata>
+ <param name="changesrevision">a411fe6377afc165f31f251d119ab526f56fcfb6</param></service></servicedata>
(No newline at EOF)
++++++ kyverno-1.10.5.obscpio -> kyverno-1.11.0.obscpio ++++++
/work/SRC/openSUSE:Factory/kyverno/kyverno-1.10.5.obscpio /work/SRC/openSUSE:Factory/.kyverno.new.2521/kyverno-1.11.0.obscpio differ: char 50, line 1
++++++ kyverno.obsinfo ++++++
--- /var/tmp/diff_new_pack.684Fvw/_old 2023-11-16 20:30:48.033322396 +0100
+++ /var/tmp/diff_new_pack.684Fvw/_new 2023-11-16 20:30:48.037322543 +0100
@@ -1,5 +1,5 @@
name: kyverno
-version: 1.10.5
-mtime: 1699615199
-commit: 1dfd2e2ca60b87352df9d6c69d88c259c59a8283
+version: 1.11.0
+mtime: 1699606782
+commit: a411fe6377afc165f31f251d119ab526f56fcfb6
++++++ vendor.tar.gz ++++++
/work/SRC/openSUSE:Factory/kyverno/vendor.tar.gz /work/SRC/openSUSE:Factory/.kyverno.new.2521/vendor.tar.gz differ: char 5, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package python-gst for openSUSE:Factory checked in at 2023-11-16 20:29:05
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-gst (Old)
and /work/SRC/openSUSE:Factory/.python-gst.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "python-gst"
Thu Nov 16 20:29:05 2023 rev:51 rq:1126817 version:1.22.7
Changes:
--------
--- /work/SRC/openSUSE:Factory/python-gst/python-gst.changes 2023-09-29 21:14:51.952545613 +0200
+++ /work/SRC/openSUSE:Factory/.python-gst.new.2521/python-gst.changes 2023-11-16 20:29:09.057673144 +0100
@@ -1,0 +2,7 @@
+Wed Nov 15 09:36:50 UTC 2023 - Antonio Larrosa <alarrosa(a)suse.com>
+
+- Update to version 1.22.7:
+ + No changes, stable bump only.
+- Rebase reduce-required-meson.patch.
+
+-------------------------------------------------------------------
Old:
----
gst-python-1.22.6.tar.xz
New:
----
gst-python-1.22.7.tar.xz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ python-gst.spec ++++++
--- /var/tmp/diff_new_pack.ySNKnq/_old 2023-11-16 20:29:09.693696595 +0100
+++ /var/tmp/diff_new_pack.ySNKnq/_new 2023-11-16 20:29:09.697696742 +0100
@@ -19,7 +19,7 @@
%define _name gst-python
Name: python-gst
-Version: 1.22.6
+Version: 1.22.7
Release: 0
Summary: Python Bindings for GStreamer
License: LGPL-2.1-or-later
++++++ gst-python-1.22.6.tar.xz -> gst-python-1.22.7.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-python-1.22.6/ChangeLog new/gst-python-1.22.7/ChangeLog
--- old/gst-python-1.22.6/ChangeLog 2023-09-20 19:18:31.314894000 +0200
+++ new/gst-python-1.22.7/ChangeLog 2023-11-13 12:11:57.481860400 +0100
@@ -1,3 +1,19 @@
+=== release 1.22.7 ===
+
+2023-11-13 11:04:22 +0000 Tim-Philipp Müller <tim(a)centricular.com>
+
+ * NEWS:
+ * RELEASE:
+ * gst-python.doap:
+ * meson.build:
+ Release 1.22.7
+
+2023-09-20 19:41:00 +0100 Tim-Philipp Müller <tim(a)centricular.com>
+
+ * meson.build:
+ Back to development
+ Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5371>
+
=== release 1.22.6 ===
2023-09-20 18:10:57 +0100 Tim-Philipp Müller <tim(a)centricular.com>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-python-1.22.6/NEWS new/gst-python-1.22.7/NEWS
--- old/gst-python-1.22.6/NEWS 2023-09-20 19:10:57.000000000 +0200
+++ new/gst-python-1.22.7/NEWS 2023-11-13 12:04:22.000000000 +0100
@@ -2,13 +2,13 @@
GStreamer 1.22.0 was originally released on 23 January 2023.
-The latest bug-fix release in the stable 1.22 series is 1.22.5 and was
-released on 20 July 2023.
+The latest bug-fix release in the stable 1.22 series is 1.22.7 and was
+released on 13 November 2023.
See https://gstreamer.freedesktop.org/releases/1.22/ for the latest
version of this document.
-Last updated: Thursday 20 July 2023, 12:00 UTC (log)
+Last updated: Monday 13 November 2023, 10:00 UTC (log)
Introduction
@@ -2366,6 +2366,222 @@
- List of Merge Requests applied in 1.22.6
- List of Issues fixed in 1.22.6
+1.22.7
+
+The seventh 1.22 bug-fix release (1.22.7) was released on 13 November
+2023.
+
+This release only contains bugfixes and security fixes and it should be
+safe to update from 1.22.x.
+
+Highlighted bugfixes in 1.22.7
+
+- Security fixes for the MXF demuxer and AV1 codec parser
+- glfilter: Memory leak fix for OpenGL filter elements
+- d3d11videosink: Fix toggling between fullscreen and maximized, and
+ window switching in fullscreen mode
+- DASH / HLS adaptive streaming fixes
+- Decklink card device provider device name string handling fixes
+- interaudiosrc: handle non-interleaved audio properly
+- openh264: Fail gracefully if openh264 encoder/decoder creation fails
+- rtspsrc: improved whitespace handling in response headers by certain
+ cameras
+- v4l2codecs: avoid wrap-around after 1000000 frames; tiled formats
+ handling fixes
+- video-scaler, audio-resampler: downgraded “Can’t find exact taps”
+ debug log messages
+- wasapi2: Don’t use global volume control object
+- Rust plugins: various improvements in aws, fmp4mux, hlssink3,
+ livesync, ndisrc, rtpav1depay, rsfilesink, s3sink, sccparse
+- WebRTC: various webrtchttp, webrtcsrc, and webrtcsink improvements
+ and fixes
+- Cerbero build tools: recognise Windows 11; restrict parallelism of
+ gst-plugins-rs build on small systems
+- Packages: ca-certificates update; fix gio module loading and TLS
+ support on macOS
+
+gstreamer
+
+- debugutils: provide gst_debug_bin_to_dot_data() implementation even
+ if debug system is disabled
+
+gst-plugins-base
+
+- audioaggregator, audiomixer: Make access to the pad list thread-safe
+ while mixing
+- basetextoverlay: Fix overlay never rendering again if width reaches
+ 1px
+- glfiter: Protect GstGLContext access
+- glfilter: Only add parent meta if inbuf != outbuf
+- macOS: fix huge memory leak with glfilter-based elements
+- rtspconnection: Ignore trailing whitespace in rtsp headers
+- video-scaler, audio-resampler: downgrade ‘can’t find exact taps’ to
+ debug
+
+gst-plugins-good
+
+- adaptivedemux2: Do not submit_transfer when cancelled
+- adaptivedemux2: Call GTasks’s return functions for blocking tasks
+- flacenc: Correctly handle up to 255 cue entries
+- flvmux: set the src segment position as running time
+- imagesequencesrc: fix deadlock when feeding the same image in a loop
+- pngenc: output one frame only in snapshot mode and mark output
+ frames as I-frames
+- qmlglsrc: sync on the streaming thread
+- souphttpsrc: Chain up to finalize to fix memory leak
+- wavparse: fix buffer leak with adtl tag
+- v4l2codecs: Avoid QBUF/DQBUF struct timeval .tv_usec wrap-around at
+ frame 1000000
+- v4l2codecs: Fix tiled formats stride conversion
+
+gst-plugins-bad
+
+- audiobuffersplit: disable max-silence-time if set to 0
+- libde265: Do not decode the non 4:2:0 8 bits format
+- codecparsers: av1: Clip max tile rows and cols values
+- codecs: h265: Do not free slice header before using it
+- d3d11converter: Fix 10/12bits planar output
+- d3d11decoder: Fix crash on negotiate() when decoder is not
+ configured
+- d3d11videosink: Fix toggling between fullscreen and maximized
+- d3d11videosink: Fix window switching in case of fullscreen mode
+- d3d11screencapturesrc: Fix mouse cursor blending
+- decklink: Fix broken COM string conversion
+- decklink: Decklink Device Provider wrongly parses SDK strings
+- gstwayland: Don’t depend on wayland-protocols
+- interaudiosrc: Add audio meta to buffers containing non-interleaved
+ samples
+- kmssink: Add TIDSS auto-detection
+- mfvideoencoder: Fix typo in template caps
+- mxfdemux: Store GstMXFDemuxEssenceTrack in their own fixed
+ allocation
+- nvcodec: fix bounds for auto-select GPU enumeration
+- openh264: Fail gracefully if openh264 encoder/decoder creation fails
+- tsmux: More cleanups
+- tsmux: Fill padding packets with stuffing bytes
+- v4l2codecs: Fix tiled formats stride conversion
+- v4l2videodec: Correctly free caps to avoid memory leak
+- wasapi2: Don’t use global volume control object
+- wasapi2device: Ignore activation failed device
+
+gst-plugins-ugly
+
+- No changes
+
+gst-plugins-rs
+
+- aws: s3sink: Fix handling of special characters in key
+- aws: s3: Properly percent-decode GstS3Url
+- fmp4mux: Don’t overflow negative composition offset calculation
+- fmp4mux: specify the fragment duration unit
+- hlssink3: Use Path API for getting file name
+- hlssink3: Use sprintf for segment name formatting
+- hlssink3: Remove unused deps
+- hlssink3: Don’t remove old files if max-files is zero
+- hlssink3: Don’t remove uri from playlist if playlist-length is zero
+- hlssink3: Various cleanup
+- livesync: log new pending segments
+- livesync: display jitter when waiting on clock
+- livesync: Rename activatemode methods to *_activatemode
+- livesync: Simplify start_src_task and src_loop
+- livesync: Improve audio duration fixups
+- livesync: Log a category error when we are missing the segment
+- livesync: Clean up state handling
+- livesync: Replace an if-let with match
+- livesync: Move a notify closer to the interesting state change
+- livesync: Move num_in counting to the src task
+- livesync: Simplify num_duplicate counting
+- livesync: Handle flags and late buffer patching after queueing
+- livesync: Separate out_buffer duplicate status from GAP flag
+- livesync: Use fallback_duration for audio repeat buffers as well
+- livesync: example: Add identities single-segment=1
+- livesync: Split fallback_duration into in_ and out_duration
+- livesync: Keep existing buffer duration in some cases
+- livesync: Remove the stop from outgoing segments
+- ndisrc: Assume input with more than 8 raw audio channels is
+ unpositioned
+- rtpav1depay: Skip unexpected leading fragments
+- rtpav1depay: Don’t push stale temporal delimiters downstream
+- rsfilesink: set sync=false
+- s3sink: set sync=false
+- sccparse: Fix leading spaces between the tab and caption data
+- webrtchttp: Respect HTTP redirects
+- webrtcsrc: use @watch instead of @to-owned
+- webrtcsrc: add turn-servers property
+- webrtc: Fix paths in README
+- webrtcsink: don’t miss ice candidates
+
+gst-libav
+
+- No changes
+
+gst-rtsp-server
+
+- rtspclientsink: Don’t leak previous server_ip
+
+gstreamer-vaapi
+
+- No changes
+
+gstreamer-sharp
+
+- No changes
+
+gst-omx
+
+- No changes
+
+gst-python
+
+- No changes
+
+gst-editing-services
+
+- No changes
+
+gst-validate + gst-integration-testsuites
+
+- gst-validate: Fix compatibility with Python 3.12
+
+gst-examples
+
+- No changes
+
+Development build environment
+
+- No changes
+
+Cerbero build tool and packaging changes in 1.22.7
+
+- Add Windows 11 to the supported versions list
+- ca-certificates: Update to version from 2023-08-22
+- cargo: Restrict parallelism if a small system is detected (for
+ gst-plugins-rs build)
+- Fix venv setup on Python 3.11+
+- Fix unlinking of Android NDK directories if install fails midway
+- glib: Work around AppleClang + -Werror test build failure
+- glib: Re-add gio module loading patch for macOS, remove unused patch
+ files
+
+Contributors to 1.22.7
+
+Albert Sjölund, Arun Raghavan, Balló György, Benjamin Gaignard, Detlev
+Casanova, Doug Nazar, Eric, Florian Zwoch, François Laignel, Guillaume
+Desmottes, He Junyan, Hou Qi, James Oliver, Jan Alexander Steffens
+(heftig), Jan Schmidt, Johan Adam Nilsson, Jordan Yelloz, Kalev Lember,
+L. E. Segovia, Lieven Paulissen, Maksym Khomenko, Marek Vasut, Matthias
+Fuchs, Michiel Westerbeek, Nicolas Dufresne, Philippe Normand, Piotr
+Brzeziński, Rahul T R, Sean DuBois, Sebastian Dröge, Seungha Yang,
+Stéphane Cerveau, Thibault Saunier, Tim-Philipp Müller,
+
+… and many others who have contributed bug reports, translations, sent
+suggestions or helped testing. Thank you all!
+
+List of merge requests and issues fixed in 1.22.7
+
+- List of Merge Requests applied in 1.22.7
+- List of Issues fixed in 1.22.7
+
Schedule for 1.24
Our next major feature release will be 1.24, and 1.23 will be the
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-python-1.22.6/RELEASE new/gst-python-1.22.7/RELEASE
--- old/gst-python-1.22.6/RELEASE 2023-09-20 19:10:57.000000000 +0200
+++ new/gst-python-1.22.7/RELEASE 2023-11-13 12:04:22.000000000 +0100
@@ -1,4 +1,4 @@
-This is GStreamer gst-python 1.22.6.
+This is GStreamer gst-python 1.22.7.
The GStreamer team is thrilled to announce a new major feature release
of your favourite cross-platform multimedia framework!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-python-1.22.6/gst-python.doap new/gst-python-1.22.7/gst-python.doap
--- old/gst-python-1.22.6/gst-python.doap 2023-09-20 19:10:57.000000000 +0200
+++ new/gst-python-1.22.7/gst-python.doap 2023-11-13 12:04:22.000000000 +0100
@@ -32,6 +32,16 @@
<release>
<Version>
+ <revision>1.22.7</revision>
+ <branch>1.22</branch>
+ <name></name>
+ <created>2023-11-13</created>
+ <file-release rdf:resource="https://gstreamer.freedesktop.org/src/gst-python/gst-python-1.22.7.tar.xz" />
+ </Version>
+ </release>
+
+ <release>
+ <Version>
<revision>1.22.6</revision>
<branch>1.22</branch>
<name></name>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/gst-python-1.22.6/meson.build new/gst-python-1.22.7/meson.build
--- old/gst-python-1.22.6/meson.build 2023-09-20 19:10:57.000000000 +0200
+++ new/gst-python-1.22.7/meson.build 2023-11-13 12:04:22.000000000 +0100
@@ -1,5 +1,5 @@
project('gst-python', 'c',
- version : '1.22.6',
+ version : '1.22.7',
meson_version : '>= 0.62',
default_options : [ 'warning_level=1',
'c_std=gnu99',
++++++ reduce-required-meson.patch ++++++
--- /var/tmp/diff_new_pack.ySNKnq/_old 2023-11-16 20:29:09.813701019 +0100
+++ /var/tmp/diff_new_pack.ySNKnq/_new 2023-11-16 20:29:09.817701167 +0100
@@ -1,10 +1,10 @@
-Index: gst-python-1.22.6/meson.build
+Index: gst-python-1.22.7/meson.build
===================================================================
---- gst-python-1.22.6.orig/meson.build
-+++ gst-python-1.22.6/meson.build
+--- gst-python-1.22.7.orig/meson.build
++++ gst-python-1.22.7/meson.build
@@ -1,6 +1,6 @@
project('gst-python', 'c',
- version : '1.22.6',
+ version : '1.22.7',
- meson_version : '>= 0.62',
+ meson_version : '>= 0.61',
default_options : [ 'warning_level=1',
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package qt6-base for openSUSE:Factory checked in at 2023-11-16 20:28:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/qt6-base (Old)
and /work/SRC/openSUSE:Factory/.qt6-base.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-base"
Thu Nov 16 20:28:40 2023 rev:44 rq:1126794 version:6.6.0
Changes:
--------
--- /work/SRC/openSUSE:Factory/qt6-base/qt6-base.changes 2023-11-03 22:21:53.567907288 +0100
+++ /work/SRC/openSUSE:Factory/.qt6-base.new.2521/qt6-base.changes 2023-11-16 20:28:43.584733951 +0100
@@ -1,0 +2,5 @@
+Thu Nov 16 09:14:40 UTC 2023 - Christophe Marin <christophe(a)krop.fr>
+
+- Make libQt6Network6 require the network plugins
+
+-------------------------------------------------------------------
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ qt6-base.spec ++++++
--- /var/tmp/diff_new_pack.Soxn8K/_old 2023-11-16 20:28:44.636772741 +0100
+++ /var/tmp/diff_new_pack.Soxn8K/_new 2023-11-16 20:28:44.640772888 +0100
@@ -340,8 +340,10 @@
Summary: Qt 6 Network library
Requires: libQt6Core6 = %{version}
Requires: libQt6DBus6 = %{version}
-# The backends became plugins in Qt 6.2
+# Require network plugins. The library is not very useful without these
Requires: qt6-network-tls = %{version}
+Requires: qt6-networkinformation-glib = %{version}
+Requires: qt6-networkinformation-nm = %{version}
%description -n libQt6Network6
Qt Network provides a set of APIs for programming applications that
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package openssl-1_0_0 for openSUSE:Factory checked in at 2023-11-16 20:28:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openssl-1_0_0 (Old)
and /work/SRC/openSUSE:Factory/.openssl-1_0_0.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openssl-1_0_0"
Thu Nov 16 20:28:38 2023 rev:41 rq:1126788 version:1.0.2u
Changes:
--------
--- /work/SRC/openSUSE:Factory/openssl-1_0_0/openssl-1_0_0.changes 2023-08-08 17:26:03.443220012 +0200
+++ /work/SRC/openSUSE:Factory/.openssl-1_0_0.new.2521/openssl-1_0_0.changes 2023-11-16 20:28:40.192608882 +0100
@@ -1,0 +2,15 @@
+Mon Nov 13 09:29:26 UTC 2023 - Otto Hollmann <otto.hollmann(a)suse.com>
+
+- Security fix: [bsc#1216922, CVE-2023-5678]
+ * Fix excessive time spent in DH check / generation with large Q
+ parameter value.
+ * Applications that use the functions DH_generate_key() to generate
+ an X9.42 DH key may experience long delays. Likewise,
+ applications that use DH_check_pub_key(), DH_check_pub_key_ex
+ () or EVP_PKEY_public_check() to check an X9.42 DH key or X9.42
+ DH parameters may experience long delays. Where the key or
+ parameters that are being checked have been obtained from an
+ untrusted source this may lead to a Denial of Service.
+ * Add openssl-CVE-2023-5678.patch
+
+-------------------------------------------------------------------
New:
----
openssl-CVE-2023-5678.patch
BETA DEBUG BEGIN:
New: untrusted source this may lead to a Denial of Service.
* Add openssl-CVE-2023-5678.patch
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openssl-1_0_0.spec ++++++
--- /var/tmp/diff_new_pack.M6DW3g/_old 2023-11-16 20:28:42.564696341 +0100
+++ /var/tmp/diff_new_pack.M6DW3g/_new 2023-11-16 20:28:42.568696489 +0100
@@ -132,6 +132,9 @@
Patch102: openssl-CVE-2023-3446.patch
# PATCH-FIX-UPSTREAM bsc#1213853 CVE-2023-3817 Excessive time spent checking DH q parameter value
Patch103: openssl-1_0-CVE-2023-3817.patch
+# PATCH-FIX-UPSTREAM: bsc#1216922 CVE-2023-5678 Generating excessively long X9.42 DH keys or
+# checking excessively long X9.42 DH keys or parameters may be very slow
+Patch104: openssl-CVE-2023-5678.patch
# steam patches
Patch150: openssl-fix-cpuid_setup.patch
# compat patches to build with soversion 10 (bsc#1175429)
@@ -298,6 +301,7 @@
%patch101 -p1
%patch102 -p1
%patch103 -p1
+%patch104 -p1
# clean up patching leftovers
find . -name '*.orig' -delete
++++++ openssl-CVE-2023-5678.patch ++++++
From db925ae2e65d0d925adef429afc37f75bd1c2017 Mon Sep 17 00:00:00 2001
From: Richard Levitte <levitte(a)openssl.org>
Date: Fri, 20 Oct 2023 09:18:19 +0200
Subject: [PATCH] Make DH_check_pub_key() and DH_generate_key() safer yet
We already check for an excessively large P in DH_generate_key(), but not in
DH_check_pub_key(), and none of them check for an excessively large Q.
This change adds all the missing excessive size checks of P and Q.
It's to be noted that behaviours surrounding excessively sized P and Q
differ. DH_check() raises an error on the excessively sized P, but only
sets a flag for the excessively sized Q. This behaviour is mimicked in
DH_check_pub_key().
Reviewed-by: Tomas Mraz <tomas(a)openssl.org>
Reviewed-by: Matt Caswell <matt(a)openssl.org>
Reviewed-by: Hugo Landau <hlandau(a)openssl.org>
(Merged from https://github.com/openssl/openssl/pull/22518)
(cherry picked from commit ddeb4b6c6d527e54ce9a99cba785c0f7776e54b6)
---
crypto/dh/dh_check.c | 12 ++++++++++++
crypto/dh/dh_err.c | 3 ++-
crypto/dh/dh_key.c | 12 ++++++++++++
crypto/err/openssl.txt | 1 +
include/crypto/dherr.h | 2 +-
include/openssl/dh.h | 6 +++---
include/openssl/dherr.h | 3 ++-
7 files changed, 33 insertions(+), 6 deletions(-)
Index: openssl-1.0.2p/crypto/dh/dh_check.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_check.c
+++ openssl-1.0.2p/crypto/dh/dh_check.c
@@ -230,6 +230,18 @@ static int dh_check_pub_key_int(const DH
*/
int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
{
+ /* Don't do any checks at all with an excessively large modulus */
+ if (BN_num_bits(dh->p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) {
+ DHerr(DH_F_DH_CHECK_PUB_KEY, DH_R_MODULUS_TOO_LARGE);
+ *ret = DH_MODULUS_TOO_LARGE | DH_CHECK_PUBKEY_INVALID;
+ return 0;
+ }
+
+ if (dh->q != NULL && BN_ucmp(dh->p, dh->q) < 0) {
+ *ret |= DH_CHECK_INVALID_Q_VALUE | DH_CHECK_PUBKEY_INVALID;
+ return 1;
+ }
+
return dh_check_pub_key_int(dh, dh->q, pub_key, ret);
}
Index: openssl-1.0.2p/crypto/dh/dh_key.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_key.c
+++ openssl-1.0.2p/crypto/dh/dh_key.c
@@ -95,6 +95,13 @@ int DH_compute_key(unsigned char *key, c
return 0;
}
#endif
+
+ if (dh->q != NULL
+ && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F_DH_COMPUTE_KEY, DH_R_Q_TOO_LARGE);
+ return 0;
+ }
+
return dh->meth->compute_key(key, pub_key, dh);
}
@@ -159,6 +166,12 @@ static int generate_key(DH *dh)
}
#endif
+ if (dh->q != NULL
+ && BN_num_bits(dh->q) > OPENSSL_DH_MAX_MODULUS_BITS) {
+ DHerr(DH_F_GENERATE_KEY, DH_R_Q_TOO_LARGE);
+ return 0;
+ }
+
ctx = BN_CTX_new();
if (ctx == NULL)
goto err;
Index: openssl-1.0.2p/crypto/dh/dh.h
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh.h
+++ openssl-1.0.2p/crypto/dh/dh.h
@@ -175,8 +175,9 @@ struct dh_st {
# define DH_UNABLE_TO_CHECK_GENERATOR 0x04
# define DH_NOT_SUITABLE_GENERATOR 0x08
# define DH_CHECK_Q_NOT_PRIME 0x10
-# define DH_CHECK_INVALID_Q_VALUE 0x20
+# define DH_CHECK_INVALID_Q_VALUE 0x20 /* +DH_check_pub_key */
# define DH_CHECK_INVALID_J_VALUE 0x40
+# define DH_MODULUS_TOO_LARGE 0x100 /* +DH_check_pub_key */
/* DH_check_pub_key error codes */
# define DH_CHECK_PUBKEY_TOO_SMALL 0x01
@@ -400,6 +401,7 @@ void ERR_load_DH_strings(void);
# define DH_F_DHPARAMS_PRINT_FP 101
# define DH_F_DH_BUILTIN_GENPARAMS 106
# define DH_F_DH_CHECK 126
+# define DH_F_DH_CHECK_PUB_KEY 128
# define DH_F_DH_CMS_DECRYPT 117
# define DH_F_DH_CMS_SET_PEERKEY 118
# define DH_F_DH_CMS_SET_SHARED_INFO 119
@@ -434,6 +436,7 @@ void ERR_load_DH_strings(void);
# define DH_R_NO_PRIVATE_VALUE 100
# define DH_R_PARAMETER_ENCODING_ERROR 105
# define DH_R_PEER_KEY_ERROR 113
+# define DH_R_Q_TOO_LARGE 130
# define DH_R_SHARED_INFO_ERROR 114
# define DH_R_INVALID_PARAMETER_NID 120
Index: openssl-1.0.2p/crypto/dh/dh_err.c
===================================================================
--- openssl-1.0.2p.orig/crypto/dh/dh_err.c
+++ openssl-1.0.2p/crypto/dh/dh_err.c
@@ -74,6 +74,7 @@ static ERR_STRING_DATA DH_str_functs[] =
{ERR_FUNC(DH_F_DHPARAMS_PRINT_FP), "DHparams_print_fp"},
{ERR_FUNC(DH_F_DH_BUILTIN_GENPARAMS), "DH_BUILTIN_GENPARAMS"},
{ERR_FUNC(DH_F_DH_CHECK), "DH_check"},
+ {ERR_FUNC(DH_F_DH_CHECK_PUB_KEY), "DH_check_pub_key"},
{ERR_FUNC(DH_F_DH_CMS_DECRYPT), "DH_CMS_DECRYPT"},
{ERR_FUNC(DH_F_DH_CMS_SET_PEERKEY), "DH_CMS_SET_PEERKEY"},
{ERR_FUNC(DH_F_DH_CMS_SET_SHARED_INFO), "DH_CMS_SET_SHARED_INFO"},
@@ -111,6 +112,7 @@ static ERR_STRING_DATA DH_str_reasons[]
{ERR_REASON(DH_R_NO_PRIVATE_VALUE), "no private value"},
{ERR_REASON(DH_R_PARAMETER_ENCODING_ERROR), "parameter encoding error"},
{ERR_REASON(DH_R_PEER_KEY_ERROR), "peer key error"},
+ {ERR_REASON(DH_R_Q_TOO_LARGE), "q too large"},
{ERR_REASON(DH_R_SHARED_INFO_ERROR), "shared info error"},
{0, NULL}
};
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package votca for openSUSE:Factory checked in at 2023-11-16 20:28:34
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/votca (Old)
and /work/SRC/openSUSE:Factory/.votca.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "votca"
Thu Nov 16 20:28:34 2023 rev:9 rq:1126770 version:2023
Changes:
--------
--- /work/SRC/openSUSE:Factory/votca/votca.changes 2023-11-14 21:42:48.084106495 +0100
+++ /work/SRC/openSUSE:Factory/.votca.new.2521/votca.changes 2023-11-16 20:28:36.876486616 +0100
@@ -1,0 +2,59 @@
+Thu Nov 16 04:24:41 UTC 2023 - Christoph Junghans <junghans(a)votca.org>
+
+- Drop 1083.patch - merged upstream
+- Add 1093.patch from upstream to fix python shebang
+- Update to 2023
+ - fix pyxtp option restart ([gh#votca/votca#1074])
+ - fix Changelog check ([gh#votca/votca#1070])
+ - add python bindings for xtp ([gh#votca/votca#1061])
+ - replaced pointers in MD2QM mapping ([gh#votca/votca#1075])
+ - fixed typo in esp2multipole option ([gh#votca/votca#1076])
+ - update MKL detection to MKL config ([gh#votca/votca#1053])
+ - remove geometry optimization ([gh#votca/votca#1077])
+ - remove all references to old pdf manual ([gh#votca/votca#1081])
+ - replaced deprecated boost::progress headers ([gh#votca/votca#1083])
+ - drop intel classic builds from CI ([gh#votca/votca#1085])
+ - disable some libint2 warning and CI clean up ([gh#votca/votca#1088])
+ - fix population analysis for embedded DFT ([gh#votca/votca#1089])
+ - fix pyxtp xtp-tutorials ([gh#votca/votca#1090])
+ - add note on gmx build for install ([gh#votca/votca#1052])
+ - fix typos in esp2multipole options ([gh#votca/votca#1054])
+ - Used sharedable lock in xtp ([gh#votca/votca#1057])
+ - Make votca tests compile without OpenMP ([gh#votca/votca#1065])
+ - increase tolerance for diabatization test ([gh#votca/votca#1039],
+ [gh#votca/votca#1043])
+ - removed boost::filesystem ([gh#votca/votca#1041])
+ - clean up C++ defines ([gh#votca/votca#1044])
+ - drop gmx-2022 builds from CI ([gh#votca/votca#1046])
+ - update ccaching in CI ([gh#votca/votca#1048], [gh#votca/votca#1050])
+ - add support for gmx-2023 api ([gh#votca/votca#1059])
+ - updated formatting ([gh#votca/votca#1062])
+ - remove stable branch workflow ([gh#votca/votca#1066])
+ - Refactor changelog actions ([gh#votca/votca#1068])
+ - fix CI build with icpx ([gh#votca/votca#1018])
+ - implemented projection-based DFT embedding ([gh#votca/votca#964])
+ - Added LMO energy output and cube file generation ([gh#votca/votca#970])
+ - fix typos in csg-tutorials xml files ([gh#votca/votca#980])
+ - unitary optimization for localization of orbitals ([gh#votca/votca#971])
+ - separate option for density max convergence tolerance in qmmm
+ ([gh#votca/votca#987])
+ - Correct ECP charges added in Orca Molden reader ([gh#votca/votca#990])
+ - Implemented truncated basis for embedded DFT ([gh#votca/votca#991])
+ - Implemented ER diabatization for BSE ([gh#votca/votca#988])
+ - update esp++ spce tutorial to py3 ([gh#votca/votca#997])
+ - Truncated GW-in-DFT embedded in static/polar MM implemeted
+ ([gh#votca/votca#1003])
+ - reducing XTP tutorial size ([gh#votca/votca#1020], [gh#votca/votca#1025])
+ - Clean up 3body Stillinger-Weber implement, docs and tutorial
+ ([gh#votca/votca#1012])
+ - fixed options handling in xtp_autogen_mapping ([gh#votca/votca#1024])
+ - Major CMake refactor ([gh#votca/votca#950], [gh#votca/votca#1022])
+ - Fix all doxygen warnings ([gh#votca/votca#1026])
+ - basis and auxbasis are written to QMMM checkpoint file
+ ([gh#votca/votca#1030])
+ - iterations_max can now be zero ([gh#votca/votca#1033])
+ - add an XML check to csg_inverse ([gh#votca/votca#1031])
+ - fix propane/imc and add propane/imc-ibiintra to csg-tutorials
+ ([gh#votca/votca#821])
+
+-------------------------------------------------------------------
Old:
----
1083.patch
votca-2022.1.tar.gz
New:
----
1093.patch
votca-2023.tar.gz
BETA DEBUG BEGIN:
Old:
- Drop 1083.patch - merged upstream
- Add 1093.patch from upstream to fix python shebang
BETA DEBUG END:
BETA DEBUG BEGIN:
New:- Drop 1083.patch - merged upstream
- Add 1093.patch from upstream to fix python shebang
- Update to 2023
BETA DEBUG END:
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ votca.spec ++++++
--- /var/tmp/diff_new_pack.PVbNTG/_old 2023-11-16 20:28:38.024528945 +0100
+++ /var/tmp/diff_new_pack.PVbNTG/_new 2023-11-16 20:28:38.028529092 +0100
@@ -25,17 +25,17 @@
%endif
Name: votca
-Version: 2022.1
+Version: 2023
Release: 0
%define uversion %{version}
-%define sover 2022
+%define sover 2023
Summary: Versatile Object-oriented Toolkit for Coarse-graining Applications
License: Apache-2.0
Group: Productivity/Scientific/Chemistry
URL: https://www.votca.org
Source0: https://github.com/votca/votca/archive/v%{uversion}.tar.gz#/%{name}-%{uvers…
-# PATCH-FIX-UPSTREAM 1083.patch -- based on upsteam PR 1083, fix build with boost-1.82
-Patch0: 1083.patch
+# PATCH-FIX-UPSTREAM 1093.patch -- fix python shebang
+Patch0: 1093.patch
BuildRequires: cmake >= 3.13
BuildRequires: eigen3-devel
@@ -196,7 +196,7 @@
%install
%cmake_install
-sed -i '1s@env @@' %{buildroot}/%{_bindir}/votca_{compare,help2doc} \
+sed -i '1s@env @@' \
%{buildroot}/%{_datadir}/votca/scripts/inverse/{iie,cma_processor,table_smooth_at_cut_off}.py \
%{buildroot}/%{_datadir}/votca/csg-tutorials/LJ1-LJ2/imc/svd.py \
%{buildroot}/%{_datadir}/votca/csg-tutorials/spce/ibi*/spce.py
@@ -207,7 +207,7 @@
# Move bash completion file to correct location
mkdir -p %{buildroot}%{_datadir}/bash_completion.d
-cp %{buildroot}%{_datadir}/votca/rc/csg-completion.bash %{buildroot}%{_datadir}/bash_completion.d/votca
+cp %{__builddir}/csg/scripts/csg-completion.bash %{buildroot}%{_datadir}/bash_completion.d/votca
%fdupes %{buildroot}%{_prefix}
++++++ 1083.patch -> 1093.patch ++++++
--- /work/SRC/openSUSE:Factory/votca/1083.patch 2023-11-14 21:42:48.072106050 +0100
+++ /work/SRC/openSUSE:Factory/.votca.new.2521/1093.patch 2023-11-16 20:28:36.388468623 +0100
@@ -1,44 +1,74 @@
-diff --git a/xtp/src/libxtp/calculators/kmclifetime.cc b/xtp/src/libxtp/calculators/kmclifetime.cc
-index f6a1093ff..56730bce9 100644
---- a/xtp/src/libxtp/calculators/kmclifetime.cc
-+++ b/xtp/src/libxtp/calculators/kmclifetime.cc
-@@ -21,7 +21,7 @@
-
- // Third party includes
- #include <boost/format.hpp>
--#include <boost/progress.hpp>
-+#include <boost/timer/progress_display.hpp>
-
- // VOTCA includes
- #include <votca/tools/constants.h>
-@@ -290,7 +290,7 @@ void KMCLifetime::RunVSSM() {
-
- // determine where it will jump to
- ResetForbiddenlist(forbiddendests);
-- boost::progress_display progress(insertions_);
-+ boost::timer::progress_display progress(insertions_);
-
- while (true) {
- // LEVEL 2
-diff --git a/xtp/src/libxtp/calculators/neighborlist.cc b/xtp/src/libxtp/calculators/neighborlist.cc
-index ce18af288..0b4bcc61b 100644
---- a/xtp/src/libxtp/calculators/neighborlist.cc
-+++ b/xtp/src/libxtp/calculators/neighborlist.cc
-@@ -17,7 +17,7 @@
-
- // Third party includes
- #include <boost/format.hpp>
--#include <boost/progress.hpp>
-+#include <boost/timer/progress_display.hpp>
-
- // Local private VOTCA includes
- #include "neighborlist.h"
-@@ -124,7 +124,7 @@ bool Neighborlist::Evaluate(Topology& top) {
-
- top.NBList().Cleanup();
-
-- boost::progress_display progress(segs.size());
-+ boost::timer::progress_display progress(segs.size());
- // cache approx sizes
- std::vector<double> approxsize = std::vector<double>(segs.size(), 0.0);
- #pragma omp parallel for
+From e1e568942fef46f63cfae0317a72f86cf4bddf46 Mon Sep 17 00:00:00 2001
+From: Christoph Junghans <junghans(a)votca.org>
+Date: Wed, 15 Nov 2023 19:56:20 -0700
+Subject: [PATCH] py: fix all shebangs
+
+---
+ tools/scripts/extract_xml_metadata.py | 2 +-
+ xtp-tutorials/pyxtp/scripts/run_energy.py | 2 +-
+ xtp-tutorials/pyxtp/scripts/run_gradient.py | 2 +-
+ xtp-tutorials/pyxtp/scripts/run_mapchecker.py | 2 +-
+ xtp-tutorials/pyxtp/scripts/run_optimization.py | 2 +-
+ xtp/src/pyxtp/pyxtp/capture_standard_output.py | 2 +-
+ 6 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/tools/scripts/extract_xml_metadata.py b/tools/scripts/extract_xml_metadata.py
+index 413fb81f07..fde43f5ec3 100755
+--- a/tools/scripts/extract_xml_metadata.py
++++ b/tools/scripts/extract_xml_metadata.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ #
+ # Copyright 2009-2020 The VOTCA Development Team (http://www.votca.org)
+ #
+diff --git a/xtp-tutorials/pyxtp/scripts/run_energy.py b/xtp-tutorials/pyxtp/scripts/run_energy.py
+index bf585b91e8..dbc8d2b9d0 100644
+--- a/xtp-tutorials/pyxtp/scripts/run_energy.py
++++ b/xtp-tutorials/pyxtp/scripts/run_energy.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Example to compute energies using XTP."""
+ from pyxtp import xtp, Visualization
+ from ase import Atoms
+diff --git a/xtp-tutorials/pyxtp/scripts/run_gradient.py b/xtp-tutorials/pyxtp/scripts/run_gradient.py
+index 30bfbf0472..16aa6c8730 100644
+--- a/xtp-tutorials/pyxtp/scripts/run_gradient.py
++++ b/xtp-tutorials/pyxtp/scripts/run_gradient.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Example to perform a gradient calculation."""
+ from pyxtp import xtp
+ from ase import Atoms
+diff --git a/xtp-tutorials/pyxtp/scripts/run_mapchecker.py b/xtp-tutorials/pyxtp/scripts/run_mapchecker.py
+index 41db246465..f53783ce68 100755
+--- a/xtp-tutorials/pyxtp/scripts/run_mapchecker.py
++++ b/xtp-tutorials/pyxtp/scripts/run_mapchecker.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Examples to show xtp_binds usage."""
+ from pyxtp import xtp_binds
+ from pathlib import Path
+diff --git a/xtp-tutorials/pyxtp/scripts/run_optimization.py b/xtp-tutorials/pyxtp/scripts/run_optimization.py
+index 3a624e35b5..c4301b43af 100644
+--- a/xtp-tutorials/pyxtp/scripts/run_optimization.py
++++ b/xtp-tutorials/pyxtp/scripts/run_optimization.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Example to optimize the geometry of CO"""
+ from pyxtp import xtp
+ from ase.io import write
+diff --git a/xtp/src/pyxtp/pyxtp/capture_standard_output.py b/xtp/src/pyxtp/pyxtp/capture_standard_output.py
+index 5cc5e14c2d..ec5514ac33 100644
+--- a/xtp/src/pyxtp/pyxtp/capture_standard_output.py
++++ b/xtp/src/pyxtp/pyxtp/capture_standard_output.py
+@@ -1,4 +1,4 @@
+-#!/usr/bin/env python
++#!/usr/bin/env python3
+ """Examples to show xtp_binds usage."""
+ import io
+ from contextlib import redirect_stdout
++++++ votca-2022.1.tar.gz -> votca-2023.tar.gz ++++++
/work/SRC/openSUSE:Factory/votca/votca-2022.1.tar.gz /work/SRC/openSUSE:Factory/.votca.new.2521/votca-2023.tar.gz differ: char 13, line 1
1
0
Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package pappl for openSUSE:Factory checked in at 2023-11-16 20:28:23
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/pappl (Old)
and /work/SRC/openSUSE:Factory/.pappl.new.2521 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "pappl"
Thu Nov 16 20:28:23 2023 rev:5 rq:1126726 version:1.4.3
Changes:
--------
--- /work/SRC/openSUSE:Factory/pappl/pappl.changes 2023-10-17 20:25:13.139745475 +0200
+++ /work/SRC/openSUSE:Factory/.pappl.new.2521/pappl.changes 2023-11-16 20:28:28.828189874 +0100
@@ -1,0 +2,9 @@
+Wed Nov 15 16:59:04 UTC 2023 - Jan Engelhardt <jengelh(a)inai.de>
+
+- Update to release 1.4.3
+ * Added "smi55357-device-uri" and "smi55357-driver" Printer
+ Status attributes to Get-Printer-Attributes responses
+ * Fixed missing mutex unlock in DNS-SD code
+ * Fixed DNS-SD device list crash
+
+-------------------------------------------------------------------
Old:
----
pappl-1.4.2.tar.gz
pappl-1.4.2.tar.gz.sig
New:
----
pappl-1.4.3.tar.gz
pappl-1.4.3.tar.gz.sig
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ pappl.spec ++++++
--- /var/tmp/diff_new_pack.GKkwYE/_old 2023-11-16 20:28:29.412211407 +0100
+++ /var/tmp/diff_new_pack.GKkwYE/_new 2023-11-16 20:28:29.412211407 +0100
@@ -18,7 +18,7 @@
Name: pappl
%define lname libpappl1
-Version: 1.4.2
+Version: 1.4.3
Release: 0
Summary: A printer application framework
License: Apache-2.0
++++++ pappl-1.4.2.tar.gz -> pappl-1.4.3.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/CHANGES.md new/pappl-1.4.3/CHANGES.md
--- old/pappl-1.4.2/CHANGES.md 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/CHANGES.md 2023-11-15 16:41:09.000000000 +0100
@@ -2,6 +2,19 @@
================
+Changes in v1.4.3
+-----------------
+
+- Added "smi55357-device-uri" and "smi55357-driver" Printer Status attributes
+ to Get-Printer-Attributes responses.
+- Fixed missing mutex unlock in DNS-SD code (Issue #299)
+- Fixed "printer-id" value for new printers (Issue #301)
+- Fixed DNS-SD device list crash (Issue #302)
+- Fixed Set-Printer-Attributes for "output-bin-default" and "sides-default"
+ (Issue #305)
+- Fixed default "copies" value with `papplJobCreateWithFile`.
+
+
Changes in v1.4.2
-----------------
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/configure new/pappl-1.4.3/configure
--- old/pappl-1.4.2/configure 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/configure 2023-11-15 16:41:09.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.71 for pappl 1.4.2.
+# Generated by GNU Autoconf 2.71 for pappl 1.4.3.
#
# Report bugs to <https://github.com/michaelrsweet/pappl/issues>.
#
@@ -610,8 +610,8 @@
# Identity of this package.
PACKAGE_NAME='pappl'
PACKAGE_TARNAME='pappl'
-PACKAGE_VERSION='1.4.2'
-PACKAGE_STRING='pappl 1.4.2'
+PACKAGE_VERSION='1.4.3'
+PACKAGE_STRING='pappl 1.4.3'
PACKAGE_BUGREPORT='https://github.com/michaelrsweet/pappl/issues'
PACKAGE_URL='https://www.msweet.org/pappl'
@@ -1310,7 +1310,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures pappl 1.4.2 to adapt to many kinds of systems.
+\`configure' configures pappl 1.4.3 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1376,7 +1376,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of pappl 1.4.2:";;
+ short | recursive ) echo "Configuration of pappl 1.4.3:";;
esac
cat <<\_ACEOF
@@ -1485,7 +1485,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-pappl configure 1.4.2
+pappl configure 1.4.3
generated by GNU Autoconf 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
@@ -1703,7 +1703,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by pappl $as_me 1.4.2, which was
+It was created by pappl $as_me 1.4.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2461,9 +2461,9 @@
ac_config_headers="$ac_config_headers config.h"
-PAPPL_VERSION="1.4.2"
-PAPPL_VERSION_MAJOR="`echo 1.4.2 | awk -F. '{print $1}'`"
-PAPPL_VERSION_MINOR="`echo 1.4.2 | awk -F. '{printf("%d\n",$2);}'`"
+PAPPL_VERSION="1.4.3"
+PAPPL_VERSION_MAJOR="`echo 1.4.3 | awk -F. '{print $1}'`"
+PAPPL_VERSION_MINOR="`echo 1.4.3 | awk -F. '{printf("%d\n",$2);}'`"
@@ -5962,7 +5962,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by pappl $as_me 1.4.2, which was
+This file was extended by pappl $as_me 1.4.3, which was
generated by GNU Autoconf 2.71. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -6027,7 +6027,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-pappl config.status 1.4.2
+pappl config.status 1.4.3
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/configure.ac new/pappl-1.4.3/configure.ac
--- old/pappl-1.4.2/configure.ac 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/configure.ac 2023-11-15 16:41:09.000000000 +0100
@@ -21,7 +21,7 @@
dnl Package name and version...
-AC_INIT([pappl], [1.4.2], [https://github.com/michaelrsweet/pappl/issues] [pappl], [https://www.msweet.org/pappl]
+AC_INIT([pappl], [1.4.3], [https://github.com/michaelrsweet/pappl/issues] [pappl], [https://www.msweet.org/pappl]
AC_CONFIG_HEADERS([config.h])
PAPPL_VERSION="AC_PACKAGE_VERSION"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/pappl/device-network.c new/pappl-1.4.3/pappl/device-network.c
--- old/pappl-1.4.2/pappl/device-network.c 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/pappl/device-network.c 2023-11-15 16:41:09.000000000 +0100
@@ -8,10 +8,6 @@
// information.
//
-//
-// Include necessary headers...
-//
-
#include "device-private.h"
#include "dnssd-private.h"
#include "snmp-private.h"
@@ -315,6 +311,20 @@
free(d->device_id);
free(d->uuid);
pthread_mutex_destroy(&d->mutex);
+
+#ifdef HAVE_MDNSRESPONDER
+ if (d->ref)
+ DNSServiceRefDeallocate(d->ref);
+
+#elif defined(HAVE_AVAHI)
+ if (d->ref)
+ {
+ _papplDNSSDLock();
+ avahi_record_browser_free(d->ref);
+ _papplDNSSDUnlock();
+ }
+#endif // HAVE_MDNSRESPONDER
+
free(d);
}
@@ -450,6 +460,7 @@
{
_papplDeviceError(err_cb, err_data, "Unable to create service browser: %s (%d).", _papplDNSSDStrError(error), error);
cupsArrayDelete(devices);
+ _papplDNSSDUnlock();
return (ret);
}
@@ -460,6 +471,7 @@
{
_papplDeviceError(err_cb, err_data, "Unable to create service browser.");
cupsArrayDelete(devices);
+ _papplDNSSDUnlock();
return (ret);
}
# endif // HAVE_MDNSRESPONDER
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/pappl/job.c new/pappl-1.4.3/pappl/job.c
--- old/pappl-1.4.2/pappl/job.c 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/pappl/job.c 2023-11-15 16:41:09.000000000 +0100
@@ -105,6 +105,7 @@
job->state = IPP_JSTATE_HELD;
job->system = printer->system;
job->created = time(NULL);
+ job->copies = 1;
if (attrs)
{
@@ -122,8 +123,6 @@
if ((attr = ippFindAttribute(job->attrs, "copies", IPP_TAG_INTEGER)) != NULL)
job->copies = ippGetInteger(attr, 0);
- else
- job->copies = 1;
hold_until = ippGetString(ippFindAttribute(attrs, "job-hold-until", IPP_TAG_KEYWORD), 0, NULL);
hold_until_time = ippDateToTime(ippGetDate(ippFindAttribute(attrs, "job-hold-until-time", IPP_TAG_DATE), 0));
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/pappl/printer-ipp.c new/pappl-1.4.3/pappl/printer-ipp.c
--- old/pappl-1.4.2/pappl/printer-ipp.c 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/pappl/printer-ipp.c 2023-11-15 16:41:09.000000000 +0100
@@ -970,6 +970,7 @@
{ "media-default", IPP_TAG_KEYWORD, 1 },
{ "media-ready", IPP_TAG_KEYWORD, PAPPL_MAX_SOURCE },
{ "orientation-requested-default", IPP_TAG_ENUM, 1 },
+ { "output-bin-default", IPP_TAG_KEYWORD, 1 },
{ "print-color-mode-default", IPP_TAG_KEYWORD, 1 },
{ "print-content-optimize-default", IPP_TAG_KEYWORD, 1 },
{ "print-darkness-default", IPP_TAG_INTEGER, 1 },
@@ -983,7 +984,8 @@
{ "printer-organizational-unit", IPP_TAG_TEXT, 1 },
{ "printer-resolution-default", IPP_TAG_RESOLUTION, 1 },
{ "printer-wifi-password", IPP_TAG_STRING, 1 },
- { "printer-wifi-ssid", IPP_TAG_NAME, 1 }
+ { "printer-wifi-ssid", IPP_TAG_NAME, 1 },
+ { "sides-default", IPP_TAG_KEYWORD, 1 }
};
@@ -1119,6 +1121,25 @@
driver_data.orient_default = (ipp_orient_t)ippGetInteger(rattr, 0);
do_defaults = true;
}
+ else if (!strcmp(name, "output-bin-default"))
+ {
+ const char *keyword = ippGetString(rattr, 0, NULL);
+ // Keyword value
+
+ for (i = 0; i < driver_data.num_bin; i ++)
+ {
+ if (!strcmp(keyword, driver_data.bin[i]))
+ {
+ driver_data.bin_default = i;
+ break;
+ }
+ }
+
+ if (i >= driver_data.num_bin)
+ papplClientRespondIPP(client, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, "Unsupported \"output-bin-default\" value '%s'.", keyword);
+ else
+ do_defaults = true;
+ }
else if (!strcmp(name, "print-color-mode-default"))
{
driver_data.color_default = _papplColorModeValue(ippGetString(rattr, 0, NULL));
@@ -1208,6 +1229,21 @@
papplCopyString(wifi_ssid, ippGetString(rattr, 0, NULL), sizeof(wifi_ssid));
do_wifi = true;
}
+ else if (!strcmp(name, "sides-default"))
+ {
+ pappl_sides_t sides_default = _papplSidesValue(ippGetString(rattr, 0, NULL));
+ // Sides value
+
+ if (!sides_default || !(driver_data.sides_supported & sides_default))
+ {
+ papplClientRespondIPP(client, IPP_STATUS_ERROR_ATTRIBUTES_OR_VALUES, "Unsupported \"sides-default\" value '%s'.", ippGetString(rattr, 0, NULL));
+ }
+ else
+ {
+ driver_data.sides_default = sides_default;
+ do_defaults = true;
+ }
+ }
}
if (ippGetStatusCode(client->response) != IPP_STATUS_OK)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/pappl/printer.c new/pappl-1.4.3/pappl/printer.c
--- old/pappl-1.4.2/pappl/printer.c 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/pappl/printer.c 2023-11-15 16:41:09.000000000 +0100
@@ -525,9 +525,6 @@
// printer-get-attributes-supported
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "printer-get-attributes-supported", NULL, "document-format");
- // printer-id
- ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "printer-id", printer_id);
-
// printer-info
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_TEXT, "printer-info", NULL, printer_name);
@@ -540,6 +537,12 @@
// requesting-user-uri-supported
ippAddBoolean(printer->attrs, IPP_TAG_PRINTER, "requesting-user-uri-supported", 1);
+ // smi55357-device-uri
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_URI, "smi55357-device-uri", NULL, printer->device_uri);
+
+ // smi55357-driver
+ ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_KEYWORD, "smi55357-driver", NULL, printer->driver_name);
+
// uri-security-supported
if (system->options & PAPPL_SOPTIONS_NO_TLS)
ippAddString(printer->attrs, IPP_TAG_PRINTER, IPP_CONST_TAG(IPP_TAG_KEYWORD), "uri-security-supported", NULL, "none");
@@ -568,6 +571,11 @@
// Add the printer to the system...
_papplSystemAddPrinter(system, printer, printer_id);
+ // printer-id
+ _papplRWLockWrite(printer);
+ ippAddInteger(printer->attrs, IPP_TAG_PRINTER, IPP_TAG_INTEGER, "printer-id", printer->printer_id);
+ _papplRWUnlock(printer);
+
// Do any post-creation work...
if (system->create_cb)
(system->create_cb)(printer, system->driver_cbdata);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/testsuite/testpappl.c new/pappl-1.4.3/testsuite/testpappl.c
--- old/pappl-1.4.2/testsuite/testpappl.c 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/testsuite/testpappl.c 2023-11-15 16:41:09.000000000 +0100
@@ -226,7 +226,7 @@
};
static pappl_version_t versions[1] = // Software versions
{
- { "Test System", "", "1.3 build 42", { 1, 3, 0, 42 } }
+ { "Test System", "", "1.4 build 42", { 1, 4, 0, 42 } }
};
@@ -2157,9 +2157,9 @@
testEndMessage(false, "got %d versions, expected 1", get_nvers);
pass = false;
}
- else if (strcmp(get_vers[0].name, "Test System") || strcmp(get_vers[0].sversion, "1.3 build 42"))
+ else if (strcmp(get_vers[0].name, "Test System") || strcmp(get_vers[0].sversion, "1.4 build 42"))
{
- testEndMessage(false, "got '%s v%s', expected 'Test System v1.3 build 42'", get_vers[0].name, get_vers[0].sversion);
+ testEndMessage(false, "got '%s v%s', expected 'Test System v1.4 build 42'", get_vers[0].name, get_vers[0].sversion);
pass = false;
}
else
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/vcnet/config.h new/pappl-1.4.3/vcnet/config.h
--- old/pappl-1.4.2/vcnet/config.h 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/vcnet/config.h 2023-11-15 16:41:09.000000000 +0100
@@ -107,7 +107,7 @@
// Version numbers
-#define PAPPL_VERSION "1.4.2"
+#define PAPPL_VERSION "1.4.3"
#define PAPPL_VERSION_MAJOR 1
#define PAPPL_VERSION_MINOR 4
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/vcnet/libpappl1_native.nuspec new/pappl-1.4.3/vcnet/libpappl1_native.nuspec
--- old/pappl-1.4.2/vcnet/libpappl1_native.nuspec 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/vcnet/libpappl1_native.nuspec 2023-11-15 16:41:09.000000000 +0100
@@ -3,7 +3,7 @@
<metadata>
<id>libpappl1_native</id>
<title>Printer Application Framework (PAPPL) for VS2019+</title>
- <version>1.4.2.0</version>
+ <version>1.4.3.0</version>
<authors>Michael R Sweet</authors>
<owners>michaelrsweet</owners>
<projectUrl>https://github.com/michaelrsweet/pappl</projectUrl>
@@ -18,7 +18,7 @@
<tags>airprint everywhere http ipp mopria native</tags>
<dependencies>
<dependency id="libcups2_native" version="2.4.7" />
- <dependency id="libpappl1_native.redist" version="1.4.2.0" />
+ <dependency id="libpappl1_native.redist" version="1.4.3.0" />
</dependencies>
</metadata>
<files>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/vcnet/libpappl1_native.redist.nuspec new/pappl-1.4.3/vcnet/libpappl1_native.redist.nuspec
--- old/pappl-1.4.2/vcnet/libpappl1_native.redist.nuspec 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/vcnet/libpappl1_native.redist.nuspec 2023-11-15 16:41:09.000000000 +0100
@@ -3,7 +3,7 @@
<metadata>
<id>libpappl1_native.redist</id>
<title>Printer Application Framework (PAPPL) for VS2019+ Redist</title>
- <version>1.4.2.0</version>
+ <version>1.4.3.0</version>
<authors>Michael R Sweet</authors>
<owners>michaelrsweet</owners>
<projectUrl>https://github.com/michaelrsweet/pappl</projectUrl>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/pappl-1.4.2/xcode/config.h new/pappl-1.4.3/xcode/config.h
--- old/pappl-1.4.2/xcode/config.h 2023-10-16 16:53:14.000000000 +0200
+++ new/pappl-1.4.3/xcode/config.h 2023-11-15 16:41:09.000000000 +0100
@@ -8,7 +8,7 @@
//
// Version numbers
-#define PAPPL_VERSION "1.4.2"
+#define PAPPL_VERSION "1.4.3"
#define PAPPL_VERSION_MAJOR 1
#define PAPPL_VERSION_MINOR 4
1
0