mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-27 14:39:09 +08:00
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
This commit is contained in:
@ -282,14 +282,13 @@ ext_lang_objfile_script_executor
|
||||
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);
|
||||
|
Reference in New Issue
Block a user