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] [3/5] Types reference counting 	[make_function_type-objfile]
Date: Fri, 01 May 2009 14:44:00 -0000	[thread overview]
Message-ID: <20090501144440.GA3213@host0.dyn.jankratochvil.net> (raw)
In-Reply-To: <m3d4bccm1c.fsf@fleche.redhat.com>

On Thu, 16 Apr 2009 23:43:11 +0200, Tom Tromey wrote:
> >>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
> 
> Jan> make_function_type was sometimes being called with permanent
> Jan> target type which would now also create a permanent function type
> Jan> while it should be objfile-associated function type instead.
> 
> The only one is in jv-lang.c, right?

While jv-lang.c is also the case I originally found read_subroutine_type for
function returning void - where such DW_TAG_subprogram has no DW_AT_type
(return type) - and thus `builtin_type (gdbarch)->builtin_void' gets passed as
TYPE to make_function_type originally deriving the OBJFILE for its returned
function type from OBJFILE of that TYPE (internal in the void case).


> I'd like to understand why function types are always permanent, though.

This patch fixes only the real-OBJFILE vs. NULL-OBJFILE part which fixes the
leak even without the types reference counting / garbage collecting patch.

Whether NULL OBJFILE means permanent or discardable type I consider out of its
scope.  You still can make it discardable by `type_init_group (function_type)'.


> This patch is ok.

Checked it in in its original form:
	http://sourceware.org/ml/gdb-cvs/2009-05/msg00008.html


Thanks,
Jan


  reply	other threads:[~2009-05-01 14:44 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11 10:22 Jan Kratochvil
2009-04-16 21:43 ` Tom Tromey
2009-05-01 14:44   ` Jan Kratochvil [this message]
2009-06-26 13:23     ` Ulrich Weigand
2009-06-26 13:26       ` [rfc] Always use per-objfile types in symbol readers Ulrich Weigand
2009-06-26 13:29       ` [rfc] Fix Java type allocation and revert make_function_type change Ulrich Weigand
2009-06-26 16:12       ` [patch] [3/5] Types reference counting [make_function_type-objfile] Tom Tromey
2009-06-26 17:06         ` Ulrich Weigand
2009-06-26 16:40       ` Jan Kratochvil
2009-06-26 17:12         ` Ulrich Weigand
2009-06-26 17:24           ` Tom Tromey
2009-06-26 17:36             ` Ulrich Weigand
2009-06-26 18:04               ` Tom Tromey
2009-06-29 13:25         ` Ulrich Weigand

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=20090501144440.GA3213@host0.dyn.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