From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13128 invoked by alias); 19 Dec 2006 07:44:36 -0000 Received: (qmail 13119 invoked by uid 22791); 19 Dec 2006 07:44:34 -0000 X-Spam-Check-By: sourceware.org Received: from lon-del-01.spheriq.net (HELO lon-del-01.spheriq.net) (195.46.50.97) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Dec 2006 07:44:20 +0000 Received: from lon-out-03.spheriq.net ([195.46.50.131]) by lon-del-01.spheriq.net with ESMTP id kBJ7iFRZ004527 for ; Tue, 19 Dec 2006 07:44:15 GMT Received: from lon-cus-01.spheriq.net (lon-cus-01.spheriq.net [195.46.50.37]) by lon-out-03.spheriq.net with ESMTP id kBJ7iELY013404 for ; Tue, 19 Dec 2006 07:44:14 GMT Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by lon-cus-01.spheriq.net with ESMTP id kBJ7iAeZ004746 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=OK); Tue, 19 Dec 2006 07:44:11 GMT Received: from zeta.dmz-eu.st.com (ns2.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 81417DA43; Tue, 19 Dec 2006 07:44:04 +0000 (GMT) Received: from mail1.cro.st.com (mail1.cro.st.com [164.129.40.131]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 416E54725D; Tue, 19 Dec 2006 07:44:04 +0000 (GMT) Received: from [10.18.180.51] (crx3051.cro.st.com [10.18.180.51]) by mail1.cro.st.com (MOS 3.5.8-GR) with ESMTP id CJG28334 (AUTH "frederic riss"); Tue, 19 Dec 2006 08:44:03 +0100 (CET) Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)? From: Frederic RISS To: Nikolay.Molchanov@Sun.COM Cc: gdb@sourceware.org In-Reply-To: <45877ECA.9090207@sun.com> References: <45877ECA.9090207@sun.com> Content-Type: text/plain Date: Tue, 19 Dec 2006 07:44:00 -0000 Message-Id: <1166514242.10545.65.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.8.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact gdb-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-owner@sourceware.org X-SW-Source: 2006-12/txt/msg00173.txt.bz2 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