[Asterisk-Dev] Trying to use gdb..strange result

Matthew Boehm mboehm at cytelcom.com
Sat Nov 13 09:34:20 MST 2004


I'm developing my own custom app at the moment and I want to use gdb to step
thru the code to debug it. I used the following command line:

gdb /usr/sbin/asterisk

Then: "set args -vvvvdgn"
Then: "run"

I get this:

Starting program: /usr/sbin/asterisk -vvvvdgn
[New Thread 1076208256 (LWP 2483)]
Parsing /etc/asterisk/asterisk.conf
Parsing /etc/asterisk/extconfig.conf
[New Thread 1084599488 (LWP 2490)]
[Thread 1084599488 (LWP 2490) exited]
  == Binding sipfriends to mysql/asterisk/sip
  == Binding voicemail to mysql/asterisk/voicemail_users
  == Binding directory to mysql/asterisk/voicemail_users
  == Binding meetme to mysql/asterisk/conference_rooms
Asterisk CVS-HEAD-11/10/04-15:12:23, Copyright (C) 1999-2004 Digium.
Written by Mark Spencer <markster at digium.com>
=========================================================================
Asterisk Event Logger Started /var/log/asterisk/event_log

<more output cut>

Asterisk Ready.

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1116941120 (LWP 2494)]
0x412921de in my_real_read () from /usr/lib/mysql/libmysqlclient.so.14
(gdb)

??? But asterisk starts and runs perfectly if I run it by itself.  Why would
asterisk run OK by itself but have this SIGSEGV when inside gdb? There are
only 2 applications that even use mysql and both of them run fine when in
standalone mode.

Any ideas?

Thanks,
Matthew




More information about the asterisk-dev mailing list