From 74b7792f0fcae41f7c7da524527b7261a3fd68c4 Mon Sep 17 00:00:00 2001 From: Andrew Cagney Date: Mon, 22 May 2000 09:02:23 +0000 Subject: Purge (almost) make_cleanup_func. --- gdb/dwarf2read.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) (limited to 'gdb/dwarf2read.c') diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 9212e38..3025bbd 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -708,6 +708,8 @@ struct die_info *read_comp_unit PARAMS ((char *, bfd *)); static void free_die_list PARAMS ((struct die_info *)); +static struct cleanup *make_cleanup_free_die_list (struct die_info *); + static void process_die PARAMS ((struct die_info *, struct objfile *)); static char *dwarf2_linkage_name PARAMS ((struct die_info *)); @@ -1322,7 +1324,7 @@ psymtab_to_symtab_1 (pst) dies = read_comp_unit (info_ptr, abfd); - make_cleanup ((make_cleanup_func) free_die_list, dies); + make_cleanup_free_die_list (dies); /* Do line number decoding in read_file_scope () */ process_die (dies, objfile); @@ -2956,6 +2958,19 @@ free_die_list (dies) } } +static void +do_free_die_list_cleanup (void *dies) +{ + free_die_list (dies); +} + +static struct cleanup * +make_cleanup_free_die_list (struct die_info *dies) +{ + return make_cleanup (do_free_die_list_cleanup, dies); +} + + /* Read the contents of the section at OFFSET and of size SIZE from the object file specified by OBJFILE into the psymbol_obstack and return it. */ -- cgit v1.1