diff options
author | Luis Machado <lgustavo@codesourcery.com> | 2014-10-03 08:21:33 -0300 |
---|---|---|
committer | Luis Machado <lgustavo@codesourcery.com> | 2014-10-03 08:21:33 -0300 |
commit | 3e87153251d9a117182decbe57dd7d9d2a47c2b3 (patch) | |
tree | 3423b788b470fbfea88b89b21ffe015b890f66d2 /gdb/mem-break.c | |
parent | ec48dc8bd4d90fa5c1b7cb4088fbc60a33344688 (diff) | |
download | gdb-3e87153251d9a117182decbe57dd7d9d2a47c2b3.zip gdb-3e87153251d9a117182decbe57dd7d9d2a47c2b3.tar.gz gdb-3e87153251d9a117182decbe57dd7d9d2a47c2b3.tar.bz2 |
MIPS bit field failures in gdb.base/store.exp
On MIPS64 little endian, attempting an assignment to a bit field
that lives in a register yields the wrong result. It just corrupts
the data in the register depending on the specific position of the
bit field inside the structure.
FAIL: gdb.base/store.exp: f_1.j
FAIL: gdb.base/store.exp: f_1.k
FAIL: gdb.base/store.exp: F_1.i
FAIL: gdb.base/store.exp: F_1.j
FAIL: gdb.base/store.exp: F_1.k
FAIL: gdb.base/store.exp: f_2.j
FAIL: gdb.base/store.exp: f_2.k
FAIL: gdb.base/store.exp: F_2.i
FAIL: gdb.base/store.exp: F_2.j
FAIL: gdb.base/store.exp: F_2.k
FAIL: gdb.base/store.exp: f_3.j
FAIL: gdb.base/store.exp: f_3.k
FAIL: gdb.base/store.exp: F_3.i
FAIL: gdb.base/store.exp: F_3.j
FAIL: gdb.base/store.exp: F_3.k
FAIL: gdb.base/store.exp: f_4.j
FAIL: gdb.base/store.exp: f_4.k
FAIL: gdb.base/store.exp: F_4.i
FAIL: gdb.base/store.exp: F_4.j
FAIL: gdb.base/store.exp: F_4.k
=== gdb Summary ===
Now, GDB knows how to do bit field assignment properly, but MIPS is
one of those architectures that uses a hook for the register-to-value
conversion. Although we can properly tell when the type being passed
is a structure or union, we cannot tell when it is a bit field,
because the bit field data lives in a value structure. Such data
only lives in a "type" structure when the parent structure is being
referenced, thus you can collect them from the flds_bnds members.
A bit field type structure looks pretty much the same as any other
primitive type like int or char, so we can't distinguish them.
Forcing more fields into the type structure wouldn't help much,
because the type structs are shared.
2014-10-03 Luis Machado <lgustavo@codesourcery.com>
* valops.c (value_assign): Check for bit field assignments
before calling architecture-specific register value
conversion functions.
Diffstat (limited to 'gdb/mem-break.c')
0 files changed, 0 insertions, 0 deletions