This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFA 3/6] Allocate dwarf2_cu with new


On 2018-01-10 11:28 AM, Tom Tromey wrote:
>>>>>> "Tom" == Tom Tromey <tom@tromey.com> writes:
> 
> Tom> This is gone with Simon's changes; I'll update the ChangeLog and send
> Tom> the updated patch.
> 
> Here it is.  This went through the buildbot the second time around.
> 
> Tom
> 
> commit bcaf61d8ff6a149785924223151df8ded30e8d7a
> Author: Simon Marchi <simon.marchi@ericsson.com>
> Date:   Sun Jan 7 11:41:09 2018 -0500
> 
>     Allocate dwarf2_cu with new
>     
>     This changes dwarf2_cu to be allocated with new, and fixes up the
>     users.
>     
>     2018-01-05  Tom Tromey  <tom@tromey.com>
>                 Simon Marchi  <simon.marchi@ericsson.com>
>     
>             * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
>             (dwarf2_per_objfile::free_cached_comp_units)
>             (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
>             (init_cutu_and_read_dies_no_follow): Update.
>             (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
>             (dwarf2_cu::~dwarf2_cu): New.
>             (free_heap_comp_unit, free_stack_comp_unit): Remove.
>             (age_cached_comp_units, free_one_cached_comp_unit): Update.

Hi Tom,

This LGTM, I just noted two formatting nits.

> @@ -7932,7 +7904,6 @@ init_cutu_and_read_dies (struct dwarf2_per_cu_data *this_cu,
>    if (info_ptr >= begin_info_ptr + this_cu->length
>        || peek_abbrev_code (abfd, info_ptr) == 0)
>      {
> -      do_cleanups (cleanups);
>        return;
>      }

You can remove the curly braces here.

> @@ -8090,7 +8047,6 @@ init_cutu_and_read_dies_no_follow (struct dwarf2_per_cu_data *this_cu,
>    if (info_ptr >= begin_info_ptr + this_cu->length
>        || peek_abbrev_code (abfd, info_ptr) == 0)
>      {
> -      do_cleanups (cleanups);
>        return;
>      }

Here too.

Simon


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]