[PATCH 4/8] Store the comp_unit instead of the FDE table
Simon Marchi
simark@simark.ca
Wed Feb 12 03:36:00 GMT 2020
On 2020-02-08 10:27 a.m., Tom Tromey wrote:
> @@ -2120,14 +2123,11 @@ dwarf2_build_frame_info (struct objfile *objfile)
> const gdb_byte *frame_ptr;
> dwarf2_cie_table cie_table;
> dwarf2_fde_table fde_table;
> - dwarf2_fde_table *fde_table2;
>
> /* Build a minimal decoding of the DWARF2 compilation unit. */
> - unit = XOBNEW (&objfile->objfile_obstack, comp_unit);
> + unit = new comp_unit;
Not mandatory, but I'd suggest using an std::unique_ptr here, to hold this
variable, and then "release" it into the per-objfile map (since it can only
hold bare pointers).
Simon
More information about the Gdb-patches
mailing list