gdb: fix TYPE_CODE_ARRAY handling in sparc targets
authorVladimir Mezentsev <vladimir.mezentsev@oracle.com>
Fri, 19 May 2017 10:06:19 +0000 (03:06 -0700)
committerJose E. Marchesi <jose.marchesi@oracle.com>
Fri, 19 May 2017 10:06:19 +0000 (03:06 -0700)
commit1933fd8ee01ad2e74a9c6341bc40f54962a8f889
tree4fa1d4f8a0b9c540d3efcc87c6fe499534ecdde3
parenteb026f09eb6fcb96a5de1e655cdde041ba44affb
gdb: fix TYPE_CODE_ARRAY handling in sparc targets

gdb has a special type (TYPE_CODE_ARRAY) to support the gcc extension
(https://gcc.gnu.org/onlinedocs/gcc/Vector-Extensions.html).
TYPE_CODE_ARRAY is handled incorrectly for both (32- and 64-bit) modes
on Sparc machines.

Tested on sparc64-linux-gnu and sparc-solaris (32- and 64-bit mode).

6 tests ( from gdb/testsuite/gdb.base/gnu_vector.exp) failed on
sparc64-Linux and on sparc-Solaris in 32- and 64-bit mode.  Now all
these tests passed.  gdb/testsuite/gdb.base/gnu_vector.exp has 117
different cases for small (and not small) arrays and structures.

No regressions.

gdb/ChangeLog:

2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>

* sparc-tdep.c (sparc_structure_return_p)
(sparc_arg_on_registers_p): New functions.
(sparc32_store_arguments): Use them.
* sparc64-tdep.c (sparc64_16_byte_align_p)
(sparc64_store_floating_fields, sparc64_extract_floating_fields):
Handle TYPE_CODE_ARRAY.
gdb/ChangeLog
gdb/sparc-tdep.c
gdb/sparc64-tdep.c
This page took 0.03682 seconds and 4 git commands to generate.