From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14867 invoked by alias); 19 Dec 2006 20:14:30 -0000 Received: (qmail 14859 invoked by uid 22791); 19 Dec 2006 20:14:29 -0000 X-Spam-Check-By: sourceware.org Received: from viper.snap.net.nz (HELO viper.snap.net.nz) (202.37.101.8) by sourceware.org (qpsmtpd/0.31) with ESMTP; Tue, 19 Dec 2006 20:14:16 +0000 Received: from kahikatea.snap.net.nz (p202-124-125-55.snap.net.nz [202.124.125.55]) by viper.snap.net.nz (Postfix) with ESMTP id E21493D85DA; Wed, 20 Dec 2006 09:15:44 +1300 (NZDT) Received: by kahikatea.snap.net.nz (Postfix, from userid 500) id DDFBEBE3D3; Wed, 20 Dec 2006 09:09:40 +1300 (NZDT) From: Nick Roberts MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17800.18177.281105.992978@kahikatea.snap.net.nz> Date: Tue, 19 Dec 2006 20:14:00 -0000 To: Daniel Jacobowitz Cc: Nikolay.Molchanov@Sun.COM, gdb@sourceware.org Subject: Re: Can I use -data-evaluate-expression to evaluate sin(4.1)? In-Reply-To: <20061219163224.GA28686@nevyn.them.org> References: <45877ECA.9090207@sun.com> <17799.41335.712243.659292@kahikatea.snap.net.nz> <20061219163224.GA28686@nevyn.them.org> X-Mailer: VM 7.19 under Emacs 22.0.91.19 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/msg00178.txt.bz2 > > 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? (gdb) whatis sin type = (gdb) ptype sin type = int () > I'd have expected GDB to pick up the type > from the debug info in that example. If the executable knows what kind of function sin is, then you would think that GDB should be able to infer it from the executable. ISTR this has come up before (just with "print") but that you expressed no surprise then. -- Nick http://www.inet.net.nz/~nickrob