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 3/3] fort_dyn_array: Use value constructor instead of raw-buffer manipulation.


On 04/04/2016 15:54, Yao Qi wrote:
Bernhard Heckel <bernhard.heckel@intel.com> writes:

Instead of pre-computing indices into a fortran array re-use
the value_* interfaces to subscript a fortran array.
Hi, can you elaborate a little please?  It looks like change to new
interface, but why does this fix the bug? because value_* interfaces
have been aware of dynamic type?

Yes, you are right. value_* interface (value_field) takes care about types with dynamic locations. This means the contents for dynamic field types of structures are not at "Addr_of (type) + TYPE_FIELD_BITPOS (type, index) / 8" but at the value
of the dynamic location attribute which is already resolved.
So, switching to the new interfaces solves the issue mentioned in the commit message.

Intel Deutschland GmbH
Registered Address: Am Campeon 10-12, 85579 Neubiberg, Germany
Tel: +49 89 99 8853-0, www.intel.de
Managing Directors: Christin Eisenschmid, Christian Lamprechter
Chairperson of the Supervisory Board: Nicole Lau
Registered Office: Munich
Commercial Register: Amtsgericht Muenchen HRB 186928

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