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] Do not consider reference types as dynamic


> If the definition above is correct, then we should enhance
> typeprint.c/c-typeprint.c/etc. to resolve dynamic type as type
> printing goes in order to get the actual array bounds in the output.
> This means: propagating a (possibly null) value in a lot of
> functions and use it for type resolution when possible. I guess this
> would involve a big patch but would also cover the "ptype" case.
> 
> I guess another way to "just get things working" would be to revert
> my previous patch and to enhance the dynamic property mechanism
> (dwarf2loc.h) to handle reference values that are not present in
> memory. For instance: extend the property_addr_info structure to
> hold either the address of objects (as today) or the address of the
> referenced object (for reference types).
> 
> Thoughts?

Thanks for looking into that, Pierre-Marie.

My 2 cents, based on the little amount of experience we've had dealing
with dyanmic types in Ada, and the amount of experience we've had
dealing with the GNAT encodings, I have a feeling that it's best to
maintain reference types as being non-dynamic, and enhance the functions
that print reference objects instead. We should probably compare what
Ada does (ada_val_print_ref) compared to C, for instance, as we handle
those reference values correctly, I believe.

-- 
Joel


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