This is the mail archive of the gdb-prs@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

fortran/1880: display of part of an array


>Number:         1880
>Category:       fortran
>Synopsis:       display of part of an array
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    unassigned
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Fri Feb 25 01:18:00 UTC 2005
>Closed-Date:
>Last-Modified:
>Originator:     Fred Krogh
>Release:        gdb 6.0
>Organization:
>Environment:
Gentoo 2.6.10-r-6
>Description:
This has to do with interaction between ddd and gdb.  I'm not sure where the problem is, but the ddd list does not seem very active and this list may be more appropriate anyway.  Here is what I posted there.  (And I have the same problem in gdb 6.0.)

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 someone 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.


>How-To-Repeat:
Always
>Fix:
???
>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]