This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] [Ada] Cache all static structures and reset cache during resolution
- From: sergiodj+buildbot at redhat dot com
- To: gdb-testers at sourceware dot org
- Date: Mon, 27 Apr 2015 06:17:29 -0400
- Subject: [binutils-gdb] [Ada] Cache all static structures and reset cache during resolution
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 9e19566105546654ab24b2b58c890fd7e2b9e00c ***
Author: Pierre-Marie de Rodat <derodat@adacore.com>
Branch: master
Commit: 9e19566105546654ab24b2b58c890fd7e2b9e00c
[Ada] Cache all static structures and reset cache during resolution
Currently, ada-lang.c:template_to_static_fixed_type (working on
structure types only) caches its result into the unused TYPE_TARGET_TYPE
field. This introduces inconsistencies when the input type is
specialized, for instance during type resolution: the cached static
fixed type is copied along with the original type, but it's no longer
adapted to the copy once the copy is modified:
template_to_static_fixed_type has to compute another static fixed type
for it.
This change first introduces a cache reset during type resolution for
structure types so that this inconsistency does not happen anymore. It
also makes template_to_static_fixed_type smarter with respect to types
that do not need static fixed copies so that less computations is done
in general.
This inconsistency was spotted thanks to code reading, not because of
any sort of failure and we did not manage to exhibit a failure yet, so
no testcase for this.
gdb/ChangeLog:
* ada-lang.c (template_to_static_fixed_type): Return input type
when it is already fixed. Cache the input type itself when not
creating a static fixed copy. Make it explicit that we never
molestate the input type.
* gdbtypes.c (resolve_dynamic_struct): Reset the
TYPE_TARGET_TYPE field for resolved copies.
- Follow-Ups:
- Failures on Fedora-ppc64be-cc-with-index, branch master
- Failures on Fedora-ppc64be-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Debian-i686-native-gdbserver, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Fedora-i686, branch master
- Failures on Fedora-x86_64-cc-with-index, branch master
- Failures on Fedora-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master