[root@tellus ~]# gdb /usr/sbin/asterisk
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "x86_64-unknown-linux-gnu"...Using host libthread_db library "/lib64/tls/libthread_db.so.1".
(gdb) bt
No stack.
(gdb) se
search section select-frame set
(gdb) set breakpoint
(gdb) run
Starting program: /usr/sbin/asterisk
[Thread debugging using libthread_db enabled]
[New Thread 48005112096768 (LWP 3660)]
Asterisk already running on /var/run/asterisk.ctl. Use 'asterisk -r' to connect.
Program exited with code 01.
(gdb) b
backtrace break bt
(gdb) b main
Breakpoint 1 at 0x470290: file asterisk.c, line 2035.
(gdb) run
Starting program: /usr/sbin/asterisk
[Thread debugging using libthread_db enabled]
[New Thread 47952089307136 (LWP 3668)]
[Switching to Thread 47952089307136 (LWP 3668)]
Breakpoint 1, main (argc=-1240222784, argv=0x4ab9b0) at asterisk.c:2035
2035 {
(gdb) bt
#0 main (argc=-1240222784, argv=0x4ab9b0) at asterisk.c:2035
(gdb)