ddd
[Top][All Lists]
Advanced

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

Printing Parts of Arrays


From: Fred Krogh
Subject: Printing Parts of Arrays
Date: Sun, 20 Feb 2005 16:07:39 -0800
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.5) Gecko/20041217

I do a fair amount of Fortran coding using g77 and find it useful to print parts of arrays. I've recently upgraded from RedHat 7.3, gdb 5.2-2, ddd3.3.1 to Gentoo 2.6.10, gdb 5.2-2, ddd 3.3.7. What used to work no longer works. I'm hoping some here can tell what needs to be changed. Here is what I have in .gdbinit (all the details as someone may find them useful if this is resolved):

#gd x          Displays contents of x
#pia x i m     Displays x(i:i+m-1), x a dummy integer array
#pda x i m     Displays x(i:i+m-1), x a dummy double precision array
#plia x m      Displays x(1:m), x a local integer array
#plda x m      Displays x(1:m), x a local double precision array
#psa x i m     Displays x(i:i+m-1), x a dummy single precision array
#plsa x m      Displays x(1:m), x a local single precision array

define gd
echo ddd: graph display $arg0\n
end
define pia
echo ddd: graph display (int)*($arg0-$arg1+1)@$arg2\n
end
define pda
echo ddd: graph display (double)*($arg0-$arg1+1)@$arg2\n
end
define plia
echo ddd: graph display (int)address@hidden
end
define plda
echo ddd: graph display (double)address@hidden
end
define psa
echo ddd: graph display (float)*($arg0-$arg1+1)@$arg2\n
end
define plsa
echo ddd: graph display (float)address@hidden
end

I'd also would have had a means to print arbitrary parts of local arrays, but that technology was beyond me. Now if I type "gd i", in the console I get "graph display i", but no i is displayed.
Many thanks for any help,
        Fred

P.S. If ddd had in place an easy to print and display arbitrary pieces of 1 and 2 dimensional arrays I suspect many besides me would find if useful. For printing, something like p a(3:5, 8:10) to print entries in rows 3 to 5 and columns 8 to 10 for example. Change the : to .., the () to [] or ..., I'm sure anyone with a use for this would be happy to adjust to any syntax. For local arrays one can now p a(3)@3, but I've not found a way to get this into the display window.





reply via email to

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