[OPTERON/x86_64] - can debug while setting breakpoint

François Chenais francois@chenais.net
Thu Feb 5 18:49:00 GMT 2009


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







  









More information about the Gdb mailing list