home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!cs.utexas.edu!torn!skule.ecf!drill.me!steinman
- From: steinman@me.utoronto.ca (David Steinman)
- Subject: Re: dbx headache
- Message-ID: <C1BI9E.6ot@me.utoronto.ca>
- Sender: news@me.utoronto.ca (News Reader)
- Organization: UofT Mechanical Engineering
- References: <93021.234529MATOVICM@QUCDN.QueensU.CA> <1993Jan22.135940.9828@msdrl.com> <1993Jan22.171934.15193@midway.uchicago.edu>
- Date: Sat, 23 Jan 1993 17:36:49 GMT
- Lines: 70
-
- jfu2@kimbark.uchicago.edu (Carlo Graziani) writes:
-
- >In article <1993Jan22.135940.9828@msdrl.com> ball@msdrl.com (Richard Ball) writes:
- >>MATOVICM@QUCDN.QueensU.CA () writes:
- >>: I'm fed up with dbx (SGI, IRIX 3.3.2, IRIX 4.0.1) when debugging fortran
- >>: programs. Examining arrays is pain in a neck unless you deal with the
- >>: size a(3,3) or similar. Is there any way to say e.g.
- >>: print a from 155 to 175 (and possibly to specify the increment).
- >>: Or, is there any other UNIX (public domain) debugger that can handle
- >>: arrays frinedly?
- >>
- >>your dbx should let you do
- >>&a(155)/20f
- >>to print the 20 elements of a in floating point format starting at element
- >>155. It's not the most friendly way but it is better than listing the whole
- >>thing.
-
- >Yeah, but sadly this only allows contiguously stored array elements to
- >be displayed. It would be nice to be able to display _logically_ contiguous
- >elements, even when they are not stored contiguously i.e. "print A(1,7-15)",
- >or some such syntax.
-
- As if by magic, something called "Duel" has been posted in alt.sources. I
- claims to be a high-level debugging language which does exactly what you
- require. The caveat is that is will currently only work with gdb (Gnu
- debugger?), but can be implemented with dbx, etc.
-
- Here's the intro from the post...
- --
- Dave!
-
- -----------------------------------------------------------------------------
- DUEL - A high level language for debugging C programs.
- -----------------------------------------------------------------------------
- Duel is a special purpose language designed for concise state
- exploration of debugged C programs under existing debuggers.
- It allows you to explore your program's state better than either
- the debugger's commands, a C interpreter, or print statements
- added to your programs. The debugger is extended with the new
- 'dl' command for Duel expressions:
- gdb> dl x[1..10] >? 5
- x[3] = 14
- x[8] = 6
- prints the array elements x[1] to x[10] that are greater than 5.
- The output includes the values 14 and 6, as well as their
- symbolic representation "x[3]" and "x[8]".
-
- The output includes the values 14 and 6, as well as their
- symbolic representation "x[3]" and "x[8]".
- Duel is debugger-independent, but the current distribution interface only
- with gdb. You will need the source for gdb-4.6, or 4.7. Duel is public
- domain code. Do whatever you like with it - add it to commercial debuggers,
-
- to dbx/sdb or even make it part of the GNU project.
- No part of this distribution contains any copyright or derived code,
- (i.e. no GPL code, either). Free and public domain code need no disclaimer,
-
- which is obvious to anyone in the software business.
- Even if you don't normally use debuggers, but you are programming in C,
- give
- Duel a try! The man page & help even include summary of useful gdb
- commands.
- Duel is available for anonymous ftp from ftp.cs.princeton.edu, in
- /duel/duel.tar.Z. "tar.Z" format means you should use the command
- "zcat duel.tar.Z | tar xf -" to unpack the files.
- The Usenix Jan/93 paper about Duel is also available as tech report 399,
- in /reports/1992/399.ps.Z on ftp.cs.princeton.edu
- DUEL is "Debugging U (might) Even Like" or "Don't Use this Exotic Language"
- you should judge which is better!
-
-