This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug fortran/31278] Backtrace/coredump for array-out-of-bounds errors (-fbounds-check)
- From: "burnus at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 20 Mar 2007 17:45:06 -0000
- Subject: [Bug fortran/31278] Backtrace/coredump for array-out-of-bounds errors (-fbounds-check)
- References: <bug-31278-13404@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #2 from burnus at gcc dot gnu dot org 2007-03-20 17:45 -------
> It is not hard to do "b _gfortran_out_of_bounds" in gdb.
Well, it is not always easy to find the symbol. In C it is much easier:
Essentially all you type is what you get. Fortran with all its hidden library
calls is more difficult. How does one quickly find _gfortran_out_of_bounds if
one is not experienced in debugging and does not have the source of GCC?
And after all, we do have now coredump/backtrace support, why not use it?
> I never understood why gfortran or any language these extra features when
> there is something called a debugger.
Well, it is easier to have a backtrace directly rather than messing around with
a debugger, finding all the needed symbols, finding the right executable. (I
know several Fortran programs, which are glued together by a huge cascade of
shell scripts, last but not least because Fortran 95 does not support command
line arguments. There, even finding the program which crashed is challenging.)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31278