I tried a target board that enforces an older c dialect: ... +set found_gcc "[find_gcc] -std=gnu90" ... trying to simulate using gcc 4.8.5 using a current system compiler. This itself gives some problems because $found_gcc is expected to be a file, but I also run into this: ... gdb compile failed, cc1plus: warning: command line option '-std=gnu90' is valid for C/ObjC but not for C++ ... For these test-cases: ... $ egrep "Running|not for" old-dialect/leap-15-4/CHECKLOG.gdb | grep -B1 "not for" | grep Running Running /data/vries/gdb/src/gdb/testsuite/gdb.base/condbreak-multi-context.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.base/main-psymtab.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.base/persistent-lang.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.base/skipcxx.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.base/start-cpp.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/call-method-register.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/empty-enum.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/incomplete-type-overload.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/method-call-in-c.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/minsym-fallback.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.cp/vla-cxx.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.dwarf2/gdb-index-cxx.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.dwarf2/method-ptr.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.dwarf2/missing-type-name-for-templates.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.dwarf2/subrange.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.guile/types-module.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.linespec/cp-completion-aliases.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.linespec/cpcompletion.exp ... Running /data/vries/gdb/src/gdb/testsuite/gdb.linespec/cpls-ops.exp ... ... Fixed presumably by: ... diff --git a/gdb/testsuite/gdb.base/condbreak-multi-context.exp b/gdb/testsuite/gdb.base/condbreak-multi-context.exp index ba9ef080503..79e223d8ac5 100644 --- a/gdb/testsuite/gdb.base/condbreak-multi-context.exp +++ b/gdb/testsuite/gdb.base/condbreak-multi-context.exp @@ -18,7 +18,7 @@ standard_testfile .cc -if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile}]} { +if {[prepare_for_testing "failed to prepare" ${binfile} ${srcfile} {debug c++}]} { return } ...
Created attachment 15908 [details] patch to be submitted I'd like to submit this patch, but am running to email problems, so for now posting it here, to be able to refer to it elsewhere.
(In reply to Tom de Vries from comment #1) > Created attachment 15908 [details] > patch to be submitted > > I'd like to submit this patch, but am running to email problems, so for now > posting it here, to be able to refer to it elsewhere. https://sourceware.org/pipermail/gdb-patches/2025-January/215087.html
The master branch has been updated by Tom de Vries <vries@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=a03e9c2782b42ba82a80164ffc9cf956b9dc092c commit a03e9c2782b42ba82a80164ffc9cf956b9dc092c Author: Tom de Vries <tdevries@suse.de> Date: Tue Feb 4 13:53:20 2025 +0100 [gdb/testsuite] Use c++ flag in c++ test-cases In some cases, test-cases use c++, but don't add "c++" to the compilation flags. This can cause problems with some compilers. Fix this in some test-cases. Approved-By: Tom Tromey <tom@tromey.com> PR testsuite/30380 Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30380
Fixed.