Mirror of the gdb mailing list
 help / color / mirror / Atom feed
From: Frederic RISS <frederic.riss@st.com>
To: Nikolay.Molchanov@Sun.COM
Cc: gdb@sourceware.org
Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)?
Date: Tue, 19 Dec 2006 07:44:00 -0000	[thread overview]
Message-ID: <1166514242.10545.65.camel@localhost.localdomain> (raw)
In-Reply-To: <45877ECA.9090207@sun.com>

Hi,

On Mon, 2006-12-18 at 21:55 -0800, Nikolay Molchanov wrote:
> But if I ask "gdb" to evaluate sin(3.14) I get "1"
> (which is not correct), and if I ask to evaluate
> sin(4.1) or sin(5.1) I get "3" (?!).

I guess your system libraries aren't built with debuginfo.  This means
that GDB won't know the sin function's prototype and it will interpret
the result as an int.  There might also be other issues with passing
doubles to un-prototyped functions, but the previous point is sufficient
to explain your issue.

Fred


  reply	other threads:[~2006-12-19  7:44 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-19  5:55 Nikolay Molchanov
2006-12-19  7:44 ` Frederic RISS [this message]
2006-12-19  8:28 ` Nick Roberts
2006-12-19 16:32   ` Daniel Jacobowitz
2006-12-19 20:14     ` Nick Roberts
2006-12-20  2:42       ` Daniel Jacobowitz
2006-12-19 17:02   ` Nikolay Molchanov

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=1166514242.10545.65.camel@localhost.localdomain \
    --to=frederic.riss@st.com \
    --cc=Nikolay.Molchanov@Sun.COM \
    --cc=gdb@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