Fix GDB build failure when $development is false
[deliverable/binutils-gdb.git] / gdb / maint.c
index a924f8363cd23209207e59d053f8c43aa9f7fc12..70e00110e52bbbddccd0a632e1d6d0737e804e3a 100644 (file)
@@ -939,16 +939,26 @@ show_per_command_cmd (const char *args, int from_tty)
 static void
 maintenance_selftest (const char *args, int from_tty)
 {
+#if GDB_SELF_TEST
   selftests::run_tests (args);
+#else
+  printf_filtered (_("\
+Selftests are not available in a non-development build.\n"));
+#endif
 }
 
 static void
 maintenance_info_selftests (const char *arg, int from_tty)
 {
+#if GDB_SELF_TEST
   printf_filtered ("Registered selftests:\n");
   selftests::for_each_selftest ([] (const std::string &name) {
     printf_filtered (" - %s\n", name.c_str ());
   });
+#else
+  printf_filtered (_("\
+Selftests are not available in a non-development build.\n"));
+#endif
 }
 
 \f
This page took 0.024579 seconds and 4 git commands to generate.