[gnu.gdb.bug] gdb and printing values of function calls

eric@eddie.MIT.EDU (Eric Van Tassell) (07/26/89)

Ok folks , what am I doing wrong here with GDB 3.2 on Sun 3/60 with SunOS 3.5?

(gdb) p dp(format)
$1 = -2147483648
(gdb) p dp(dpy)
$2 = -2147483648
(gdb) p sin(0)
$3 = -2147483648
(gdb) p cos(0.0)
$4 = -2147483648
(gdb) p fopen("booger","r")
$5 = -2147483648
(gdb)


        - dp is my own Debug Print routine
        - format and dpy are two very different variables
             (a symbol and XDisplay)
        - sin, cos, fopen all produce the same result
        - under dbx p sin(0) => 0 (which is what we expect)
        - under dbx p dp(format) => "XY-PIXMAP"
        ? Why does every attempt result in the same value being returned?


Does anybody have a clue as to why I cant seem to print the value resulting
from calling a function.re? Failing a fix could someone give
me a few ideas. TIA!

eric
-- 
Eric Van Tassell(dlcdev!eric@eddie.mit.edu)
Progress Software Corp.
22B Cotton Rd.
Nashua, NH 03063 {603-882-2488}