This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Correction of complex number display for fortran program
- To: gdb-patches at sourceware dot cygnus dot com
- Subject: Re: Correction of complex number display for fortran program
- From: David Taylor <taylor at cygnus dot com>
- Date: Wed, 24 May 2000 10:40:53 -0400
FYI -- this has been committed.
David
p.s. all email that I send to Gregory Lielens bounces.
Date: Tue, 23 May 2000 11:42:04 -0400
From: David Taylor <taylor@cygnus.com>
Date: Tue, 23 May 2000 13:41:55 +0200
From: Gregory Lielens <Gregory.Lielens@fft.be>
Hi,
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
change!
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
much...
You did great. Thanks.
Here is the Changelog
Tue May 23 13:20:00 1999 Gregory Lielens <info@fft.be>
* 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);
break;
Hope this help, and congratulation for the 5.0 release: it seems at lot
more stable when interacting whith DDD
Approved.
Greg.