From: David Relson <relson@osagesoftware.com>
To: Kevin Buettner <kevinb@redhat.com>
Cc: gdb@sources.redhat.com
Subject: Re: Problem with threaded program
Date: Thu, 06 Dec 2001 16:37:00 -0000 [thread overview]
Message-ID: <4.3.2.7.2.20011206193552.00bae3f0@mail.osagesoftware.com> (raw)
In-Reply-To: <1011207000357.ZM8745@ocotillo.lan>
Kevin
Way to go fella! I patched my gdb-5.1 source code, rebuilt, tested, and
got the right result!
I've forwarded the news to Emmanuel Blindauer who discovered the
problem. I'm sure he'll be pleased.
David
At 07:03 PM 12/6/01, Kevin Buettner wrote:
>On Dec 2, 11:44am, David Relson wrote:
>
> > Here's the test program, test.c:
> >
> > #include <stdlib.h>
> > int main() {
> > char *t="1.0";
> > double d=0;
> > d=strtod(t,(char **)NULL);
> > printf( "%f\n", d );
> > return 0;
> > }
> >
> > Build using "gcc -g -lpthread test.c"; run using "gdb a.out".
> >
> > If you step through the program one line at a time and display variable d
> > after each assignment, the strtod() call seems to return
> > "nan(0x8000000000000)", which is also shown by print().
> >
> > If you restart the program with a breakpoint at printf(), let it run, and
> > display d at the breakpoint, the value shown is "1.000000" which is
> correct.
> >
> > Is this a defect in gdb, or is my analysis wrong?
>
>It's a defect in gdb.
>
>I've just posted a patch which fixes this bug. See
>
> http://sources.redhat.com/ml/gdb-patches/2001-12/msg00183.html
>
>It hasn't been approved yet, but once it has, I'll push for getting
>it into 5.1.1 too.
>
>Thanks,
>
>Kevin
prev parent reply other threads:[~2001-12-07 0:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <David Relson <relson@osagesoftware.com>
2001-12-02 8:44 ` David Relson
2001-12-02 10:41 ` Andrew Cagney
2001-12-02 15:48 ` Daniel Jacobowitz
2001-12-02 17:24 ` David Relson
2001-12-02 21:28 ` Andrew Cagney
2001-12-03 4:14 ` David Relson
2001-12-03 7:49 ` Trond Eivind Glomsrød
2001-12-06 16:04 ` Kevin Buettner
2001-12-06 16:37 ` David Relson [this message]
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=4.3.2.7.2.20011206193552.00bae3f0@mail.osagesoftware.com \
--to=relson@osagesoftware.com \
--cc=gdb@sources.redhat.com \
--cc=kevinb@redhat.com \
/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