首页
下载
文档
问答社区
视频
捐赠
源代码
AI 助理
赞助商
CRMEB
Apipost
腾讯云
微擎
禅道
51Talk
商业产品
Swoole AI 智能文档翻译器
Swoole-Compiler PHP 代码加密器
CRMEB 新零售社交电商系统
登录
注册
全部
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
发表新帖
gdb php扩展调试
由于官方的扩展protocolbuffers不支持php7,没有人在维护了,现在自己拉了一个分支尝试让该扩展支持php7。 地址:https://github.com/henryzxj/php-protocolbuffers 测试代码为: {{{ <?php $target = new ProtocolBuffers\DescriptorBuilder(); if ($target instanceof ProtocolBuffersDescriptorBuilder) { echo "OK" . PHP_EOL; } else { echo get_class($target) . PHP_EOL; } 运行php test.php出现段错误。 使用gdb调试, henryzhu@henryzhu-All-Series:~/core_files$ gdb php core-php.20633 GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from php...(no debugging symbols found)...done. warning: core file may not match specified executable file. [New LWP 20633] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `php test.php'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x0000562e39b0e59e in ?? () #2 0x0000562e39abd36b in execute_ex () #3 0x0000562e39a6cda1 in dtrace_execute_ex () #4 0x0000562e39b110a7 in zend_execute () #5 0x0000562e39a7cfa3 in zend_execute_scripts () #6 0x0000562e39a1d760 in php_execute_script () #7 0x0000562e39b12d67 in ?? () #8 0x0000562e399020f4 in main () (gdb) quit }}} 这里没办法看到函数,请指点下!
发布于6年前 · 1 次浏览 · 来自
提问
b
bug
由于官方的扩展protocolbuffers不支持php7,没有人在维护了,现在自己拉了一个分支尝试让该扩展支持php7。 地址:https://github.com/henryzxj/php-protocolbuffers 测试代码为: {{{ <?php $target = new ProtocolBuffers\DescriptorBuilder(); if ($target instanceof ProtocolBuffersDescriptorBuilder) { echo "OK" . PHP_EOL; } else { echo get_class($target) . PHP_EOL; } 运行php test.php出现段错误。 使用gdb调试, henryzhu@henryzhu-All-Series:~/core_files$ gdb php core-php.20633 GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.04) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from php...(no debugging symbols found)...done. warning: core file may not match specified executable file. [New LWP 20633] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `php test.php'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x0000000000000000 in ?? () (gdb) bt #0 0x0000000000000000 in ?? () #1 0x0000562e39b0e59e in ?? () #2 0x0000562e39abd36b in execute_ex () #3 0x0000562e39a6cda1 in dtrace_execute_ex () #4 0x0000562e39b110a7 in zend_execute () #5 0x0000562e39a7cfa3 in zend_execute_scripts () #6 0x0000562e39a1d760 in php_execute_script () #7 0x0000562e39b12d67 in ?? () #8 0x0000562e399020f4 in main () (gdb) quit }}} 这里没办法看到函数,请指点下!
赞
0
分享
收藏
提问
分享
讨论
建议
公告
开发框架
CodeGalaxy
评论
2017-12-01
王
王洪峰
开发扩展一定要编译一个debug版本的PHP。
赞
0
回复
微信公众号
热门内容
暂无回复的问答
- CodeGalaxy K3s 轻量集群节点之间如何实现负载均衡
- 关于openssl CURL WARNING swSSL_connect: SSL_connect(fd=69) failed. Error: error:141A318A:SSL routines:tls_process_ske_dhe:dh key too small[1|394]
- 多个模型如何进行事务异常回退?
- websocket开启wss报错
- 协程tcp服务器如何使用多进程?recv()方法接收信息,打印出来的pid一直是同一个。没用使用到多进程啊。