RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it

From: Date: Wed, 05 Mar 2003 23:17:26 +0000
Subject: RE: [PHP-DEV] Doing something with an each opcode as zend_execute() handles it
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-94824@lists.php.net to get a copy of this message
On Wednesday, March 05, 2003 5:46 PM, Sterling Hughes wrote: >> Essentially, I want to be able to produce a sort of serialized >> representation of the opcodes, but as they are executed, not all in >> one big chunk after they are compiled. >> >> This isn't for any actually useful production code, just some >> debugging/messing around/exploring engine internals. >> > I would suggest you take a look at Ze2's execution architecture, it > should allow you to do this. Such as overriding the opcode handlers for each opcode? I suppose I could change what the handlers are initialized to in zend_init_opcodes_handler() so that my new handler does the serialization and then calls the regular handler. Does that make sense? On Wednesday, March 05, 2003 6:10 PM, George Schlossnagle wrote: > There's no good way to do this as a zend_extension in ZE1 (that I know > of). You need to patch the engine (which is trivial). Yeah, so far I'm just using a different zend_execute.c with my added code, I was just wondering if there's a better/more formal/etc way to do it... Thanks, David

« previous php.dev (#94824) next »