From 041ca48e976b9a2a39a9440f7fbc2dffc77ed7c1 Mon Sep 17 00:00:00 2001 From: Andrew Burgess Date: Thu, 22 Apr 2021 18:26:15 +0100 Subject: gdb: extension languages finish_initialization to initialize Now that both Python and Guile are fully initialized from their respective finish_initialization methods, the "finish" in the method name doesn't really make sense; initialization starts _and_ finishes with that method. As such, this commit renames finish_initialization to just initialize. There should be no user visible changes after this commit. gdb/ChangeLog: * extension-priv.h (struct extension_language_ops): Rename 'finish_initialization' to 'initialize'. * extension.c (finish_ext_lang_initialization): Renamed to... (ext_lang_initialization): ...this, update comment, and updated the calls to reflect the change in struct extension_language_ops. * extension.h (finish_ext_lang_initialization): Renamed to... (ext_lang_initialization): ...this. * guile/guile.c (gdbscm_finish_initialization): Renamed to... (gdbscm_initialize): ...this, update comment at definition. (guile_extension_ops): Update. * main.c (captured_main_1): Update call to finish_ext_lang_initialization. * python/python.c (gdbpy_finish_initialization): Rename to... (gdbpy_initialize): ...this, update comment at definition, and update call to do_finish_initialization. (python_extension_ops): Update. (do_finish_initialization): Rename to... (do_initialize): ...this, and update comment. --- gdb/guile/guile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'gdb/guile/guile.c') diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index 9c2a40b..bdf15cd 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -75,8 +75,7 @@ const char *gdbscm_print_excp = gdbscm_print_excp_message; #ifdef HAVE_GUILE -static void gdbscm_finish_initialization - (const struct extension_language_defn *); +static void gdbscm_initialize (const struct extension_language_defn *); static int gdbscm_initialized (const struct extension_language_defn *); static void gdbscm_eval_from_control_command (const struct extension_language_defn *, struct command_line *); @@ -113,7 +112,7 @@ static const struct extension_language_script_ops guile_extension_script_ops = static const struct extension_language_ops guile_extension_ops = { - gdbscm_finish_initialization, + gdbscm_initialize, gdbscm_initialized, gdbscm_eval_from_control_command, @@ -638,12 +637,11 @@ call_initialize_gdb_module (void *data) return NULL; } -/* A callback to finish Guile initialization after gdb has finished all its - initialization. - This is the extension_language_ops.finish_initialization "method". */ +/* A callback to initialize Guile after gdb has finished all its + initialization. This is the extension_language_ops.initialize "method". */ static void -gdbscm_finish_initialization (const struct extension_language_defn *extlang) +gdbscm_initialize (const struct extension_language_defn *extlang) { #if HAVE_GUILE /* The Python support puts the C side in module "_gdb", leaving the -- cgit v1.1