我正在尝试在Ubuntu 9.10上的PHP上调试SIGSEGV。
我已经安装php5-dbg
了调试符号,但是,当我启动gdb时,它显示以下输出:
Reading symbols from /usr/bin/php...
Reading symbols from /usr/lib/debug/usr/bin/php5...done.
(no debugging symbols found)...done.
任何想法都欢迎。
在某些情况下,-dbg
程序包无法正常工作。相反,请尝试-dbgsym
从单独的“调试符号”存储库中获得的软件包:
https://wiki.ubuntu.com/DebuggingProgramCrash
但是,当在Ubuntu 9.10上本地尝试时,使用现有php5-dbg
包加载符号没有问题。也许确保先安装了最新更新,然后再尝试?
举个例子:
$ cat /tmp/test.php
<?php sleep(10); ?>
$ gdb php
...
(gdb) run /tmp/test.php
...
^C
Program received signal SIGINT, Interrupt.
0xf7fe0430 in __kernel_vsyscall ()
(gdb) bt
#0 0xf7fe0430 in __kernel_vsyscall ()
#1 0xf7a13b50 in nanosleep () from /lib/tls/i686/cmov/libc.so.6
#2 0xf7a13991 in sleep () from /lib/tls/i686/cmov/libc.so.6
#3 0x081fbfc1 in zif_sleep (ht=1, return_value=0x866d204,
return_value_ptr=0x0, this_ptr=0x0, return_value_used=0)
at /build/buildd/php5-5.2.10.dfsg.1/ext/standard/basic_functions.c:4787
#4 0x082f9616 in zend_do_fcall_common_helper_SPEC (execute_data=0xffffafbc)
at /build/buildd/php5-5.2.10.dfsg.1/Zend/zend_vm_execute.h:200
#5 0x082f511b in execute (op_array=0x866d7f0)
at /build/buildd/php5-5.2.10.dfsg.1/Zend/zend_vm_execute.h:92
#6 0x082cf414 in zend_execute_scripts (type=8, retval=0x0, file_count=3)
at /build/buildd/php5-5.2.10.dfsg.1/Zend/zend.c:1215
#7 0x08284166 in php_execute_script (primary_file=0xffffd454)
at /build/buildd/php5-5.2.10.dfsg.1/main/main.c:2046
#8 0x08352c38 in main (argc=2, argv=0xffffd554)
at /build/buildd/php5-5.2.10.dfsg.1/sapi/cli/php_cli.c:1170
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句