Re: [patch] [3/5] Types reference counting [make_function_type-objfile]

Ulrich Weigand
2009-06-29T13:25:42Z

> On Fri, 26 Jun 2009 15:23:00 +0200, Ulrich Weigand wrote:
> > - I think the symbol readers should always return per-objfile types. This
> > just makes everything simpler, in particular allocation of derived types
> > (as you notice). I think it would also good to be able to guarantee that
> > TYPE_OBJFILE of every symbol type is non-NULL ...
>
> > - The Java generated types should *not* go onto the "fake" dynamics objfile
> > in the first place. That objfile is somewhat bogus in that it isn't
> > associated with an architecture (thus breaking my per-type architecture
> > effort), and it also don't help with type lifetime issues as the fake
> > objfile never goes away. I think those types should be allocated with
> > a NULL objfile (in the future are per-gdbarch types) instead.
>
> > Therefore, I'd prefer to fix the two problems mentioned above, and then
> > revert your patch.
>
> If the current rule:
> # So far always type A referencing -> type B had either the same TYPE_OBJFILE
> # or TYPE_OBJFILE(B) was NULL.
>
> will be changed to:
> # Type A referencing -> type B had the same TYPE_OBJFILE.
>
> I only welcome it and sure I agree with reverting my patch afterwards.

I've now checked the two patches in.

Bye,