PHP扩展开发
leonpengweicn
这个作者很懒,什么都没留下…
展开
-
Zend Parameters Parser新增类型描述符介绍
http://www.laruence.com/2011/07/02/2102.html作者: Laruence( )本文地址: http://www.laruence.com/2011/07/02/2102.html转载请注明出处从PHP5.3开始, zend_parse_paramters_*函数新增了如下几个新的类型描述符:f - fun转载 2015-02-03 15:04:39 · 475 阅读 · 0 评论 -
php7扩展开发[6] 调试Segmentation fault
http://www.tuicool.com/articles/ZNzAfu3纠错 06 Feb 20161.编译安装php-7.0.5,编译时,加上--enable-debug --enable-phpdbgwget http://cn2.php.net/distributions/php-7.0.5.tar.gztar zxvf php-7.0.5.t转载 2016-12-11 10:44:18 · 2900 阅读 · 0 评论 -
gdb 调试PHP
http://phpor.net/blog/post/997PHP的代码包中提供了一个 .gdbinit 的gdb脚本文件,里面提供了20多个 gdb 的自定义命令,用于方便PHP的调试,下面举几个例子:测试脚本a.php:12345678910$a = "AAA";$b = "BBB";test("phpor");function test($name转载 2015-12-16 17:48:52 · 2177 阅读 · 0 评论 -
Debugging PHP segfault backtraces with `gdb`
http://www.robertames.com/blog.cgi/entries/debugging-php-segfault-backtraces-with-gdb.htmlHello, and welcome. I am going to assume you have gone through the normal PHP documentation about how to g转载 2015-11-27 12:46:50 · 661 阅读 · 0 评论 -
Cannot find new threads: generic error
这是由于gdb未加载 thread模块在执行gdb命令的时候加上thread模块即可LD_PRELOAD=/lib/x86_64-linux-gnu/libpthread.so.0 gdb --args /opt/php-debug/bin/phphttp://stackoverflow.com/questions/2702628/gdb-can原创 2015-12-10 10:55:17 · 2274 阅读 · 0 评论 -
GDB调试php扩展错误(Segmentation fault (core dumped))
(gdb) print (char *)(executor_globals.function_state_ptr->function)->common.function_name(gdb) print (char *)executor_globals.active_op_array->filename$3 = 0x9c7ccc "/home/down.php"print executor原创 2015-12-10 11:23:44 · 1488 阅读 · 0 评论 -
Debugging PHP segfault backtraces with `gdb`
http://www.robertames.com/blog.cgi/entries/debugging-php-segfault-backtraces-with-gdb.htmlHello, and welcome. I am going to assume you have gone through the normal PHP documentation about ho转载 2015-12-10 11:09:32 · 845 阅读 · 0 评论 -
php 调试 core dump
$ gdb /usr/sbin/apache2 --core /var/tmp/core/core.15001 --command /usr/local/src/php-5.5.5/.gdbinit(gdb) set print pretty on(gdb) zbacktrace(gdb) print *executor_globals->active_op_array(gdb) prin转载 2015-12-10 11:10:31 · 1076 阅读 · 0 评论 -
php zend api【第一次】
http://www.cnblogs.com/tohilary/archive/2012/10/12/2721971.html我们来看一下以下代码片段: 1 PHP_FUNCTION(lychee_cli_usr_get_balance) 2 { 3 char* srv_addr = NULL; 4 long sr转载 2015-05-23 14:06:54 · 972 阅读 · 0 评论 -
php extension 声明类属性
http://blog.00rz.com/2010/09/php-extension-delcare-class-array-property.html在弄一个php扩展, 想把 扩展写成类的 形式, 于是在声明的时候 想给类加个array 属性于是expect 代码是这样的 PHP_MINIT_FUNCTION(concurrency)转载 2015-02-09 16:32:25 · 1061 阅读 · 0 评论 -
gdb调试PHP扩展函数
1,编译debug版的php git clone https://github.com/php/php-src.git cd php-src ./configure --prefix=/opt/php-debug --enable-debug --enable-cli --without-pear --enable-embed make make install mkdir /op原创 2015-02-09 10:36:29 · 3128 阅读 · 0 评论 -
zval_dtor与zval_ptr_dtor的区别
http://bbs.phpchina.com/thread-226862-1-1.html这两个东西长得很像,起初我还错误以为一个是针对zval一个针对zval*的释放函数,唉,太天真了。这两个函数都与zval的释放有关,是我们肯定会经常碰到的两个函数。下面是两者的声明://zval_dtor是宏函数,最终展开后ZEND_API void _zval_dtor_func转载 2015-02-03 15:04:06 · 1516 阅读 · 0 评论 -
用qt creator搭建开发、调试php扩展的环境
https://segmentfault.com/a/1190000009828172目标:使用qtcreator,搭建php扩展开发、调试环境调试目标:执行php程序(php脚本里使用扩展里的函数等),c代码里面开始唤起单步调试,步骤简洁c开发工具:能够识别各种文件格式(m4,makefile),能处理好include的引用现代IDE提供的功能转载 2017-06-28 10:06:31 · 1462 阅读 · 0 评论