From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15381 invoked by alias); 19 Dec 2006 16:32:43 -0000 Received: (qmail 15373 invoked by uid 22791); 19 Dec 2006 16:32:42 -0000 X-Spam-Check-By: sourceware.org Received: from nevyn.them.org (HELO nevyn.them.org) (66.93.172.17) by sourceware.org (qpsmtpd/0.31.1) with ESMTP; Tue, 19 Dec 2006 16:32:35 +0000 Received: from drow by nevyn.them.org with local (Exim 4.63) (envelope-from ) id 1GwhtB-0007TD-2i; Tue, 19 Dec 2006 11:32:25 -0500 Date: Tue, 19 Dec 2006 16:32:00 -0000 From: Daniel Jacobowitz To: Nick Roberts Cc: Nikolay.Molchanov@Sun.COM, gdb@sourceware.org Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)? Message-ID: <20061219163224.GA28686@nevyn.them.org> Mail-Followup-To: Nick Roberts , Nikolay.Molchanov@Sun.COM, gdb@sourceware.org References: <45877ECA.9090207@sun.com> <17799.41335.712243.659292@kahikatea.snap.net.nz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <17799.41335.712243.659292@kahikatea.snap.net.nz> User-Agent: Mutt/1.5.13 (2006-08-11) 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/msg00175.txt.bz2 On Tue, Dec 19, 2006 at 09:23:19PM +1300, Nick Roberts wrote: > > -data-evaluate-expression sin(5.1) > > ^done,value="3" > > (gdb) > > > > > > Can I use "-data-evaluate-expression" to evaluate > > sin(x) function? If yes, why it returns a wrong > > "int" value? > > By default (without debuginfo as Frederic says) it assumes sin takes an > integer argument and returns an value (I think). What does "ptype sin" say? I'd have expected GDB to pick up the type from the debug info in that example. -- Daniel Jacobowitz CodeSourcery