[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ddd/gdb
From: |
Tom Wurgler |
Subject: |
Re: ddd/gdb |
Date: |
Tue, 27 Jan 2004 14:23:23 -0500 (EST) |
I have done some experiments with f77/g77 gdb6.0/hp gdb (wildebeast).
Seems that f77 works best with wildebeast and g77 with gdb6.0. Wildebeast does
real and integer variables ok with g77 files, but text variables are not
displayed in English (looks like ascii numbers instead).
So the short story is I threw togeter a little script to figure out which to
use. F77 executables have a "F77" string in them and not a "g77" and g77
execuatbles have the string "g77" in them. So I grepped them and if, for
example I do a
grep -i f77 circle
When circle was compiled with f77, the result is "Binary file circle matches"
and if I do the same looking for g77 in a f77 file, it returns blank.
So here is the script, hope someone can make use of it...
Thanks for all the help!
tom
===========================================================================
#!/bin/sh
# the debugger section figures out which debugger to use. Basically, use
# HP's version of gdb for f77 and std gdb for anything else.
# the ddd option "-d" lets you specify a dir to add to the
# search path for source files.
epath=/u/rdsnfs5/t901353/local/bin/ddd
spath=/u/rdsnfs5/t901353/programs/source
compiler=`grep -i g77 $1 | cut -d" " -f1,2`
if (test "$compiler" = "Binary file") then
debugger=/u/rdsnfs5/t901353/local/bin/gdb
else
compiler=`grep -i f77 $1 | cut -d" " -f1,2`
if (test "$compiler" = "Binary file") then
debugger=/opt/langtools/bin/gdb
else
debugger=/u/rdsnfs5/t901353/local/bin/gdb
fi
fi
$epath --debugger $debugger -d $spath "$@"
===========================================================================