ddd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

DDD and Forttran: displaying arrays


From: jxx
Subject: DDD and Forttran: displaying arrays
Date: Tue, 13 May 2003 01:34:11 -0500

Hi,

I've just starting using dbx/ddd (my first time using a debugger) with my 
fortran 90 code. I'm compiling my code on a Sun Blade 2000 running Solaris 8, 
and the compiler is (according to the man page) Sun Workshop 6 update 2 Fortran 
95. I'm running dbx/ddd remotely from my Linux7.x/AMD machine through ssh.

First, I should mention that I cannot get gdb to recognize my code. Instead, I 
can only get dbx to work. When I run gdb or gdb/ddd, I get the error message 
"no debugging symbols". Yes, I have compiled with the -g flag. The -g flag 
works with dbx, not gdb. Apparently the compiler is not preparing the 
executable properly so that gdb can recognize it. How can I remedy this? Is 
there some flag that will allow gdb to recognize the executable (the man page 
says -g should do the trick, but it obviously doesn't).

Anyway, my real problem is with arrays. Once I get ddd running with dbx, I 
cannot get arrays to "display' their values. Now, if I use the "print" command, 
it spits out the proper values in the dbx console window. But the real power of 
ddd, as you all know, is getting the arrays to display in the data window so I 
can see them and plot them. But I cannot get the "display" command (from the 
pop-up window that appears when you right click on the variable) to work with 
any of my 2-D arrays. Instead, ddd pops up a little window that says "Creating 
display", but it takes *forever* (say 10 minutes) to dispaly a 20x20 array, 
with ddd being frozen the whole time this is happening. Meanwhile, back at the 
Unix prompt from where I am running ddd, it is spitting out a bunch of garbage 
like:

 | fill(0, 0)) , (fill(0, 0) | ("0.0" & vfix(fill(0, 0)))  | fill(0, 0)) , 
(fill(0, 0) | (fontfix("[...]") & vfix(fill(0, 0)))  | fill(0, 0)) , (fill(0, 
0) | ("0.0" & vfix(fill(0, 0)))  | fill(0, 0)) , (fill(0, 0) | 
(fontfix("[...]") & vfix(fill(0, 0)))  | fill(0, 0)) , (fill(0, 0) | ("0.0" & 
vfix(fill(0, 0)))  | fill(0, 0)) )

And, after the 10 minutes or so, the "Creating display" window finally 
disappears, but in the data window there is nothing. I can get vectors (1-D 
arrays) to display in the data window, but not 2-D arrays. Anybody know what's 
going on and how I can see the values of my 2-D arrays?

I should mention that by typing "graph display u(1:10,1:10)", for example, 
where u is a 10x10 array, I can sometimes (not sure why it works sometimes and 
not others) get those values to display in the data window, but they are in 
display as one continuos row instead of a table format. Further, when I try to 
plot them (using the default gunplot), I just got a plot with a bunch of 
horizontal lines, and the y-axes goes from 0 to 19 and the x-axis goes from 1 
to 2 (seems like the x- and y-axis should be flipped from what they are). And 
even vectors, which I can get to display, do the same thing when I try to plot 
them. I'm really confused.

Any help getting ddd to display and plot my 2-D arrays would be much 
appreciated.

Thanks in advance.

jd
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]