On Mon, Nov 4, 2024 at 10:01 PM Jeff Law <jeffreya...@gmail.com> wrote: > > > > On 10/31/24 6:59 PM, H.J. Lu wrote: > > On Fri, Nov 1, 2024 at 8:32 AM Sam James <s...@gentoo.org> wrote: > >> > >> "H.J. Lu" <hjl.to...@gmail.com> writes: > >> > >>> When gdb defaults to use debuginfod, gdb warns guality tests: > >>> > >>> Spawning: gdb -nx -nw -quiet -batch -x pr36728-2.gdb ./pr36728-2.exe > >>> spawn gdb -nx -nw -quiet -batch -x pr36728-2.gdb ./pr36728-2.exe > >>> Breakpoint 1 at 0x4004ba: file > >>> /export/gnu/import/git/gitlab/x86-gcc/gcc/testsui > >>> te/gcc.dg/guality/pr36728-2.c, line 18. > >>> > >>> This GDB supports auto-downloading debuginfo from the following URLs: > >>> <https://debuginfod.fedoraproject.org/> > >>> Enable debuginfod for this session? (y or [n]) [answered N; input not > >>> from termi > >>> nal] > >>> Debuginfod has been disabled. > >>> To make this setting permanent, add 'set debuginfod enabled off' to > >>> .gdbinit. > >>> > >>> After 'set debuginfod enabled off' is added to ~/.gdbinit, gdb warning > >>> doesn't go away since -nx option ignores ~/.gdbinit. Silence gdb warning > >>> by setting DEBUGINFOD_URLS to "" and restore if it exists. > >>> > >>> PR testsuite/117300 > >>> * g++.dg/guality/guality.exp: Set DEBUGINFOD_URLS to "" and > >>> restore it if it exists. > >>> * gcc.dg/guality/guality.exp: Likewise. > >>> * gfortran.dg/guality/guality.exp: Likewise. > >>> > >>> Co-authored-by: Andrew Pinski <quic_apin...@quicinc.com> > >>> Signed-off-by: H.J. Lu <hjl.to...@gmail.com> > >> > >> I can't approve it but it looks right to me. > > > > Hi Mike, > > > > Is this patch > > > > https://gcc.gnu.org/pipermail/gcc-patches/2024-October/666594.html > > > > OK? > OK > jeff >
simulate-thread tests have the same issue. Here is a patch. OK to install? When gdb defaults to use debuginfod, gdb warns simulate-thread tests: spawn gdb -nx -nw -batch -x /export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/ gcc.dg/simulate-thread/simulate-thread.gdb ./atomic-load-int.exe Breakpoint 1 at 0x4005cc: file /export/gnu/import/git/gitlab/x86-gcc/gcc/testsui te/gcc.dg/simulate-thread/atomic-load-int.c, line 97. This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.fedoraproject.org/> Enable debuginfod for this session? (y or [n]) [answered N; input not from termi nal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. Silence gdb warning by setting DEBUGINFOD_URLS to "" and restore it if it exists. PR testsuite/117300 * g++.dg/simulate-thread/simulate-thread.exp: Set DEBUGINFOD_URLS to "" and restore it if it exists. * gcc.dg/simulate-thread/simulate-thread.exp: Likewise. -- H.J.
From 058d50e7e732ad7df772f3f16d76cd7903be5481 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" <hjl.to...@gmail.com> Date: Tue, 5 Nov 2024 06:22:00 +0800 Subject: [PATCH] simulate-thread tests: Silence gdb debuginfod warning When gdb defaults to use debuginfod, gdb warns simulate-thread tests: spawn gdb -nx -nw -batch -x /export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.gdb ./atomic-load-int.exe Breakpoint 1 at 0x4005cc: file /export/gnu/import/git/gitlab/x86-gcc/gcc/testsuite/gcc.dg/simulate-thread/atomic-load-int.c, line 97. This GDB supports auto-downloading debuginfo from the following URLs: <https://debuginfod.fedoraproject.org/> Enable debuginfod for this session? (y or [n]) [answered N; input not from terminal] Debuginfod has been disabled. To make this setting permanent, add 'set debuginfod enabled off' to .gdbinit. Silence gdb warning by setting DEBUGINFOD_URLS to "" and restore it if it exists. PR testsuite/117300 * g++.dg/simulate-thread/simulate-thread.exp: Set DEBUGINFOD_URLS to "" and restore it if it exists. * gcc.dg/simulate-thread/simulate-thread.exp: Likewise. Signed-off-by: H.J. Lu <hjl.to...@gmail.com> --- gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp | 9 +++++++++ gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp | 9 +++++++++ 2 files changed, 18 insertions(+) diff --git a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp index 35a111cfd13..ad428c148ec 100644 --- a/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/g++.dg/simulate-thread/simulate-thread.exp @@ -30,10 +30,19 @@ set-torture-options [list \ { -O3 -g -std=c++11 } \ { -Os -g } ] +if [info exists ::env(DEBUGINFOD_URLS)] { + set orig_debuginfod_urls "$::env(DEBUGINFOD_URLS)" + setenv DEBUGINFOD_URLS "" +} + if [gdb-exists] { gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.C]] "" "" gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" "" } +if [info exists ::env(DEBUGINFOD_URLS)] { + setenv DEBUGINFOD_URLS "$orig_debuginfod_urls" +} + torture-finish dg-finish diff --git a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp index 8983cc76605..7a8178f5f67 100644 --- a/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp +++ b/gcc/testsuite/gcc.dg/simulate-thread/simulate-thread.exp @@ -32,10 +32,19 @@ set-torture-options [list \ { -O2 -g } \ { -O3 -g } ] +if [info exists ::env(DEBUGINFOD_URLS)] { + set orig_debuginfod_urls "$::env(DEBUGINFOD_URLS)" + setenv DEBUGINFOD_URLS "" +} + if [gdb-exists] { gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.c]] "" "" gcc-dg-runtest [lsort [glob $srcdir/c-c++-common/simulate-thread/*.c]] "" "" } +if [info exists ::env(DEBUGINFOD_URLS)] { + setenv DEBUGINFOD_URLS "$orig_debuginfod_urls" +} + torture-finish dg-finish -- 2.47.0