Mail Archives: djgpp/2002/09/24/00:43:36
On Mon, 23 Sep 2002, Dr. Pablo A. Perez-Fernandez wrote:
> Below follows a short transcript of a session. Note how the printf prints
> the right value and "p EBIT" screws up in GDB. Any ideas as to why this is
> happening.
Most probably because you compiled the program with -g, which in GCC 3.1
gets you COFF debugging info IIRC. Try "ptype EBIT" and see what it
prints. If it doesn't say "long double", that's your problem.
The reason for the failure is that some debug info formats don't support
the long double type. So GDB cannot format the variable's value
correctly when you ask it to print it.
Compiling with "-gstabs+" or with "-gdwarf-2 -g3" instead of "-g" should
fix the problem.
- Raw text -