This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
backtrace a segfault
- From: Patrick Begou <Patrick dot Begou at legi dot grenoble-inp dot fr>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Thu, 09 Apr 2015 09:06:09 +0200
- Subject: backtrace a segfault
- Authentication-results: sourceware.org; auth=none
Hi,
I'm working on a large parallel fortran application which give (sometime) a
segfault. When this error occurs I would like to backtrace the call stack to
know where it takes place but I'm unable to get this information, no more than a
list of memory addresses. I've build a small test-case (with an error in array
dimension creating a segmentation fault in a subroutine ) to investigate
gfortran/gcc options.
With gcc version 4.8.2 using options "-g -fbacktrace -gdwarf-3" I get
./plante
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0x7F99F71A9AC7
#1 0x7F99F71AA0CE
#2 0x7F99F67A9B2F
Segmentation fault
but addr2line -e ./plante 0x7F99F71AA0CE
returns: ??:0
What have I missed ?
Thanks
Patrick
--
===================================================================
| Equipe M.O.S.T. | |
| Patrick BEGOU | mailto:Patrick.Begou@grenoble-inp.fr |
| LEGI | |
| BP 53 X | Tel 04 76 82 51 35 |
| 38041 GRENOBLE CEDEX | Fax 04 76 82 52 71 |
===================================================================