This is the mail archive of the
gdb@sourceware.org
mailing list for the GDB project.
[OPTERON/x86_64] - can debug while setting breakpoint
- From: François Chenais <francois at chenais dot net>
- To: gdb at sourceware dot org
- Date: Thu, 05 Feb 2009 19:49:08 +0100
- Subject: [OPTERON/x86_64] - can debug while setting breakpoint
Hello,
Something strange happens while trying to debug on x86_64 system.
I have a simple C code in t.c file ...
#include <stdio.h>
void main (int argc, char **argv) { printf("Hello World !"\n); }
... built with ...
# gcc -g t.c
... and run it
# a.out
Hello World !
ldd is ok
libc.so.6 => /lib64/libc.so.6 (0x000000304f200000)
/lib64/ld-linux-x86-64.so.2 (0x000000304da00000)
Now running it with gdb :
# gdb a.out
blah blah blah
(gdb) run
Starting program: /home/francois/src/a.out
Hello World !
Program exited with code 016.
(gdb) b main
Breakpoint 1 at 0x80483b5: file t.c, line 2.
(gdb) run
At this moment, a SIGSEGV occurs before stopping on the breakpoint !!!
The stack is buggy !
More informations that can help
=====================
The same error occurs with others debuggers : totalview, sun dbx, intel idb
and while using intel icc or g++ compilers :/
The same error occurs while building with -static option.
I've done the test on 5 Amd opteron x86_64 hosts with Cent OS 5.2
- The error occurs on 3/5.
Any idea ???
Thanks a lot by advance
François