[Asterisk-Dev] how to run Asterisk in gdb or other debugger?

Cristian Draghici cristian.draghici at gmail.com
Wed Jan 4 23:35:24 MST 2006


I can attach to the asterisk process with gdb after it has started
(I'm on OS X but I don't think that's what makes it work).

(gdb) attach 321
Attaching to process 321.
Reading symbols for shared libraries . done
Reading symbols for shared libraries
.................................................................................................................................
done
0x9001f208 in select ()
(gdb) bt
#0  0x9001f208 in select ()
#1  0x00074dd8 in poll (pArray=0xbffffa58, n_fds=0, timeout=-1) at poll.c:296
#2  0x0005f438 in main (argc=-1073743272, argv=0xc76e0) at asterisk.c:2336
(gdb) info threads
  14 process 321 thread 0x2803  0x90040258 in mach_wait_until ()
  13 process 321 thread 0x2703  0x90040258 in mach_wait_until ()
[..]

Hope this helps,
Cristi


On 1/5/06, TTulinsky at netscape.net <TTulinsky at netscape.net> wrote:
> has anyone gotten Asterisk to run in a debugger like gdb or ddd? We have tried gdb and quickly get a SIGPIPE (broken pipe) exception, probably caused by an interrupted system call. It is known that Gdb signals can mess up multi-threaded programs by interrupting system calls.
>
> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
>
> Netscape. Just the Net You Need.
>
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> _______________________________________________
> --Bandwidth and Colocation provided by Easynews.com --
>
> Asterisk-Dev mailing list
> To UNSUBSCRIBE or update options visit:
>    http://lists.digium.com/mailman/listinfo/asterisk-dev
>



More information about the asterisk-dev mailing list