Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: drow@false.org (Daniel Jacobowitz)
Cc: gdb-patches@sourceware.org
Subject: Re: [RFA][2/5] New port: Cell BE SPU (valops.c fix)
Date: Wed, 22 Nov 2006 20:43:00 -0000	[thread overview]
Message-ID: <200611222043.kAMKh6KO030466@d12av02.megacenter.de.ibm.com> (raw)
In-Reply-To: <20061122203002.GA14849@nevyn.them.org> from "Daniel Jacobowitz" at Nov 22, 2006 03:30:02 PM

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


  reply	other threads:[~2006-11-22 20:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-11 18:38 Ulrich Weigand
2006-11-22 14:15 ` [PING] " Ulrich Weigand
2006-11-22 14:23 ` Daniel Jacobowitz
2006-11-22 19:25   ` Jim Blandy
2006-11-22 19:28     ` Daniel Jacobowitz
2006-11-22 19:55       ` Ulrich Weigand
2006-11-22 20:30         ` Daniel Jacobowitz
2006-11-22 20:43           ` Ulrich Weigand [this message]
2006-11-22 20:57             ` Daniel Jacobowitz
2006-11-22 22:13               ` Ulrich Weigand
2006-11-22 22:48                 ` Daniel Jacobowitz
2006-11-23 13:57                   ` Ulrich Weigand
2006-11-23 16:16                     ` Daniel Jacobowitz
2006-11-23 17:55                       ` Ulrich Weigand
2006-11-23 19:59                         ` Mark Kettenis
2006-11-24  2:08                           ` Daniel Jacobowitz
2006-11-24 15:51                             ` Ulrich Weigand
2006-11-28 14:56                               ` Daniel Jacobowitz
2006-11-27 19:31                         ` Jim Blandy
2006-11-27 22:06                           ` Ulrich Weigand
2006-11-27 22:31                             ` Jim Blandy
2006-11-27 23:23                               ` Ulrich Weigand
2006-11-27 23:59                                 ` Jim Blandy
2006-11-28  0:01                                 ` Daniel Jacobowitz
2006-12-06 16:29                                   ` Ulrich Weigand
2006-12-06 16:43                                     ` Daniel Jacobowitz
2006-12-06 17:10                                       ` Ulrich Weigand
2006-12-06 17:12                                         ` Daniel Jacobowitz
2006-12-07  6:34                                           ` Vladimir Prus
2006-12-06 21:21                                     ` Jim Blandy
2006-12-06 22:02                                       ` Daniel Jacobowitz
2006-12-06 23:24                                         ` Jim Blandy
2006-12-06 23:16                                       ` Ulrich Weigand
2006-12-06 23:39                                         ` Jim Blandy
2006-12-08 15:50                                           ` Ulrich Weigand

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200611222043.kAMKh6KO030466@d12av02.megacenter.de.ibm.com \
    --to=uweigand@de.ibm.com \
    --cc=drow@false.org \
    --cc=gdb-patches@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox