diff options
Diffstat (limited to 'gdb/psymtab.c')
-rw-r--r-- | gdb/psymtab.c | 38 |
1 files changed, 0 insertions, 38 deletions
diff --git a/gdb/psymtab.c b/gdb/psymtab.c index e895828..3acc226 100644 --- a/gdb/psymtab.c +++ b/gdb/psymtab.c @@ -1832,44 +1832,6 @@ discard_psymtab (struct objfile *objfile, struct partial_symtab *pst) objfile->free_psymtabs = pst; } -/* An object of this type is passed to discard_psymtabs_upto. */ - -struct psymtab_state -{ - /* The objfile where psymtabs are discarded. */ - - struct objfile *objfile; - - /* The first psymtab to save. */ - - struct partial_symtab *save; -}; - -/* A cleanup function used by make_cleanup_discard_psymtabs. */ - -static void -discard_psymtabs_upto (void *arg) -{ - struct psymtab_state *state = (struct psymtab_state *) arg; - - while (state->objfile->psymtabs != state->save) - discard_psymtab (state->objfile, state->objfile->psymtabs); -} - -/* Return a new cleanup that discards all psymtabs created in OBJFILE - after this function is called. */ - -struct cleanup * -make_cleanup_discard_psymtabs (struct objfile *objfile) -{ - struct psymtab_state *state = XNEW (struct psymtab_state); - - state->objfile = objfile; - state->save = objfile->psymtabs; - - return make_cleanup_dtor (discard_psymtabs_upto, state, xfree); -} - /* We need to pass a couple of items to the addrmap_foreach function, |