+2021-01-13 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * auto-load.h (auto_load_gdb_scripts_enabled): Return bool, move
+ comment here.
+ * auto-load.c (auto_load_gdb_scripts_enabled): Return bool, move
+ comment to header.
+ * extension-priv.h (struct extension_language_script_ops)
+ <auto_load_enabled>: Return bool.
+ * extension.h (ext_lang_auto_load_enabled): Return bool, move
+ comment here.
+ * extension.c (ext_lang_auto_load_enabled): Return bool, move
+ comment to header.
+ * guile/guile-header.h (gdbscm_auto_load_enabled): Return bool,
+ move comment here.
+ * guile/scm-auto-load.c (gdbscm_auto_load_enabled): Return bool,
+ move comment to header.
+ * python/python-header.h (gdbpy_auto_load_enabled): Return bool,
+ move comment here.
+ * python/py-auto-load.c (gdbpy_auto_load_enabled): Return bool,
+ move comment to header.
+
2021-01-13 Simon Marchi <simon.marchi@polymtl.ca>
* auto-load.h (file_is_auto_load_safe): Change return type to
value);
}
-/* Return non-zero if auto-loading gdb scripts is enabled. */
+/* See auto-load.h. */
-int
+bool
auto_load_gdb_scripts_enabled (const struct extension_language_defn *extlang)
{
return auto_load_gdb_scripts;
const char *debug_fmt, ...)
ATTRIBUTE_PRINTF (2, 3);
-extern int auto_load_gdb_scripts_enabled
+/* Return true if auto-loading gdb scripts is enabled. */
+
+extern bool auto_load_gdb_scripts_enabled
(const struct extension_language_defn *extlang);
#endif /* AUTO_LOAD_H */
/* Return non-zero if auto-loading scripts in this extension language
is enabled. */
- int (*auto_load_enabled) (const struct extension_language_defn *);
+ bool (*auto_load_enabled) (const struct extension_language_defn *);
};
/* The interface for making calls from GDB to an external extension
return extlang->script_ops->objfile_script_executor;
}
-/* Return non-zero if auto-loading of EXTLANG scripts is enabled.
- Zero is returned if support for this language isn't compiled in. */
+/* See extension.h. */
-int
+bool
ext_lang_auto_load_enabled (const struct extension_language_defn *extlang)
{
if (extlang->script_ops == NULL)
- return 0;
+ return false;
/* The extension language is required to implement this function. */
gdb_assert (extlang->script_ops->auto_load_enabled != NULL);
extern objfile_script_executor_func *ext_lang_objfile_script_executor
(const struct extension_language_defn *);
-extern int ext_lang_auto_load_enabled (const struct extension_language_defn *);
+/* Return true if auto-loading of EXTLANG scripts is enabled.
+ False is returned if support for this language isn't compiled in. */
+
+extern bool ext_lang_auto_load_enabled (const struct extension_language_defn *);
/* Wrappers for each extension language API function that iterate over all
extension languages. */
extern objfile_script_sourcer_func gdbscm_source_objfile_script;
extern objfile_script_executor_func gdbscm_execute_objfile_script;
-extern int gdbscm_auto_load_enabled (const struct extension_language_defn *);
+/* Return true if auto-loading Guile scripts is enabled.
+ This is the extension_language_script_ops.auto_load_enabled "method". */
+
+extern bool gdbscm_auto_load_enabled (const struct extension_language_defn *);
extern void gdbscm_preserve_values
(const struct extension_language_defn *,
fprintf_filtered (file, _("Auto-loading of Guile scripts is %s.\n"), value);
}
-/* Return non-zero if auto-loading Guile scripts is enabled.
- This is the extension_language_script_ops.auto_load_enabled "method". */
+/* See guile-internal.h. */
-int
+bool
gdbscm_auto_load_enabled (const struct extension_language_defn *extlang)
{
return auto_load_guile_scripts;
fprintf_filtered (file, _("Auto-loading of Python scripts is %s.\n"), value);
}
-/* Return non-zero if auto-loading Python scripts is enabled.
- This is the extension_language_script_ops.auto_load_enabled "method". */
+/* See python-internal.h. */
-int
+bool
gdbpy_auto_load_enabled (const struct extension_language_defn *extlang)
{
return auto_load_python_scripts;
\f
/* extension_language_script_ops "methods". */
-extern int gdbpy_auto_load_enabled (const struct extension_language_defn *);
+/* Return true if auto-loading Python scripts is enabled.
+ This is the extension_language_script_ops.auto_load_enabled "method". */
+
+extern bool gdbpy_auto_load_enabled (const struct extension_language_defn *);
/* extension_language_ops "methods". */