This is the mail archive of the
gdb@sources.redhat.com
mailing list for the GDB project.
Re: Opteron Stack Woes
> You might want to investigate why the backtrace didn't stop earlier, at
> main or at a fortran entry point. GDB may be confused about
> main_name().
This hit me too when I tried to write the first fortran program for the
test suite. I haven't filed a PR yet, but gdb is clueless about
main_name for fortran programs compiled with g77 3.4.1, both dwarf-2 and
stabs+. When I say 'start', gdb puts the breakpoint in function 'main'
in the fortran runtime library, not at the 'program' statement.
The only call to set_main_name in gdb is in dbxread.c
and it's not getting called. I don't see any N_MAIN stab line
in hello.s, so g77 3.4.1 isn't doing what we want.
Note that David is using a different fortran compiler.
I don't know why David's stack trace blows right through main.