This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] [2/5] Types reference counting [garbage-collector]
- From: Tom Tromey <tromey at redhat dot com>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 16 Apr 2009 15:36:15 -0600
- Subject: Re: [patch] [2/5] Types reference counting [garbage-collector]
- References: <20090411102127.GC32624@host0.dyn.jankratochvil.net>
- Reply-to: tromey at redhat dot com
>>>>> "Jan" == Jan Kratochvil <jan.kratochvil@redhat.com> writes:
Jan> a types garbage collector implementation. This part is directly
Jan> dependent on the `base' patch.
Jan> +/* Unify type_group of all the type structures found while crawling the
Jan> + type_group_link_table tree from the starting point type. DATA contains
Jan> + type_group_link reference of the starting point type. Only during the first
I think both of these should read "starting point TYPE", since they
are referring to the value of the variable "type".
Jan> +/* Delete all the instances on TYPE_CHAIN of TYPE, including their referenced
Jan> + main_type. TYPE must be a reclaimable type - neither permanent nor objfile
Jan> + associated. */
Jan> +
Jan> +static void
Jan> +delete_type_chain (struct type *type)
Jan> +{
Jan> + struct type *type_iter, *type_iter_to_free;
Jan> +
Jan> + gdb_assert (TYPE_OBJFILE (type) == NULL);
We don't check that TYPE is reclaimable here, but it seems like we
could. This isn't very important to me, but I thought I'd see what
you think.
This patch is ok with the comment fix. Feel free to put in the
reclaimable check if you want.
Tom