diff options
Diffstat (limited to 'gdb/extension.c')
-rw-r--r-- | gdb/extension.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/extension.c b/gdb/extension.c index 853ef67..77b62e0 100644 --- a/gdb/extension.c +++ b/gdb/extension.c @@ -61,6 +61,7 @@ static const struct extension_language_script_ops { source_gdb_script, source_gdb_objfile_script, + NULL, /* objfile_script_executor */ auto_load_gdb_scripts_enabled }; @@ -286,6 +287,21 @@ ext_lang_objfile_script_sourcer (const struct extension_language_defn *extlang) return extlang->script_ops->objfile_script_sourcer; } +/* Return the objfile script "executor" function for EXTLANG. + This is the function that executes a script for a particular objfile. + If support for this language isn't compiled in, NULL is returned. + The extension language is not required to implement this function. */ + +objfile_script_executor_func * +ext_lang_objfile_script_executor + (const struct extension_language_defn *extlang) +{ + if (extlang->script_ops == NULL) + return NULL; + + 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. */ |