On Thu, 10 Feb 2005, Andi Gutmans wrote:

> At 11:01 AM 2/9/2005 -0500, George Schlossnagle wrote:
>
> >On Feb 9, 2005, at 10:57 AM, Sara Golemon wrote:
> >
> >>>Is it possible to intercept a function call (user
> >>>space or built-in) in the Zend Engine and execute user
> >>>space code before/after the function call?
> >>Yes, you can do this by way of a Zend extension (not a PHP extension mind
> >>you).
> >>
> >>The parts of Zend/zend_extensions.h you'll want to pay attention to are:
> >
> >You can also do this by directly wrapping zend_execute.  This is the
> >preferred method if you're writing a profiler or such.
>
> Yeah. Actually I thought we already nuked the old way.
> Is anyone using it?

I'm using:
ZEND_DLEXPORT zend_extension zend_extension_entry = {
    XDEBUG_NAME,
    XDEBUG_VERSION,
    XDEBUG_AUTHOR,
    XDEBUG_URL,
    "Copyright (c) 2002, 2003, 2004",
    xdebug_zend_startup,
    xdebug_zend_shutdown,
    NULL,           /* activate_func_t */
    NULL,           /* deactivate_func_t */
    NULL,           /* message_handler_func_t */
    NULL,           /* op_array_handler_func_t */
    xdebug_statement_call, /* statement_handler_func_t */
    NULL,           /* fcall_begin_handler_func_t */
    NULL,           /* fcall_end_handler_func_t */
    NULL,           /* op_array_ctor_func_t */
    NULL,           /* op_array_dtor_func_t */
    STANDARD_ZEND_EXTENSION_PROPERTIES
};

I really need the statement call callback for single stepping through
code.

regards,
Derick

-- 
Derick Rethans
http://derickrethans.nl | http://ez.no | http://xdebug.org

-- 
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to