This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
- From: "Ulrich Weigand" <uweigand at de dot ibm dot com>
- To: drow at false dot org (Daniel Jacobowitz)
- Cc: gdb-patches at sourceware dot org
- Date: Wed, 22 Nov 2006 21:43:06 +0100 (CET)
- Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
Daniel Jacobowitz wrote:
> I'm not sure how you are using "bitfield type" here; could you post an
> example? i.e. do you mean:
>
> int x:7;
>
> or
>
> struct { int x:7; int y:25; } z;
The latter; sorry for being vague. The problem manifests in store.exp's
check_field test cases:
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_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.i
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.i
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.i
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
struct f_1 {unsigned i:1;unsigned j:1;unsigned k:1; } f_1 = {1,1,1}, F_1;
struct f_1
wack_field_1 (void)
{
register struct f_1 u = f_1;
return u;
}
tbreak wack_field_1
Breakpoint 26 at 0xdd0: file /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.base/store.c, line 227.
(gdb) PASS: gdb.base/store.exp: tbreak wack_field_1
continue
Continuing.
wack_field_1 () at /home/uweigand/fsf/gdb-head/gdb/testsuite/gdb.base/store.c:227
227 register struct f_1 u = f_1;
(gdb) PASS: gdb.base/store.exp: continue field 1
next
229 }
(gdb) PASS: gdb.base/store.exp: next field 1
print u
$73 = {i = 1, j = 1, k = 1}
(gdb) PASS: gdb.base/store.exp: old field 1
set variable u = F_1
(gdb) PASS: gdb.base/store.exp: set variable u = F_1
print u
$74 = {i = 0, j = 0, k = 0}
(gdb) PASS: gdb.base/store.exp: new field 1
set variable u = F_1, u.i = f_1.i
(gdb) PASS: gdb.base/store.exp: set variable u = F_1, u.i = f_1.i
print u
$75 = {i = 0, j = 0, k = 0}
(gdb) FAIL: gdb.base/store.exp: f_1.i
> I'm wondering if you're describing the latter case, in which case the
> problem is that we're calling value_to_register on only part of the
> value we want in the register.
Yes, that's what I was thinking.
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com