From: Daniel Jacobowitz <drow@false.org>
To: Michael Snyder <msnyder@sonic.net>
Cc: gdb-patches@sourceware.org, gaius@glam.ac.uk
Subject: Re: [RFC] logic change in m2-valprint.c
Date: Sun, 01 Jul 2007 16:03:00 -0000 [thread overview]
Message-ID: <20070701160224.GH10872@caradoc.them.org> (raw)
In-Reply-To: <004a01c7bbf8$16a2ccc0$677ba8c0@sonic.net>
On Sun, Jul 01, 2007 at 08:54:19AM -0700, Michael Snyder wrote:
> > It can't be backwards; this is trying to print "1" or "1, 2" but your
> > change would make it print ", 1" and ", 12".
> >
> > I think it's also trying to shorten ranges to "{1..3, 6..7}". The
> > bug's got to be in there somewhere. Why's the code dead? I'm not
> > seeing it... element_seen can be reset by the bit clear case, and then
> > we'll get into the test you're changing again.
>
> 'Cause we're not in a loop, and it's not a static variable.
> The code is serial. At entry we set empty_set to one, and
> then we test to see if it's zero. It can't be zero.
How sure are you sure we're not in a loop? :-)
for (i = low_bound; i <= high_bound; i++)
{
bitval = value_bit_index (TYPE_FIELD_TYPE (type, field),
(TYPE_FIELD_BITPOS (type, field) /
8) +
valaddr + embedded_offset, i);
if (bitval < 0)
error (_("bit test is out of range"));
else if (bitval > 0)
{
previous_high = i;
if (! element_seen)
{
if (! empty_set)
fprintf_filtered (stream, ", ");
--
Daniel Jacobowitz
CodeSourcery
next prev parent reply other threads:[~2007-07-01 16:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 0:37 msnyder
2007-07-01 15:49 ` Daniel Jacobowitz
2007-07-01 15:54 ` Michael Snyder
2007-07-01 16:03 ` Daniel Jacobowitz [this message]
2007-07-03 0:05 ` msnyder
2007-07-03 1:12 ` Daniel Jacobowitz
2007-07-03 1:21 ` msnyder
2007-07-03 1:24 ` Daniel Jacobowitz
2007-07-03 1:40 ` msnyder
2007-07-03 7:42 ` Mark Kettenis
2007-07-03 19:26 ` Jim Blandy
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=20070701160224.GH10872@caradoc.them.org \
--to=drow@false.org \
--cc=gaius@glam.ac.uk \
--cc=gdb-patches@sourceware.org \
--cc=msnyder@sonic.net \
/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