gdb
I have a C program which uses the math library (gcc ... -lm), and I can
run ddd on it fine, EXCEPT that inorder to debug, I would like to
evaluate expressions which contain math functions (like exp, log, etc.)
and there is the problem; gdb refuses to properly evaluate math functions:
(gdb) print exp(12.234)
$21 = 1
What magic is required in order that gdb will evaluate math expressions?
NOTE: I do not want to step through the math functions, I just want gdb
to print their correct value!!!
|