From: Tom Tromey Date: Mon, 28 Jun 2010 19:05:42 +0000 (+0000) Subject: * dwarf2read.c (read_structure_type): Allocate null cleanup later. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=d3f41bb17012c1c836b552009b71c428774ddeed;p=binutils-gdb.git * dwarf2read.c (read_structure_type): Allocate null cleanup later. --- diff --git a/gdb/ChangeLog b/gdb/ChangeLog index d8fbe976585..bf4f918e517 100644 --- a/gdb/ChangeLog +++ b/gdb/ChangeLog @@ -1,3 +1,7 @@ +2010-06-28 Tom Tromey + + * dwarf2read.c (read_structure_type): Allocate null cleanup later. + 2010-06-28 Doug Evans * breakpoint.c (breakpoint_sals_to_pc): Delete arg address, unused. diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index bab1fba759f..43e7120c80c 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -5082,7 +5082,7 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) struct type *type; struct attribute *attr; char *name; - struct cleanup *back_to = make_cleanup (null_cleanup, 0); + struct cleanup *back_to; /* If the definition of this type lives in .debug_types, read that type. Don't follow DW_AT_specification though, that will take us back up @@ -5101,6 +5101,8 @@ read_structure_type (struct die_info *die, struct dwarf2_cu *cu) return set_die_type (die, type, cu); } + back_to = make_cleanup (null_cleanup, 0); + type = alloc_type (objfile); INIT_CPLUS_SPECIFIC (type);