NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

port-alpha/46028: gdb do not identify main() frame for core analysis



>Number:         46028
>Category:       port-alpha
>Synopsis:       gdb do not identify main() frame for core analysis
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-alpha-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Feb 15 19:25:03 +0000 2012
>Originator:     Nicolas Joly
>Release:        NetBSD 5.99.65
>Organization:
Institut Pasteur
>Environment:
System: NetBSD thanos.sis.pasteur.fr 5.99.65 NetBSD 5.99.65 (GENERIC-$Revision: 
1.343 $) #3: Wed Feb 15 16:36:57 CET 2012 
njoly%thanos.sis.pasteur.fr@localhost:/local/src/NetBSD/obj.alpha/sys/arch/alpha/compile/THANOS
 alpha
Architecture: alpha
Machine: alpha
>Description:
When doing post-mortem core analysis with gdb, it does not seems to properly
identify frame from main() function. Live analysis does not exhibit the
problem.

njoly@thanos [~/tmp]> cat sample.c 
#include <signal.h>
int main() {
  raise(SIGSEGV); }
njoly@thanos [~/tmp]> cc -g -O2 -o sample sample.c
njoly@thanos [~/tmp]> ./sample 
zsh: segmentation fault (core dumped)  ./sample

njoly@thanos [~/tmp]> gdb sample sample.core 
GNU gdb (GDB) 7.3.1
Copyright (C) 2011 Free Software Foundation, Inc.
[...]
Core was generated by `sample'.
Program terminated with signal 11, Segmentation fault.
#0  0x000000016018b7e4 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0x000000016018b7e4 in _lwp_kill () from /usr/lib/libc.so.12
#1  0x000000016018b6b8 in raise (s=<optimized out>)
    at /local/src/NetBSD/src/lib/libc/gen/raise.c:48
Cannot access memory at address 0x1ffffaf68

njoly@thanos [~/tmp]> gdb sample
GNU gdb (GDB) 7.3.1
[...]
Reading symbols from /home/njoly/tmp/sample...done.
(gdb) run
Starting program: /home/njoly/tmp/sample 

Program received signal SIGSEGV, Segmentation fault.
0x000000016018b7e4 in _lwp_kill () from /usr/lib/libc.so.12
(gdb) bt
#0  0x000000016018b7e4 in _lwp_kill () from /usr/lib/libc.so.12
#1  0x000000016018b6b8 in raise (s=<optimized out>)
    at /local/src/NetBSD/src/lib/libc/gen/raise.c:48
#2  0x00000001200009ac in main () at sample.c:3

>How-To-Repeat:
>Fix:



Home | Main Index | Thread Index | Old Index