Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / README.ZEND_VM

From: Date: Sat, 02 Oct 2004 08:27:47 +0000
Subject: Re: [ZEND-ENGINE-CVS] cvs: ZendEngine2 / README.ZEND_VM
References: 1 2 3 4 5  Groups: php.zend-engine.cvs 
Request: Send a blank email to php-zend-engine-cvs+get-3068@lists.php.net to get a copy of this message
On Fri, 1 Oct 2004, Sara Golemon wrote: > > Okay, so I can call it alright and overriding with: > > > > zend_opcode_handlers[ZEND_EXIT] = xdebug_exit_handler; > > > > works too, but I've some troubles getting my code to work that is > > handling the exit handler: > > > > zend_exit_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); > > > > What about: > > static void (*old_exit_handler)(ZEND_OPCODE_HANDLER_ARGS); > > int xdebug_exit_handler(ZEND_OPCODE_HANDLER_ARGS) > { > /* blah blah blah */ > return old_exit_handler(ZEND_OPCODE_HANDLER_ARGS_PASSTHRU); > } > > PHP_MINIT_FUNCTION(xdebug) { > old_exit_handler = zend_opcode_handlers[ZEND_EXIT]; > zend_opcode_handlers[ZEND_EXIT] = xdebug_exit_handler; > /* etc...etc...etc... */ > return SUCCESS; > } > > Of course, this won't work under the switch vm, and I havn't even looked at > the goto model, but the 5.0-esque call format should handle it fine.... I already fixed it, but could not commit it yet :) Thanks anyway. Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org

« previous php.zend-engine.cvs (#3068) next »