Friday, July 23, 2004
structure of zend_op_array
the things that seem important to us:
- zend_uchar type -> char type -> defines global/static variable
- zend_uchar *arg_types
- char *function_name -> will exist if function exists
- zend_uint *refcount
- zend_op *opcodes ->
this is the biggy, this where are all the goodies are hidden!
note that although vld_dump_op_array prints everything out nicely, it calls vld_dump_op to do the real work which accesses this.
definition:
- opcode -> name of op
- result -> the result, duh
- op1 -> first op
- op2 -> second op, double duh
- extended_value -> if it exists
- lineno -> need i say it?
- zend_uint last, size -> int no. of total ops, size of op array
- zend_brk_cont_element *brk_cont_array -> struct with 3 int's (cont, brk & parent) im guessing its a sort of control thing used with the following two
- zend_uint last_brk_cont
- zend_unit current_brk_cont
- zend_bool uses_globals -> char self_explanatory
- HashTable *static_variables -> hmm... i wonder what this could be, duh
- zend_op *start_op -> determines where to start
- int backpatch_count
- zend_bool return_reference
- zend_bool done_pass_two
- char *filename -> not exactly rocket science
- void *reserved[ZEND_MAX_RESERVED_RESOURCES]
Comments:
<< Home
good - next step - can u explain the 3 progs i sent u at the bytecode level - objective : find x86 equivalents
For example usage is as follows:
JMPZNZ, Jump to address 1 (extended_value) if operand is true, jump to address 2 (op2) if operand is false
Post a Comment
JMPZNZ, Jump to address 1 (extended_value) if operand is true, jump to address 2 (op2) if operand is false
<< Home

