diff options
author | Joel Brobecker <brobecker@gnat.com> | 2011-02-17 06:42:57 +0000 |
---|---|---|
committer | Joel Brobecker <brobecker@gnat.com> | 2011-02-17 06:42:57 +0000 |
commit | e67ad678a1e75d69343e4270305c3bf390922362 (patch) | |
tree | de842fb23809a9fb5cd399a571e1bc71dd972a9b /gdb/testsuite/ChangeLog | |
parent | 93084bcabb5f23c509734a202f5a45201b723657 (diff) | |
download | gdb-e67ad678a1e75d69343e4270305c3bf390922362.zip gdb-e67ad678a1e75d69343e4270305c3bf390922362.tar.gz gdb-e67ad678a1e75d69343e4270305c3bf390922362.tar.bz2 |
[Ada] Fix unconstrained packed array size
When ada-lang transforms an array descriptor type (an XUP structure)
into an array type, the size of the array type is computed by using
the element size, and multiplying it by the number of elements in
that array. This does not work, however, for packed arrays, where
the *packed* size in bits needs to be used.
This usually does not cause any problem, because we end up reading
more memory than needed. However, we have observed on LynxOS
a memory error while trying to read the entire array, because
the larger-than-needed read tried to read past the end of the stack
into inaccessible memory.
This patch fixes the problem by correctly computing the array size
in bytes in the case of packed arrays.
gdb/ChangeLog:
* ada-lang.c (ada_type_of_array): Fix the size of the array
in the case of an unconstrained packed array.
gdb/testsuite/ChangeLog:
* gdb.ada/packed_array: Expand testcase to test printing of
unconstrained packed array.
Diffstat (limited to 'gdb/testsuite/ChangeLog')
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index e3315ad..bcafab8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,5 +1,10 @@ 2011-02-17 Joel Brobecker <brobecker@adacore.com> + * gdb.ada/packed_array: Expand testcase to test printing of + unconstrained packed array. + +2011-02-17 Joel Brobecker <brobecker@adacore.com> + * gdb.dwarf2/dw2-ranges.exp: Simplify using clean_restart. 2011-02-16 Pedro Alves <pedro@codesourcery.com> |