Asterisk gdb如何用gdb和星号11.5.1调试崩溃但是还没有生成Still Core Dunp为什么?

时间:2013-12-23 12:15:58

标签: gdb segmentation-fault asterisk coredump

========================= [root @ officekam asterisk-11.5.1] #df -h 使用的文件系统大小可用使用%挂载 / dev / sda2 143G 69G 67G 51%/ / dev / sda1 97M 44M 49M 48%/ boot tmpfs 1008M 0 1008M 0%/ dev / shm

==============

解释每一步。

/etc/asterisk/asterisk.conf     ----     目录     astetcdir =>在/ etc /星号     astmoddir => / usr / lib中/星号/模块     astvarlibdir =>在/ var / lib中/星号     astdbdir =>在/ var / lib中/星号     astkeydir =>在/ var / lib中/星号     astdatadir =>在/ var / lib中/星号     astagidir =>在/ var / lib中/星/ AGI斌     astspooldir =>的/ var /阀芯/星号     astrundir =>在/ var /运行/星号     astlogdir =>的/ var /数/星号

[options]
;verbose = 3
;debug = 3
;alwaysfork = yes               ; Same as -F at startup.
;nofork = yes                   ; Same as -f at startup.
;quiet = yes                    ; Same as -q at startup.
;timestamp = yes                ; Same as -T at startup.
;execincludes = yes             ; Support #exec in config files.
;console = yes                  ; Run as console (same as -c at startup).
;highpriority = yes             ; Run realtime priority (same as -p at
                                ; startup).
;initcrypto = yes               ; Initialize crypto keys (same as -i at
                                ; startup).
;nocolor = yes                  ; Disable console colors.
;dontwarn = yes                 ; Disable some warnings.
**dumpcore = yes**                  ; Dump core on crash (same as -g at startup).

====================== 我的系统: /usr/src/asterisk-11.5.1/: 我运行asterisk:asterisk -U asterisk -vvvvvvvvvvvvvvvvvcdddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd

注意: gdb正在安装 ulimit -U unlimit。

但核心文件没有生成。 那么如何使用$ gdb corefile

=======其他设置========

已添加#DAEMON_COREFILE_LIMIT =“无限制”。     DAEMON_COREFILE_LIMIT = “无限”

=============================

**# /etc/profile**

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

# It's NOT good idea to change this file unless you know what you
# are doing. Much better way is to create custom.sh shell script in
# /etc/profile.d/ to make custom changes to environment. This will
# prevent need for merging in future updates.

ulimit -c unlimited> / dev / null 2>& 1

**

# Controls whether core dumps will append the PID to the core filename.
# Useful for debugging multi-threaded applications.
kernel.core_uses_pid = 1

**
===================
kernel.core_pattern = '/tmp/core_dump/core'
===================
**lrwxrwxrwx  1 asterisk asterisk 0 Dec 24 11:44 cwd -> /usr/src/asterisk/asterisk-11.5.1**
-r--------  1 asterisk asterisk 0 Dec 24 11:44 environ
lrwxrwxrwx  1 asterisk asterisk 0 Dec 24 11:44 exe -> /usr/sbin/asterisk
======================================

1 个答案:

答案 0 :(得分:0)

你需要

1)使用调试符号编译星号

2)在/etc/asterisk/asterisk.conf中启用核心转储。

voip-info asterisk debugging page

查看更多信息