进行C语言开发,经常出现Segmentation fault (core dumped).出现后又不知道是哪行代码出错,该如何调试呢?
2020-02-04 18:23:31.691853 [INFO] mod_dialplan_xml.c:637 Processing 1000 <1000>->5002 in context default
2020-02-04 18:23:31.691853 [NOTICE] sofia_media.c:92 Pre-Answer sofia/internal/1000@192.168.124.18!
2020-02-04 18:23:31.691853 [NOTICE] mod_dptools.c:1360 Channel [sofia/internal/1000@192.168.124.18] has been answered
2020-02-04 18:23:33.831846 [INFO] mod_yytts.c:147 yytts.feed_tts url=http://127.0.0.1:10011/bill-tts-server-agent/api/acoustics/tts?app_key=1234&text=我是原语智能的电话系统,请说&voice=zhilingf&rate=48000&audio_type=wav
2020-02-04 18:23:40.131851 [INFO] mod_billasr.c:410 start recognition...
2020-02-04 18:23:40.131851 [INFO] mod_billasr.c:423 wav_file_dir (null)
2020-02-04 18:23:40.131851 [INFO] mod_billasr.c:424 WAVE_DIR_MAX_LENGTH 110
Segmentation fault (core dumped)
编译的时候带 -g ,然后用 gdb 调试,具体参见:gdb core 查询程序崩溃原因 - debug 版调试