Path: utzoo!attcan!uunet!van-bc!ubc-cs!alberta!alberta!simon From: simon@alberta.uucp (Simon Tortike) Newsgroups: comp.lang.fortran Subject: dbx, fortran, and vectors: Summary of responses Message-ID: <1990Apr7.201318.28859@cs.UAlberta.CA> Date: 7 Apr 90 20:13:18 GMT Sender: news@cs.UAlberta.CA (News Administrator) Reply-To: simon@alberta.UUCP (Simon Tortike) Organization: Petroleum Engg, U of Alberta Lines: 58 I recently posted a request for help on printing a specified range of elements from a vector or array in the dbx debugger, on a Sun 3/160 with SunOS (Unix) 4.0.3. I received lots of responses: thanks to the following people From: myrias!uunet!ukc.ac.uk!trh From: rfinch@water.ca.gov From: andy@jay.unspecified From: khb@Sun.COM From: Larry Weissman 5-2011 From: Scott Lamson The responses fell into three categories. a) Use the syntax displaying the contents of memory from a certain location for a given length in a desired mode, e.g., rfinch@water.ca.com suggested &a[3] / 7 f which means print the 7 values starting at the symbolic address of a[3], in floating point format (dbx(1) p. 131). b) Write a routine to print out the desired elements, and incorporate it in the code to be debugged. One needs a separate routine for each type (real, integer, etc.). This routine can then be called from within dbx. The only drawback is when the output is being redirected to a file, one will not get to see the values immediately. c) The third option is to dump dbx and use another debugger. uunet!ukc.ac.uk!trh sent me information on the UPS debugger, part of The Kent Software Tools. I quote from the brochure: + Graphical Debugging UPS is a graphical debugger for C and FORTRAN programs. It is both a post-mortem and a run-time debugger. UPS needs no typed commands; all interaction is by pointing to and/or editing fields on the screen, or selecting menu options. For example, to display the value of a variable the user simply points to its name within the source code listing. UPS can display all FORTRAN and C data types, including structures, enums, multidimensional arrays, pointers, etc. Structure variables can be expanded to show their contents, pointers can be followed, all at the _________________________ - UNIX is a trademark of AT&T Bell Laboratories in the USA and other countries. The graphical debugger (ups) is available under both X and suntools on Sun3 and Sun386 and under X on Vax Stations. *********************************************************************** Thanks for all the replies. ------------------- W. Simon Tortike, | tel : 403/492-3338 Dept of Mining, Metallurgical | fax : 403/492-7219 and Petroleum Engineering, | CDNnet : simon@cs.UAlberta.CA University of Alberta, | uucp : simon@alberta.uucp Edmonton, AB, CANADA T6G 2G6. |