From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) by sourceware.org (Postfix) with ESMTPS id B95B8387102A for ; Sat, 14 Mar 2020 09:42:23 +0000 (GMT) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id D8814AC22 for ; Sat, 14 Mar 2020 09:42:22 +0000 (UTC) Date: Sat, 14 Mar 2020 10:42:21 +0100 From: Tom de Vries To: gdb-patches@sourceware.org Subject: [committed][gdb/testsuite] Fix unrecognized debug output level 'statement-frontiers' message Message-ID: <20200314094219.GA19884@delia> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) X-Spam-Status: No, score=-25.0 required=5.0 tests=GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gdb-patches@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 14 Mar 2020 09:42:24 -0000 Hi, When running testcase gdb.cp/step-and-next-inline.exp, I get: ... Running src/gdb/testsuite/gdb.cp/step-and-next-inline.exp ... gdb compile failed, g++: error: unrecognized debug output level \ 'statement-frontiers' gdb compile failed, g++: error: unrecognized debug output level \ 'statement-frontiers' === gdb Summary === # of untested testcases 2 ... Fix this by using a new gdb_caching_proc supports_statement_frontiers. Tested on x86_64-linux, with gcc 7.5.0 (which does not support -gstatement-frontiers) and with gcc 8.4.0 (which does support -gstatement-frontiers). Committed to trunk. Thanks, - Tom [gdb/testsuite] Fix unrecognized debug output level 'statement-frontiers' message gdb/testsuite/ChangeLog: 2020-03-14 Tom de Vries * lib/gdb.exp (supports_statement_frontiers): New proc. * gdb.cp/step-and-next-inline.exp: Use supports_statement_frontiers. --- gdb/testsuite/gdb.cp/step-and-next-inline.exp | 4 ++++ gdb/testsuite/lib/gdb.exp | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.exp b/gdb/testsuite/gdb.cp/step-and-next-inline.exp index acec48ba81..3733fa7557 100644 --- a/gdb/testsuite/gdb.cp/step-and-next-inline.exp +++ b/gdb/testsuite/gdb.cp/step-and-next-inline.exp @@ -15,6 +15,10 @@ standard_testfile .cc +if { ![supports_statement_frontiers] } { + return -1 +} + # Compile the test source with USE_NEXT_INLINE_H defined (when # use_header is true), or not defined. proc do_test { use_header } { diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index ae2d810a1e..b14b3a968e 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -6947,5 +6947,16 @@ gdb_caching_proc skip_ctf_tests { } executable "additional_flags=-gt"] } +# Return 1 if compiler supports -gstatement-frontiers. Otherwise, +# return 0. + +gdb_caching_proc supports_statement_frontiers { + return [gdb_can_simple_compile supports_statement_frontiers { + int main () { + return 0; + } + } executable "additional_flags=-gstatement-frontiers"] +} + # Always load compatibility stuff. load_lib future.exp