Centos7 上使用gdb:
$ gdb php $ run /home/www/2.php
运行完 run,后面跟着很长的提示:
….
$ vi /etc/yum.repos.d/CentOS-Debuginfo.repo
gpgcheck=0 # 不检测签名,
enabled=1 # 支持yum源
$ sudo debuginfo-install -y cyrus-sasl-lib-2.1.26-17.el7.x86_64 glibc-2.17-55.el7_0.3.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.11.3-49.el7.x86_64 libcom_err-1.42.9-4.el7.x86_64 libcurl-7.29.0-19.el7.x86_64 libidn-1.28-3.el7.x86_64 libjpeg-turbo-1.2.90-5.el7.x86_64 libmcrypt-2.5.8-4.el7.art.x86_64 libpng-1.5.13-5.el7.x86_64 libselinux-2.2.2-6.el7.x86_64 libssh2-1.4.3-8.el7.x86_64 libxml2-2.9.1-5.el7_0.1.x86_64 nspr-4.10.6-1.el7_0.x86_64 nss-3.16.2.3-2.el7_0.x86_64 nss-softokn-freebl-3.16.2.3-1.el7_0.x86_64 nss-util-3.16.2.3-1.el7_0.x86_64 openldap-2.4.39-3.el7.x86_64 openssl-libs-1.0.1e-34.el7_0.6.x86_64 pcre-8.32-12.el7.x86_64 xz-libs-5.1.2-8alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
$ sudo yum install -y nss-softokn nss-softokn-debuginfo --nogpgcheck --skip-broken
nss-softokn-debuginfo 是给 nss-softokn 提供debug信息的包,--nogpgcheck 忽略签名检查,--skip-broken 跳过有依赖问题的包.