[gdb/testsuite] Fix gdb.base/watchpoint-adjacent.exp with m32
PR testsuite/33727 reports the following failure with test-case
gdb.base/watchpoint-adjacent.exp and i686-linux (or, x86_64-linux and target
board unix/-m32):
...
(gdb) continue^M
Continuing.^M
watchpoint-adjacent-type_ll: watchpoint-adjacent.c:63: main: \
Assertion `(((uintptr_t) &obj.a) & 0x7) == 0' failed.^M
^M
Program received signal SIGABRT, Aborted.^M
0xb7fc5579 in __kernel_vsyscall ()^M
(gdb) FAIL: $exp: var_type=type_ll: test= a {a b} : rwatch_first=true: \
continue to breakpoint: prepare for read test
...
The problem is that the test-case expects 8-byte aligned data as an effect of
using long long, but long long has an alignment of 4 bytes [1].
Fix this by using __attribute__((aligned(8))).
After fixing this, we find one remaining failure. This has been filed as
PR breakpoints/33762.
Tested on x86_64-linux with target boards unix/-m64 and unix/-m32.
Approved-By: Andrew Burgess <aburgess@redhat.com>
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=33727
[1] https://gcc.gnu.org/onlinedocs/gcc/x86-Options.html#index-malign-double
1 file changed