Node:Complex vars,
Next:Debugging woes,
Previous:Bool vars,
Up:Debugging
Q: I cannot display in GDB the values of my variables of type
__complex__....
A: Current versions of GDB don't support __complex__
variables. A work-around is to manually cast them to a pair of
numbers. For example, to access the real and imaginary part of a
variable foo
declared __complex__ double
, do this:
(gdb) print *(double *)&foo $1 = 4 (gdb) print *((double *)&foo + 1) $2 = 6