> Hi again,
>
> I'm making some progress, using 'gdb' after having put 'F77 = f77 -g' in
> makefile. But the G Debugger is looking for 'dtask_main.f', which of
> course it cant find. What do I do to get it working?
>
> Cheers, Alan
Alan,
Malcolm's a bit tied up just now so has passed this one on.
I think your current problem is:
> Current language: auto; currently fortran
> (gdb) break t_xxx
> Function "t_xxx" not defined.
>
>
> -------------------------------------------------------------------------------------
>
> But 'subroutine t_xxx' is one of the first calls in the program.
You should write instead
(gdb) break t_xxx_
since gcc/g77 appends an underscore to the name of all fortran
routines to distinguish them from similarly-named C ones.
If you use the 'nm' command on the executable you should
be able to see the names of the symbols that it knows about, so
% nm prog_name | grep t_xxx
should give you a line something like
08069558 T t_xxx_
If you find it gives you instead something like
08069558 T t_xxx__
then make sure you have the flag '-fno-second-underscore' on your f77
compilation command.
Hopefully this will get you a bit further.
> And shouldnt I be using a GUI debugger instead of 'gdb'? How about
> 'ddd'?
I think ddd should work too, since I seem to remember it's got a gdb
back end, at least as an option, but I haven't used it myself.
By all means get back to me if you have more trouble.
Mark
--
Mark Taylor Starlink Programmer Physics, Bristol University, UK
[log in to unmask] +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
|