the "compile" command
[external/binutils.git] / gdb / testsuite / lib / gdb.exp
index 609f22f..6a13d1e 100644 (file)
@@ -2518,6 +2518,23 @@ proc skip_libstdcxx_probe_tests {} {
     return $ok
 }
 
+# Return 1 if we should skip tests of the "compile" feature.
+# This must be invoked after the inferior has been started.
+
+proc skip_compile_feature_tests {} {
+    global gdb_prompt
+
+    set result 0
+    gdb_test_multiple "compile code -- ;" "check for working compile command" {
+       "Could not load libcc1.*\r\n$gdb_prompt $" {
+           set result 1
+       }
+       -re "\r\n$gdb_prompt $" {
+       }
+    }
+    return $result
+}
+
 # Check whether we're testing with the remote or extended-remote
 # targets.