This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH V2 3/5] Fortran: Resolve dynamic target types of pointers.


> we could resolve the target when we actually access it -> value_ind.
> As far as I know there is one corner case, when we print the address
> and the target type has an DATA_LOCATION attribute. But I don't find
> the code at the moment.
> 
> Nevertheless, with your input it is becomes questionable if we should
> resolve structures and references.
> Fields of structures could be resolved when we access them ->
> value_struct_elt. What do you think?

For structures, I think we resolve its elements so we can know the
structure's size. There is a huge comment in ada-lang.c about
type 'fixing', which is hacky-before-go-lucky-dynamic-type-handling
was introduced in GDB. It explains in fairly good detail when we
do the resolution (we called it "fixing"), and why we do it at that
time. With the new infrastructure, we could possibly do more resolution
lazily, but I would focus on that later if it turns out that the only
benefit of that is performance improvement.

-- 
Joel


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]