This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
aarch64 gdb failures in testsuite
- From: Steve Ellcey <sellcey at cavium dot com>
- To: gdb at sourceware dot org
- Date: Tue, 25 Jul 2017 10:16:44 -0700
- Subject: aarch64 gdb failures in testsuite
- Authentication-results: sourceware.org; auth=none
- Reply-to: sellcey at cavium dot com
I am getting some aarch64 gdb failures that do not seem to be showing up
in other peoples test runs from the gdb-testers mailing list and I was
wondering if anyone could help me figure out why these tests are failing
for me.
As an example, here is gdb.base/store.exp. In my test case I am
getting this failuire:
Temporary breakpoint 9, wack_doublest (u=-1, v=-2) at /home/sellcey/gdb-std/src/binutils-gdb/gdb/testsuite/gdb.base/store.c:125
125 register doublest l = u, r = v;
(gdb) next
126 l = add_doublest (l, r);
(gdb) PASS: gdb.base/store.exp: continue to wack_doublest
print l
$29 = -1
(gdb) PASS: gdb.base/store.exp: var doublest l; print old l, expecting -1
print r
$30 = <optimized out>
(gdb) FAIL: gdb.base/store.exp: var doublest l; print old r, expecting -2
set variable l = 4
But when I look at https://sourceware.org/ml/gdb-testers/2017-q3/msg01016.html
and look at the gdb.log file I see it passes there:
Temporary breakpoint 9, wack_doublest (u=-1, v=-2) at /home/qiyao/buildbot/ubuntu-aarch64-m64/build/gdb/testsuite/../../../binutils-gdb/gdb/testsuite/gdb.base/store.c:125
125 register doublest l = u, r = v;
(gdb) next
126 l = add_doublest (l, r);
(gdb) PASS: gdb.base/store.exp: continue to wack_doublest
print l
$29 = -1
(gdb) PASS: gdb.base/store.exp: var doublest l; print old l, expecting -1
print r
$30 = -2
(gdb) PASS: gdb.base/store.exp: var doublest l; print old r, expecting -2
set variable l = 4
In looking for differences in the runs I see the passing test uses GCC 4.8.4
and I am using GCC 5.4.0 (Ubuntu 16.04). I don't think that should make
a difference but maybe it does.
I looked at the compiler options since for something to be <optimized out>
I assume we would have to be compiling with some optimization option but
both compilers are just using -g.
spawn -ignore SIGHUP gcc /home/sellcey/gdb-std/obj/binutils-gdb/gdb/testsuite/outputs/gdb.base/store/store0.o -g -lm -o /home/sellcey/gdb-std/obj/binutils-gdb/gdb/testsuite/outputs/gdb.base/store/store
I compiled the test case (gdb/testsuite/gdb.base/store.c) with -g using
the system GCC (5.4.0) and then ran the system GDB on it to see what
happened there and I get the same <optimized out> message there that I
do with the latest GDB sources.
% gcc -g store.c -o x
% gdb x
(gdb) b wack_doublest
Breakpoint 1 at 0x4008cc: file store.c, line 125.
(gdb) r
Starting program: /home/sellcey/gdb-std/x
Breakpoint 1, wack_doublest (u=-1, v=-2) at store.c:125
125 register doublest l = u, r = v;
(gdb) n
126 l = add_doublest (l, r);
(gdb) print l
$1 = -1
(gdb) print r
$2 = <optimized out>
Any ideas on what is happening here? Does anyone else get this failure?
Steve Ellcey
sellcey@cavium.com