+2019-12-04 Tom Tromey <tromey@adacore.com>
+
+ * gdb.base/endianity.c (struct other) <x>: New field.
+ (main): Initialize it.
+ * gdb.base/endianity.exp: Update.
+
2019-12-04 Tom Tromey <tromey@adacore.com>
* gdb.ada/scalar_storage/storage.adb: New file.
{
int v;
short w;
+ unsigned x : 3;
float f;
__complex__ float cplx;
double d;
int
main (void)
{
- struct otherendian o = {3, 2, 23.5, 1.25 + 7.25i, 75};
+ struct otherendian o = {3, 2, 7, 23.5, 1.25 + 7.25i, 75};
do_nothing (&o); /* START */
}
return -1
}
-gdb_test "print o" "= {v = 3, w = 2, f = 23.5, cplx = 1.25 \\+ 7.25 \\* I, d = 75}" \
+gdb_test "print o" "= {v = 3, w = 2, x = 7, f = 23.5, cplx = 1.25 \\+ 7.25 \\* I, d = 75}" \
"print o before assignment"
gdb_test "print o.v = 4" "= 4"
gdb_test "print o.w = 3" "= 3"
+gdb_test "print o.x = 2" "= 2"
gdb_test "print o.f = 1.5" "= 1.5"
gdb_test "print o.d = -23.125" "= -23.125"
gdb_test "x/x &o.v" "0x04000000"
gdb_test "x/xh &o.w" "0x0300"
-gdb_test "print o" "= {v = 4, w = 3, f = 1.5, cplx = 1.25 \\+ 7.25 \\* I, d = -23.125}" \
+gdb_test "print o" "= {v = 4, w = 3, x = 2, f = 1.5, cplx = 1.25 \\+ 7.25 \\* I, d = -23.125}" \
"print o after assignment"