diff options
Diffstat (limited to 'gdb/guile/guile.c')
-rw-r--r-- | gdb/guile/guile.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/guile/guile.c b/gdb/guile/guile.c index 16d15b7..4abf5c5 100644 --- a/gdb/guile/guile.c +++ b/gdb/guile/guile.c @@ -704,6 +704,10 @@ call_initialize_gdb_module (void *data) performed within the desired module. */ scm_c_define_module (gdbscm_module_name, initialize_gdb_module, NULL); +#if HAVE_GUILE_MANUAL_FINALIZATION + scm_run_finalizers (); +#endif + return NULL; } @@ -850,6 +854,13 @@ _initialize_guile (void) side to define module "gdb" which imports "_gdb". There is evidently no similar convention in Guile so we skip this. */ +#if HAVE_GUILE_MANUAL_FINALIZATION + /* Our SMOB free functions are not thread-safe, as GDB itself is not + intended to be thread-safe. Disable automatic finalization so that + finalizers aren't run in other threads. */ + scm_set_automatic_finalization_enabled (0); +#endif + #ifdef HAVE_SIGPROCMASK /* Before we initialize Guile, block SIGCHLD. This is done so that all threads created during Guile initialization |