Personal tools
You are here: Home cm Wiki 'DDD'
Views

'DDD'

last edited 3 years ago by taustin

To start off, DDD is something that we have been using on our linux boxes. I personally didn't really play around with the command line options for DDD, but I am starting to do so now. DDD is just a graphical user interface for a debugger that you choose to use. By default, GDB is used on linux. GDB has bugs that does not allow us to view arrays properly. These bugs are specifically to do with fortran code and GDB.'

So, I have started debugging with ddd --dbx Ok, first problem....why don't I have the kill button active? I would like to kill a program, but I can't do it without just shutting ddd down!

Tried to look up a variable in NONLIN.f - It can't display NOPM correctly. Error message: VSL interpreter failed. rednil.vsl failed: no such file or directory.

DDD has been updated to the latest version on hpc - see Andrew Cantell's comments below.

So, I have used ddd with dbx with the latest version....ddd and dbx have started to communicate. Thanks Andrew. Just tried to debug NONLIN.f and ZERE50.f again. NOPM is being displayed without errors.

dbx and Fortran Dummy Variables

It has been reported that dbx has trouble viewing arrays but it appears that it is actually trouble viewing Fortran dummy variables, but there is a work-around for this below. Local array variables appear to be fine.

We compile our Fortran code with the -qextname option which adds underscore to the ends of subprogram names. This means that the symbol-names are more unix-like but less aix-like. dbx thinks it can handle this and removes the underscores, but then seems to lose the symbol definitions. Trying to access dummy variables of Fortran subprograms (e.g. NRLIST in NONLIN) gives messages like:

  [internal error: nil paramlist for function containing nrlist]

The work-around is to use the -x option on dbx. This prevents dbx from stripping the trailing underscores so you'll have to remember that some symbols have trailing underscores. e.g. to set a break point in the Fortran subroutine NONLIN, use the command:

  stop in nonlin_

/hpc/cmiss/bin/rs6000-aix/dbx has been set up to include the -x option automatically, so if you have /hpc/cmiss/bin/rs6000-aix before /usr/bin in you PATH, then you don't need to do anything.

If /usr/bin/dbx is first in your PATH, then to tell ddd to add the -x option, it can be run as:

  ddd --dbx --debugger 'dbx -x' <executable-name>


comments:

... --cantell, Tue, 28 Jun 2005 12:38:31 +1200 reply
The default ddd /usr/bin/ddd is very old, version 3.3.1. Unfortunately newer versions, 3.3.10 and 3.3.11 have problems working under AIX. Have compiled the latest release, 3.3.11, the problem seems to be when it tries to connect to the dbx or gdb process. Looking into it further.

... --cantell, Mon, 04 Jul 2005 21:23:58 +1200 reply
New version of ddd, 3.3.11 in /usr/local/bin/ddd seems to work now. Needed to compile with gcc/g++ instead of xlc/xlC and use the xpm library.

... --cheng, Tue, 12 Jul 2005 16:47:59 +1200 reply
the dbx crashes fairly often, slow and unreliable. Arrays cannot be viewed as they should be able to be.

... --taustin, Fri, 15 Jul 2005 10:48:14 +1200 reply
After searching a bit on Google groups, the problem with ddd/dbx not being able to view large arrays may be to do with a stack limit. I think (maybe) that ddd loads arrays into the stack when reading them. Any thoughts?