aboutsummaryrefslogtreecommitdiff
path: root/gdb/dwarf2read.c
diff options
context:
space:
mode:
authorAndrew Cagney <cagney@redhat.com>2000-05-22 09:02:23 +0000
committerAndrew Cagney <cagney@redhat.com>2000-05-22 09:02:23 +0000
commit74b7792f0fcae41f7c7da524527b7261a3fd68c4 (patch)
treeb88a9a20c59780f3b51c4819b6dea5acce3ec446 /gdb/dwarf2read.c
parent32c092c3fab0ca778242005a793cc4641c3e1b4b (diff)
downloadgdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.zip
gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.gz
gdb-74b7792f0fcae41f7c7da524527b7261a3fd68c4.tar.bz2
Purge (almost) make_cleanup_func.
Diffstat (limited to 'gdb/dwarf2read.c')
-rw-r--r--gdb/dwarf2read.c17
1 files changed, 16 insertions, 1 deletions
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. */