bitfield-parent-optimized-out: Fix struct definition
authorAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 15 Nov 2016 19:52:03 +0000 (20:52 +0100)
committerAndreas Arnez <arnez@linux.vnet.ibm.com>
Tue, 15 Nov 2016 19:52:03 +0000 (20:52 +0100)
commitb7f38fdae7c75e1d13abd455b3931950db28d22b
tree3372dd8472fa4b531e0b90db3c949941c4b40d75
parent93ca393659ef6714724749950301757f47e5e9fd
bitfield-parent-optimized-out: Fix struct definition

The "struct S" type in bitfield-parent-optimized-out.exp is declared to
have a size of 4 bytes but to hold two 4-byte members: an int-based
bitfield and a 4-byte int.  Also, both members have the same
data_member_location 2, causing them to overlap and to reach 2 bytes
beyond the structure's boundary.

This is fixed by increasing the structure size to 8 and setting the
first and second member's data_member_location to 0 and 4, respectively.

gdb/testsuite/ChangeLog:

* gdb.dwarf2/bitfield-parent-optimized-out.exp: Fix DWARF code for
the definition of struct S.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.dwarf2/bitfield-parent-optimized-out.exp
This page took 0.029514 seconds and 4 git commands to generate.