[asterisk-dev] Debugging in chan_sip.c

Edwin Groothuis edwin at mavetju.org
Wed Mar 7 04:54:24 MST 2007


On Tue, Mar 06, 2007 at 04:26:27PM -0800, Ed Greenberg wrote:
> I started ddd (gdb) on asterisk, but cannot load source for chan_sip.c. 
> 
> Here's my process:
> 
> % sudo ddd asterisk
> File | Open Source
> <Click "Load Shared Object Library Symbols"
> Exploring the list of available source files, I have lots of files, 
> including those in subdirectories, but nothing in channels/ or apps/

My guess is that the ddd (and any other debugger) can't read the
asterisk way of loading dynamic libraries (which is nothing more
than scanning a directory and then to dlopen(3) all the files found
in there.

What you could do is set a breakpoint in the main() just after the
libraries are loaded, then quickly set the breakpoints and then
continue. But with a threaded, hardware-based piece of software
like Asterisk I wouldn't really put my money on it working 100% all
the time.

Edwin

-- 
Edwin Groothuis      |            Personal website: http://www.mavetju.org
edwin at mavetju.org    |          Weblog: http://weblog.barnet.com.au/edwin/


More information about the asterisk-dev mailing list