PHP扩展开发的gdb调试记录
cd ext/
./ext_skel --extname=hello
cd hello
vim config.m4
phpize
./configure --with-php-config=xxx
make && make install
php_module_startup:
php_request_startup:
php_excecu_script:
gdb /usr/local/php/bin/php
b php_module_startup //打断点
b php_request_startup
b php_execute_script
b php_request_shutdown
b php_module_shutdown
b zm_startup_encryption
b zm_shutdown_encryption
b zm_activate_encryption
b zm_deactivate_encryption
r test.php
bt
c
b zif_encryption //FUNCTION(encryption) 的实际执行函数 void zif_hello(zend_execute_data *zend_execute_data ,zval *return_value )
c
c
c
p *execute_data
bt
n
p arg
p *strg
p *strg.val@117