public inbox for gdb-cvs@sourceware.org
help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org>
To: gdb-cvs@sourceware.org
Subject: [binutils-gdb] [gdb/testsuite] Fix unrecognized debug output level 'statement-frontiers' message
Date: Sat, 14 Mar 2020 09:41:49 +0000 (GMT)	[thread overview]
Message-ID: <20200314094149.38BF0387102A@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=2ac70237d2458fb2eb5e73de6bb02a396b5bada0

commit 2ac70237d2458fb2eb5e73de6bb02a396b5bada0
Author: Tom de Vries <tdevries@suse.de>
Date:   Sat Mar 14 10:41:46 2020 +0100

    [gdb/testsuite] Fix unrecognized debug output level 'statement-frontiers' message
    
    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).
    
    gdb/testsuite/ChangeLog:
    
    2020-03-14  Tom de Vries  <tdevries@suse.de>
    
            * lib/gdb.exp (supports_statement_frontiers): New proc.
            * gdb.cp/step-and-next-inline.exp: Use supports_statement_frontiers.

Diff:
---
 gdb/testsuite/ChangeLog                       |  5 +++++
 gdb/testsuite/gdb.cp/step-and-next-inline.exp |  4 ++++
 gdb/testsuite/lib/gdb.exp                     | 11 +++++++++++
 3 files changed, 20 insertions(+)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 9f65a4eaa82..a9c28522511 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-14  Tom de Vries  <tdevries@suse.de>
+
+	* lib/gdb.exp (supports_statement_frontiers): New proc.
+	* gdb.cp/step-and-next-inline.exp: Use supports_statement_frontiers.
+
 2020-03-14  Tom de Vries  <tdevries@suse.de>
 
 	* gdb.base/printcmds.exp: Add missing quoting for "print
diff --git a/gdb/testsuite/gdb.cp/step-and-next-inline.exp b/gdb/testsuite/gdb.cp/step-and-next-inline.exp
index acec48ba81d..3733fa75570 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 ae2d810a1eb..b14b3a968e1 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


                 reply	other threads:[~2020-03-14  9:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200314094149.38BF0387102A@sourceware.org \
    --to=vries@sourceware.org \
    --cc=gdb-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).