aboutsummaryrefslogtreecommitdiff
path: root/gdb/objfiles.c
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/objfiles.c')
-rw-r--r--gdb/objfiles.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gdb/objfiles.c b/gdb/objfiles.c
index d307c2a..126cfcc 100644
--- a/gdb/objfiles.c
+++ b/gdb/objfiles.c
@@ -494,6 +494,17 @@ free_objfile (objfile)
}
}
+static void
+do_free_objfile_cleanup (void *obj)
+{
+ free_objfile (obj);
+}
+
+struct cleanup *
+make_cleanup_free_objfile (struct objfile *obj)
+{
+ return make_cleanup (do_free_objfile_cleanup, obj);
+}
/* Free all the object files at once and clean up their users. */