Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Jan Kratochvil <jan.kratochvil@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 01/10] change gdb to refcount bfd everywhere
Date: Sun, 22 Jul 2012 19:00:00 -0000	[thread overview]
Message-ID: <20120722190009.GA25479@host2.jankratochvil.net> (raw)
In-Reply-To: <877gtzxyck.fsf@fleche.redhat.com>

On Thu, 19 Jul 2012 22:58:03 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> The comments are present in both and neither is a reference, they
> Jan> are already out of sync.
> 
> I don't really follow,

There was some conclusion on gdb-patches to make happy both people wanting
comments in *.c and people wanting comments in *.h and to prevent duplication
of the same comment in both *.c and *.h which leads to stale invalid comments
in one of the files to put the comment only in *.h file and in the *.c file
state:
	/* See gdb_bfd.h.  */
You even use it at various functions in gdb_bfd.c, just not for gdb_bfd_ref
and gdb_bfd_unref.


> >> @@ -2519,14 +2512,10 @@ reread_symbols (void)
> >> to close the descriptor but BFD lacks a way of closing the
> >> BFD without closing the descriptor.  */
> >> obfd_filename = bfd_get_filename (objfile->obfd);
> >> -	  if (!bfd_close (objfile->obfd))
> >> -	    error (_("Can't close BFD for %s: %s"), objfile->name,
> >> -		   bfd_errmsg (bfd_get_error ()));
> >> +	  gdb_bfd_unref (objfile->obfd);
> >> objfile-> obfd = bfd_open_maybe_remote (obfd_filename);
> >> if (objfile->obfd == NULL)
> >> error (_("Can't open %s to read symbols."), objfile->name);
> >> -	  else
> >> -	    objfile->obfd = gdb_bfd_ref (objfile->obfd);
> 
> Jan> Why isn't gdb_bfd_ref missing here?
> 
> bfd_open_maybe_remote returns a new reference.

Aha, OK.

> I wonder if I should rename it to gdb_bfd_open_maybe_remote, for
> consistency.  What do you think?  I'm inclined to do it.

Definitely.


Thanks,
Jan


  parent reply	other threads:[~2012-07-22 19:00 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-07-18 19:32 Tom Tromey
2012-07-19 14:18 ` Jan Kratochvil
2012-07-19 20:58   ` Tom Tromey
2012-07-20 16:37     ` Tom Tromey
2012-07-23  8:54       ` Jan Kratochvil
2012-07-23  9:06         ` Jan Kratochvil
2012-07-23 15:23           ` Tom Tromey
2012-07-23 15:25             ` Tom Tromey
2012-07-24 13:17             ` Jan Kratochvil
2012-07-24 19:52               ` Tom Tromey
2012-07-24 20:27                 ` Eli Zaretskii
2012-07-25 14:25                   ` Tom Tromey
2012-07-25 14:29                     ` Jan Kratochvil
2012-07-25 14:52                       ` Tom Tromey
2012-07-25 14:55                         ` Jan Kratochvil
2012-07-25 15:44                           ` Tom Tromey
2012-07-25 15:37                     ` Eli Zaretskii
2012-07-25 11:57                 ` Jan Kratochvil
2012-07-23 14:52         ` Tom Tromey
2012-07-23 18:54         ` Tom Tromey
2012-07-23 19:02           ` Jan Kratochvil
2012-07-23 19:08             ` Tom Tromey
2012-07-20 16:37     ` Tom Tromey
2012-07-20 18:11       ` Jan Kratochvil
2012-07-22 19:00     ` Jan Kratochvil [this message]
2012-07-23 14:49       ` Tom Tromey
2012-07-23 15:01         ` Tom Tromey
2012-07-23 15:03         ` Tom Tromey
2012-07-20 16:31   ` Tom Tromey
2012-07-20 18:10     ` Jan Kratochvil

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=20120722190009.GA25479@host2.jankratochvil.net \
    --to=jan.kratochvil@redhat.com \
    --cc=gdb-patches@sourceware.org \
    --cc=tromey@redhat.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