From: Tom Tromey <tromey@redhat.com>
To: Paul Pluzhnikov <ppluzhnikov@google.com>
Cc: gdb@sourceware.org
Subject: Re: Solibs and objfile BFD ownership
Date: Fri, 21 Aug 2009 17:32:00 -0000 [thread overview]
Message-ID: <m3bpm92hyo.fsf@fleche.redhat.com> (raw)
In-Reply-To: <8ac60eac0908191656o6c7c876cp503a3b6973ea090b@mail.gmail.com> (Paul Pluzhnikov's message of "Wed, 19 Aug 2009 16:56:42 -0700")
>>>>> "Paul" == Paul Pluzhnikov <ppluzhnikov@google.com> writes:
Paul> It would be slightly wasteful to set refcount to 1 everywhere,
Paul> since solib is the only place where sharing could (currently)
Paul> occur.
Yeah, I suppose. But it seems clearer and more future-proof to me.
Paul> 2009-08-19 Paul Pluzhnikov <ppluzhnikov@google.com>
Paul> * objfiles.h (gdb_bfd_ref): New prototype.
Paul> * objfiles.c (gdb_bfd_ref): New function.
Paul> (allocate_objfile): Call it.
Paul> (gdb_bfd_unref): Adjust assertion.
Paul> * solib.c (solib_map_sections): Add reference.
Paul> (symbol_add_stub): Don't add reference here.
Paul> * symfile.c (reread_symbols): Add reference.
This is ok. Thanks.
Paul> + gdb_assert (*p_refcount == 1 || *p_refcount == 2);
This assertion is a bit strange, but I suppose it is harmless. If we
ever want more sharing, we can always just remove it. In the meantime I
suppose it is checking that we don't over-share somehow.
Tom
next prev parent reply other threads:[~2009-08-21 17:30 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-28 15:40 Daniel Jacobowitz
2009-07-29 23:56 ` Paul Pluzhnikov
2009-07-30 16:16 ` Tom Tromey
2009-08-04 0:50 ` Paul Pluzhnikov
2009-08-04 14:53 ` Daniel Jacobowitz
2009-08-04 17:37 ` Paul Pluzhnikov
2009-08-04 18:40 ` Daniel Jacobowitz
2009-08-04 18:47 ` Paul Pluzhnikov
2009-08-18 5:56 ` Paul Pluzhnikov
2009-08-19 22:29 ` Tom Tromey
2009-08-20 1:50 ` Paul Pluzhnikov
2009-08-21 17:32 ` Tom Tromey [this message]
2009-08-21 18:04 ` Paul Pluzhnikov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m3bpm92hyo.fsf@fleche.redhat.com \
--to=tromey@redhat.com \
--cc=gdb@sourceware.org \
--cc=ppluzhnikov@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox