aboutsummaryrefslogtreecommitdiff
path: root/gdb/guile/scm-arch.c
diff options
context:
space:
mode:
authorAndrew Burgess <andrew.burgess@embecosm.com>2021-04-22 18:17:01 +0100
committerAndrew Burgess <andrew.burgess@embecosm.com>2021-04-28 09:56:20 +0100
commit880ae75a2b7106045ed2ae212bbc28e4dc0ad667 (patch)
tree400699c81d144b8186b1b123ca94cf79b60a3ea5 /gdb/guile/scm-arch.c
parent8e3685bf250d9ecda5058912d6624e77d7a2b07e (diff)
downloadgdb-880ae75a2b7106045ed2ae212bbc28e4dc0ad667.zip
gdb-880ae75a2b7106045ed2ae212bbc28e4dc0ad667.tar.gz
gdb-880ae75a2b7106045ed2ae212bbc28e4dc0ad667.tar.bz2
gdb delay guile initialization until gdbscm_finish_initialization
Like with the previous commit, this commit delays the initialisation of the guile extension language until gdbscm_finish_initialization. This is mostly about splitting the existing gdbscm_initialize_* functions in two, all the calls to register_objfile_data_with_cleanup, gdbarch_data_register_post_init, etc are moved into new _initialize_* functions, but everything else is left in the gdbscm_initialize_* functions. Then the call to code previously in _initialize_guile is moved into gdbscm_finish_initialization. There should be no user visible changes after this commit. gdb/ChangeLog: * guile/guile.c (gdbscm_set_backtrace): Add declaration. (gdbscm_finish_initialization): Add code moved from _initialize_guile. (_initialize_guile): Move code to gdbscm_finish_initialization. * guile/scm-arch.c (gdbscm_initialize_arches): Move some code into _initialize_scm_arch. (_initialize_scm_arch): New function. * guile/scm-block.c (gdbscm_initialize_blocks): Move some code into _initialize_scm_block. (_initialize_scm_block): New function. * guile/scm-frame.c (gdbscm_initialize_frames): Move some code into _initialize_scm_frame. (_initialize_scm_frame): New function. * guile/scm-objfile.c (gdbscm_initialize_objfiles): Move some code into _initialize_scm_objfile. (_initialize_scm_objfile): New function. * guile/scm-progspace.c (gdbscm_initialize_pspaces): Move some code into _initialize_scm_progspace. (_initialize_scm_progspace): New function. * guile/scm-symbol.c (gdbscm_initialize_symbols): Move some code into _initialize_scm_symbol. (_initialize_scm_symbol): New function. * guile/scm-symtab.c (gdbscm_initialize_symtabs): Move some code into _initialize_scm_symtab. (_initialize_scm_symtab): New function. * guile/scm-type.c (gdbscm_initialize_types): Move some code into _initialize_scm_type. (_initialize_scm_type): New function.
Diffstat (limited to 'gdb/guile/scm-arch.c')
-rw-r--r--gdb/guile/scm-arch.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/guile/scm-arch.c b/gdb/guile/scm-arch.c
index f4f871d..863e502 100644
--- a/gdb/guile/scm-arch.c
+++ b/gdb/guile/scm-arch.c
@@ -650,7 +650,12 @@ gdbscm_initialize_arches (void)
scm_set_smob_print (arch_smob_tag, arscm_print_arch_smob);
gdbscm_define_functions (arch_functions, 1);
+}
+void _initialize_scm_arch ();
+void
+_initialize_scm_arch ()
+{
arch_object_data
= gdbarch_data_register_post_init (arscm_object_data_init);
}