This is the mail archive of the gcc-patches@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]
Other format: [Raw text]

Re: [gfortran,patch] Allow backtracing non-library errors


On Sun, 2007-08-05 at 10:38 +0100, FX Coudert wrote:

Hi FX,

> If you remove -fbacktrace and catch the SIGFPE with gdb, what is the  
> gdb backtrace?

$ gfortran -g   -ffpe-trap=invalid u3.f90
$ gdb ./a.out
GNU gdb 6.4.90-debian
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you
are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for
details.
This GDB was configured as "i486-linux-gnu"...Using host libthread_db
library "/lib/i686/cmov/libthread_db.so.1".

(gdb) r
Starting program: /tmp/a.out 

Program received signal SIGFPE, Arithmetic exception.
0x080485ea in MAIN__ () at u3.f90:3
3          x = sqrt(x)
Current language:  auto; currently fortran
(gdb) bt
#0  0x080485ea in MAIN__ () at u3.f90:3
(gdb) 



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