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: [PATCH 04/40] Fix TAB-completion + .gdb_index slowness (generalize filename_seen_cache)


On 07/14/2017 08:40 PM, Pedro Alves wrote:

> I was about to push it when I realized that I missed releasing the
> new heap-allocated dwarf2_per_objfile::filenames_cache...
> 
> To address that, I made it possible for dwarf2_per_objfile to be
> a non-POD:
> 
>   https://sourceware.org/ml/gdb-patches/2017-07/msg00202.html
> 
> and made dwarf2_per_objfile::filenames_cache an optional, so the
> cache object (though not its elements) is on the obstack too.
> 
> Here's the updated patch.

The dwarf2_per_objfile patch is in, so I pushed this one in too,
with a tiny comment update to mention the reason for the optional:

  /* Table containing all filenames.  This is an optional because the
     table is lazily constructed on first access.  */
  gdb::optional<filename_seen_cache> filenames_cache;

Thanks much for the review, Keith.

-- 
Pedro Alves


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