A build without Python will currently fail, because
selftests::test_python uses gdb_python_initialized, which is only
conditionally defined.
This patch fixes the build by making test_python also be conditionally
defined. I chose this approach because the selftest will fail if
Python is not enabled, so it didn't seem useful to leave it defined.
return true;
}
-#endif /* HAVE_PYTHON */
-
#if GDB_SELF_TEST
namespace selftests {
} // namespace selftests
#endif /* GDB_SELF_TEST */
+#endif /* HAVE_PYTHON */
+
/* See python.h. */
cmd_list_element *python_cmd_element = nullptr;
&user_set_python_list,
&user_show_python_list);
+#ifdef HAVE_PYTHON
#if GDB_SELF_TEST
selftests::register_test ("python", selftests::test_python);
#endif /* GDB_SELF_TEST */
+#endif /* HAVE_PYTHON */
}
#ifdef HAVE_PYTHON