+2007-10-15 Vladimir Prus <vladimir@codesourcery.com>
+
+ Remove 'run_cleanup'.
+ * defs.h (do_run_cleanups, make_run_cleanup): Remove
+ declarations.
+ * infcmd.c (run_command_1): Call clear_solib instead
+ of do_run_cleanups.
+ * jv-lang.c (java_rerun_cleanup): Remove, for lack of
+ any use.
+ * solib.c (solib_cleanup_queued, do_clear_solib): Remove.
+ (update_solib_lib): Don't setup run cleanup.
+ (no_shared_libraries): Call clear_solib, not do_clear_solib.
+ * utils.c (run_cleanup_chain, make_run_cleanup)
+ (do_run_cleanups): Remove.
+
2007-10-15 Vladimir Prus <vladimir@codesourcery.com>
Remove CLEAR_SOLIB use.
extern void do_cleanups (struct cleanup *);
extern void do_final_cleanups (struct cleanup *);
-extern void do_run_cleanups (struct cleanup *);
extern void do_exec_cleanups (struct cleanup *);
extern void do_exec_error_cleanups (struct cleanup *);
extern struct cleanup *make_my_cleanup (struct cleanup **,
make_cleanup_ftype *, void *);
-extern struct cleanup *make_run_cleanup (make_cleanup_ftype *, void *);
-
extern struct cleanup *make_exec_cleanup (make_cleanup_ftype *, void *);
extern struct cleanup *make_exec_error_cleanup (make_cleanup_ftype *, void *);
/* Purge old solib objfiles. */
objfile_purge_solibs ();
- do_run_cleanups (NULL);
+ clear_solib ();
/* The comment here used to read, "The exec file is re-read every
time we do a generic_mourn_inferior, so we just have to worry
add_language (&java_language_defn);
}
-
-/* Cleanup code that should be run on every "run".
- We should use make_run_cleanup to have this be called.
- But will that mess up values in value histry? FIXME */
-
-extern void java_rerun_cleanup (void);
-void
-java_rerun_cleanup (void)
-{
- if (class_symtab != NULL)
- {
- free_symtab (class_symtab); /* ??? */
- class_symtab = NULL;
- }
- if (dynamics_objfile != NULL)
- {
- free_objfile (dynamics_objfile);
- dynamics_objfile = NULL;
- }
-
- java_object_type = NULL;
-}
static struct so_list *so_list_head; /* List of known shared objects */
-static int solib_cleanup_queued = 0; /* make_run_cleanup called */
-
/* Local function prototypes */
-static void do_clear_solib (void *);
-
/* If non-empty, this is a search path for loading non-absolute shared library
symbol files. This takes precedence over the environment variables PATH
and LD_LIBRARY_PATH. */
"Error reading attached process's symbol file.\n",
RETURN_MASK_ALL);
- /* Since this function might actually add some elements to the
- so_list_head list, arrange for it to be cleaned up when
- appropriate. */
- if (!solib_cleanup_queued)
- {
- make_run_cleanup (do_clear_solib, NULL);
- solib_cleanup_queued = 1;
- }
-
/* GDB and the inferior's dynamic linker each maintain their own
list of currently loaded shared objects; we want to bring the
former in sync with the latter. Scan both lists, seeing which
ops->clear_solib ();
}
-static void
-do_clear_solib (void *dummy)
-{
- solib_cleanup_queued = 0;
- clear_solib ();
-}
-
/* GLOBAL FUNCTION
solib_create_inferior_hook -- shared library startup support
no_shared_libraries (char *ignored, int from_tty)
{
objfile_purge_solibs ();
- do_clear_solib (NULL);
+ clear_solib ();
}
static void
static struct cleanup *cleanup_chain; /* cleaned up after a failed command */
static struct cleanup *final_cleanup_chain; /* cleaned up when gdb exits */
-static struct cleanup *run_cleanup_chain; /* cleaned up on each 'run' */
static struct cleanup *exec_cleanup_chain; /* cleaned up on each execution command */
/* cleaned up on each error from within an execution command */
static struct cleanup *exec_error_cleanup_chain;
return make_my_cleanup (&final_cleanup_chain, function, arg);
}
-struct cleanup *
-make_run_cleanup (make_cleanup_ftype *function, void *arg)
-{
- return make_my_cleanup (&run_cleanup_chain, function, arg);
-}
-
struct cleanup *
make_exec_cleanup (make_cleanup_ftype *function, void *arg)
{
do_my_cleanups (&final_cleanup_chain, old_chain);
}
-void
-do_run_cleanups (struct cleanup *old_chain)
-{
- do_my_cleanups (&run_cleanup_chain, old_chain);
-}
-
void
do_exec_cleanups (struct cleanup *old_chain)
{