Correction of complex number display for fortran program
Wed May 24 07:41:00 GMT 2000
FYI -- this has been committed.
p.s. all email that I send to Gregory Lielens bounces.
Date: Tue, 23 May 2000 11:42:04 -0400
From: David Taylor <email@example.com>
Date: Tue, 23 May 2000 13:41:55 +0200
From: Gregory Lielens <Gregory.Lielens@fft.be>
I 've just dowloaded GDB 5.0 and use it to debug a fortran subroutine.
I've noted that value of complex variables or arrays are incorrectly
outputed by the print command, and also within the DDD frontend.
When inspecting a complex variable V, the value printed is
(Real(V),Real(V)) instead of (Real(V),Imag(V)). This behavior was
already present in the previous version of gdb, but this time I think
I've corrected it and send you the (very) small patch - one line to
I'll try to follow the guidelines for this, but it's the first time I
contribute and English is not my native language, so don't expect too
You did great. Thanks.
Here is the Changelog
Tue May 23 13:20:00 1999 Gregory Lielens <firstname.lastname@example.org>
* f-valprint.c : Corrected f_val_print function for TYPE_CODE
(type) = TYPE_CODE_COMPLEX
and the diff
diff -up f-valprint.c.old f-valprint.c
--- f-valprint.c.old Tue May 23 13:34:51 2000
+++ f-valprint.c Tue May 23 13:34:25 2000
@@ -564,7 +564,7 @@ f_val_print (type, valaddr, embedded_off
fputs_filtered ("(", stream);
print_floating (valaddr, type, stream);
fputs_filtered (",", stream);
- print_floating (valaddr, type, stream);
+ print_floating (valaddr+TYPE_LENGTH(type), type, stream);
fputs_filtered (")", stream);
Hope this help, and congratulation for the 5.0 release: it seems at lot
more stable when interacting whith DDD
More information about the Gdb-patches