bramante@matrix:~/test$ g++ -o ./hang ./hang.cpp
bramante@matrix:~/test$ gdb ./hang
GNU gdb (Ubuntu/Linaro 7.4-2012.04-0ubuntu2.1) 7.4-2012.04
Copyright (C) 2012 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law. Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://bugs.launchpad.net/gdb-linaro/>...
Reading symbols from /home/bramante/test/hang...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/bramante/test/hang
test()
block...
block...
block...
block...
block...
block...
block...
^C
Program received signal SIGINT, Interrupt.
0x00007ffff77db090 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:82
82 ../sysdeps/unix/syscall-template.S: No such file or directory.
(gdb) bt
#0 0x00007ffff77db090 in __nanosleep_nocancel () at ../sysdeps/unix/syscall-template.S:82
#1 0x00007ffff77daf4c in __sleep (seconds=0) at ../sysdeps/unix/sysv/linux/sleep.c:138
#2 0x0000000000400770 in PARENT::~PARENT() ()
#3 0x00007ffff77575b1 in __run_exit_handlers (status=0, listp=0x7ffff7ad3688, run_list_atexit=true) at exit.c:78
#4 0x00007ffff7757635 in __GI_exit (status=<optimized out>) at exit.c:100
#5 0x0000000000400746 in main ()
(gdb)