aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile
diff options
context:
space:
mode:
authorSimon Marchi <simon.marchi@polymtl.ca>2021-01-13 11:57:24 -0500
committerSimon Marchi <simon.marchi@polymtl.ca>2021-01-13 11:57:24 -0500
commitdb972fce46368f7d2a60e43aca78f0757515c0c8 (patch)
treed447ae34443d4a8d46728ff9c04ffe9ff124bcac /gdb/guile
parent5e12f48ffbf5eba4524fdbae341f091c7cd0cb72 (diff)
downloadgdb-db972fce46368f7d2a60e43aca78f0757515c0c8.zip
gdb-db972fce46368f7d2a60e43aca78f0757515c0c8.tar.gz
gdb-db972fce46368f7d2a60e43aca78f0757515c0c8.tar.bz2
gdb: bool-ify ext_lang_auto_load_enabled and friends
Make it and related functions return bool. Move function comments to header where applicable. gdb/ChangeLog: * 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. Change-Id: I657a17d2dab77a36884a137ce9b23a2cc6d53140
Diffstat (limited to 'gdb/guile')
-rw-r--r--gdb/guile/guile-internal.h5
-rw-r--r--gdb/guile/scm-auto-load.c5
2 files changed, 6 insertions, 4 deletions
diff --git a/gdb/guile/guile-internal.h b/gdb/guile/guile-internal.h
index 1fa60c5..c48547a 100644
--- a/gdb/guile/guile-internal.h
+++ b/gdb/guile/guile-internal.h
@@ -595,7 +595,10 @@ extern struct value *vlscm_convert_value_from_scheme
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 *,
diff --git a/gdb/guile/scm-auto-load.c b/gdb/guile/scm-auto-load.c
index 4a7b2e2..569a47f 100644
--- a/gdb/guile/scm-auto-load.c
+++ b/gdb/guile/scm-auto-load.c
@@ -41,10 +41,9 @@ show_auto_load_guile_scripts (struct ui_file *file, int from_tty,
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;