This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Using g77 and gdb together


I am having many problems in trying to use gdb to debug a very large
fortran program compiled with g77.

In particular gdb seems to be confused about source line numbers.  For
exemple there exists a subroutine called amorti_ (AMORTI) in a given
source
file.  The line number of the subroutine statement is 498 and the first
executable statement is an IF at line 528 followed by an assignment at
529.

Now if in gdb I type:
> break amorti_
I see:
Breakpoint 2 at 0x80c65be: file ../beta/source/emequi.f, line 648.

Line 648 is the RETURN statement at the end of the routine.

If I type
> list amorti_

gdb lists lines between 582 and 591, somewhere in the middle of the
routine.

The source file in question makes use of many INCLUDE statements some of
which are nested.  The include files, source files
and executable are all in separate directories.  It also contains
routines containing
ENTRY statements (although the particular routine I mentioned here does
not.).

Initial attempts to reproduce this behavior with a small test program
have failed.

Does anyone have any idea what is going on here ?

I'm using gdb 4.18 and gcc 2.95.1 but I believe that this type of
behavior existed in previous versions.

Thanks in advance for any help,
Gerard Flynn


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]