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 01/10] change gdb to refcount bfd everywhere


>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:

Tom> This changes allocate_objfile to acquire a reference to the BFD,
Tom> rather than steal a reference.  Then it changes all callers, direct or
Tom> indirect, to follow.

Jan> map_vmap still steals a reference.

I'll investigate.

One thing I noticed is that bfd_openr_next_archived_file doesn't
document who owns the resulting BFD.  Must one close it?  Or is it
closed when the parent BFD is closed?  I think the latter; or at least,
if not the latter then the caching mechanism in bfd/archive.c is badly
broken.  Anyway, whatever bugs exist here are latent ones already in gdb.

Tom> I'm still undecided as to whether this patch is an improvement.  I
Tom> think it does fix a couple of obscure latent memory leaks.

Jan> I find the code the only way "how it should be" now.

Ok.  I'm going to put those in.

Tom


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