🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.gcc.help
Article #53691

gdb and gcc

#53691
From: rkc
Date: Sun, 04 Aug 1991 19:25
28 lines
1420 bytes
Using gcc compiled code in gdb.  This should probably be posted to
gnu.gdb, but our network poster wouldn't cooperate.

GDB 3.5
GCC 1.37.1
Sun 4 (sparcstation 1+)
SunOS 4.1

When I call a library function from the command line that returns a
double, gdb often assumes the function is returning an int, and it
prints out the result as if an int was returned.  Is there any way to
force this value to be printed out as a double?  I'd love an automatic
interpretation, but if I could force it myself, that would be fine.

Expicit example:
...(loading up some program that can call anint)...
(gdb) p anint(1.0)
$1 = 1072693248

Anint is supposed to be returning a double; it is defined in math.h

		Thanks for any help, 
		  -Rob

rkc@xn.ll.mit.edu
-- 
This is "root-toot-toot" ---
		 best pay attention
Technical Details
Message-ID: <1991Aug7.171132.25498@vicom.com>
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!uwm.edu!rpi!usc!elroy.jpl.nasa.gov!ames!vsi1!ames!xn.ll.mit.edu!rkc

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 11318c,7b58a839e8ff956d
X-Google-Attributes: gid11318c,public
X-Google-ArrivalTime: 1991-08-08 05:12:25 PST
Path: arc1-ca.pugleaf.net!gmdzi!unido!fauern!ira.uka.de!sol.ctr.columbia.edu!caen!uwm.edu!rpi!usc!elroy.jpl.nasa.gov!ames!vsi1!ames!xn.ll.mit.edu!rkc
From: rkc@xn.ll.mit.edu
Newsgroups: gnu.gcc.help
Subject: gdb and gcc
Message-ID: <1991Aug7.171132.25498@vicom.com>
Date: 4 Aug 91 19:25:23 GMT
Sender: wyman@vicom.com (Wyman Chong)
Organization: MIT Lincoln Laboratory
Lines: 28
Old-Message-Id: <1991Aug4.192523.2333@xn.ll.mit.edu>