diff options
Diffstat (limited to 'gdb/dwarf2-frame.c')
-rw-r--r-- | gdb/dwarf2-frame.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/gdb/dwarf2-frame.c b/gdb/dwarf2-frame.c index 8fb2ac77718..f9afe0b105b 100644 --- a/gdb/dwarf2-frame.c +++ b/gdb/dwarf2-frame.c @@ -1908,9 +1908,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, if (find_cie (cie_table, cie_pointer)) return end; - cie = (struct dwarf2_cie *) - obstack_alloc (&unit->objfile->objfile_obstack, - sizeof (struct dwarf2_cie)); + cie = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_cie); cie->initial_instructions = NULL; cie->cie_pointer = cie_pointer; @@ -2089,9 +2087,7 @@ decode_frame_entry_1 (struct comp_unit *unit, const gdb_byte *start, if (cie_pointer >= unit->dwarf_frame_size) return NULL; - fde = (struct dwarf2_fde *) - obstack_alloc (&unit->objfile->objfile_obstack, - sizeof (struct dwarf2_fde)); + fde = XOBNEW (&unit->objfile->objfile_obstack, struct dwarf2_fde); fde->cie = find_cie (cie_table, cie_pointer); if (fde->cie == NULL) { @@ -2395,8 +2391,7 @@ dwarf2_build_frame_info (struct objfile *objfile) } /* Copy fde_table to obstack: it is needed at runtime. */ - fde_table2 = (struct dwarf2_fde_table *) - obstack_alloc (&objfile->objfile_obstack, sizeof (*fde_table2)); + fde_table2 = XOBNEW (&objfile->objfile_obstack, struct dwarf2_fde_table); if (fde_table.num_entries == 0) { |